-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo reference #36
Geo reference #36
Conversation
…ber variables of said function for consistency
…to specify a license.
|
||
client := wireup.BuildUSEnrichmentAPIClient( | ||
//wireup.WebsiteKeyCredential(os.Getenv("SMARTY_AUTH_WEB"), os.Getenv("SMARTY_AUTH_REFERER")), | ||
wireup.SecretKeyCredential(os.Getenv("SMARTY_AUTH_ID"), os.Getenv("SMARTY_AUTH_TOKEN")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the wireup on other examples there is some explanation to the user of the different things that could go in here. I would take a look at those and copy that into here!
log.SetFlags(log.Ltime | log.Llongfile) | ||
|
||
client := wireup.BuildUSEnrichmentAPIClient( | ||
//wireup.WebsiteKeyCredential(os.Getenv("SMARTY_AUTH_WEB"), os.Getenv("SMARTY_AUTH_REFERER")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my other comment. Follow the other examples and put some comments here
us-enrichment-api/client.go
Outdated
@@ -36,6 +36,12 @@ func (c *Client) SendPropertyPrincipal(lookup *Lookup) (error, []*PrincipalRespo | |||
return err, propertyLookup.Response | |||
} | |||
|
|||
func (c *Client) SendPropertyGeoReference(lookup *Lookup) (error, []*GeoReferenceResponse) { | |||
geoReferenceLookup := &geoReferenceLookup{Lookup: lookup} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable name geoReferenceLookup
is overriding the struct with that same name. Functionality will be preserved but I recommend changing the variable name just for the sake of cleaner code and to prevent bugs in the future.
us-enrichment-api/lookup.go
Outdated
principalDataSubset = "principal" | ||
propertyDataSet = "property" | ||
geoReferenceDataSet = "geo-reference" | ||
geoReferenceDataSubset = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking we write geoReferenceDataSubset
instead as emptyDataSubset
so we can reuse that in the future. This is more of a design choice, I will leave that up to you but I think that would make more sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor changes to make! Overall, the code looks great! The only thing that was missing was some tests to make sure some of those more complex lookup methods work correctly. Nice work!
Added the following files and directories to make the code more modular and readable for the user.
-examples
-us-enrichment-api
--geo-reference (implements the geo-reference functionality as an example for the user along with getting rid of the licensing functionality so the user does not need to specify a license)
--property-financial (separated this from the original directory that initially just had the different options for sending data as commented out code along with getting rid of the licensing functionality so the user does not need to specify a license)
--property-principal(Like the previous example we made this portion modular so that the user could successfully navigate between the propertyfinancial and propertyprincipal lookups along with getting rid of the licensing functionality so the user does not need to specify a license)
-us-enrichment-api
--response.go(included the attributes and structs to be able to use geo-reference)
--client.go(implemented the lookup functions to be able to utilize geo-reference)
--lookup.go(Implemented functions for the geo-reference functionality)