From 4b44f29dcd9a3a32ad4c77ac6aafad51b60cfd7c Mon Sep 17 00:00:00 2001 From: Bryan Amundson Date: Fri, 1 Mar 2024 11:49:01 -0700 Subject: [PATCH] Updated comments in example. --- examples/us-enrichment-api/universal/main.go | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/examples/us-enrichment-api/universal/main.go b/examples/us-enrichment-api/universal/main.go index 0381b40..e85f7af 100644 --- a/examples/us-enrichment-api/universal/main.go +++ b/examples/us-enrichment-api/universal/main.go @@ -16,26 +16,24 @@ func main() { 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")), - // The appropriate license values to be used for your subscriptions - // can be found on the Subscriptions page the account dashboard. - // https://www.smarty.com/docs/cloud/licensing - wireup.WithLicenses("us-property-data-principal-cloud"), - // wireup.DebugHTTPOutput(), // uncomment this line to see detailed HTTP request/response information. ) - // Documentation for input fields can be found at: - // https://www.smarty.com/docs/cloud/us-address-enrichment-api#http-request-input-fields + // Documentation for input fields and available datasets can be found at: + // https://www.smarty.com/docs/cloud/us-address-enrichment-api smartyKey := "1682393594" lookup := us_enrichment.Lookup{ SmartyKey: smartyKey, - Include: "group_structural,sale_date", // optional: only include these attributes in the returned data - Exclude: "", // optional: exclude attributes from the returned data - ETag: "", // optional: check if the record has been updated + //Include: "group_structural,sale_date", // optional: only include these attributes in the returned data + Exclude: "", // optional: exclude attributes from the returned data + ETag: "", // optional: check if the record has been updated } - err, results := client.SendUniversalLookup(&lookup, "property", "principal") //for datasets with no subsets, enter the empty string, "", for the dataSubset field + // Universal lookup works with all datasets and optional subsets. + // Returns JSON bytes + // Note: The DataSubset field can be an empty string for datasets that have no subsets. + err, results := client.SendUniversalLookup(&lookup, "property", "financial") if err != nil { // If ETag was supplied in the lookup, this status will be returned if the ETag value for the record is current @@ -48,6 +46,4 @@ func main() { fmt.Printf("Results for input: (%s, %s)\n", smartyKey, "principal") fmt.Println(string(results)) - - log.Println("OK") }