Skip to content

Commit 705af5c

Browse files
authored
Carter/smartykey and license (#63)
* Remove license from example. * Added examples command to Makefile. * Added smartykey to reverse-geo * Added enrichment to makefile.
1 parent 184649c commit 705af5c

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

Makefile

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,31 @@ publish: compile
2424
-Dgpg.passphrase=${GPG_PASSPHRASE} \
2525
deploy
2626

27-
.PHONY: clean test integration-test compile publish
27+
28+
international_autocomplete_api:
29+
mvn exec:java -Dexec.mainClass="examples.InternationalAutocompleteExample"
30+
31+
international_street_api:
32+
mvn exec:java -Dexec.mainClass="examples.InternationalExample"
33+
34+
us_autocomplete_pro_api:
35+
mvn exec:java -Dexec.mainClass="examples.UsAutocompleteProExample"
36+
37+
us_enrichment_api:
38+
mvn exec:java -Dexec.mainClass="examples.UsEnrichmentExample"
39+
40+
us_extract_api:
41+
mvn exec:java -Dexec.mainClass="examples.UsExtractExample"
42+
43+
us_reverse_geo_api:
44+
mvn exec:java -Dexec.mainClass="examples.UsReverseGeoExample"
45+
46+
us_street_api:
47+
mvn exec:java -Dexec.mainClass="examples.UsStreetSingleAddressExample" && mvn exec:java -Dexec.mainClass="examples.UsStreetMultipleAddressesExample"
48+
49+
us_zipcode_api:
50+
mvn exec:java -Dexec.mainClass="examples.UsZipCodeSingleLookupExample" && mvn exec:java -Dexec.mainClass="examples.UsZipCodeMultipleLookupsExample"
51+
52+
examples: international_autocomplete_api international_street_api us_autocomplete_pro_api us_enrichment_api us_extract_api us_reverse_geo_api us_street_api us_zipcode_api
53+
54+
.PHONY: clean test integration-test compile publish examples international_autocomplete_api international_street_api us_autocomplete_pro_api us_enrichment_api us_extract_api us_reverse_geo_api us_street_api us_zipcode_api

src/main/java/com/smartystreets/api/us_reverse_geo/Address.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class Address implements Serializable {
1212
private String stateAbbreviation;
1313
private String zipCode;
1414
private String source;
15+
private String smartykey;
1516

1617
//endregion
1718

@@ -28,4 +29,7 @@ public class Address implements Serializable {
2829
@JsonProperty("source")
2930
public String getSource() { return this.source; }
3031

32+
@JsonProperty("smarty_key")
33+
public String getSmartykey() { return this.smartykey; }
34+
3135
}

src/main/java/examples/InternationalAutocompleteExample.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ public static void main(String[] args) {
2020
// for client-side requests (browser/mobile), use this code:
2121
//SharedCredentials credentials = new SharedCredentials(System.getenv("SMARTY_AUTH_WEB"), System.getenv("SMARTY_AUTH_REFERER"));
2222

23-
ArrayList<String> licenses = new ArrayList<>();
24-
Client client = new ClientBuilder(credentials).withLicenses(licenses).buildInternationalAutcompleteApiClient();
23+
Client client = new ClientBuilder(credentials).buildInternationalAutcompleteApiClient();
2524
Lookup lookup = new Lookup("Louis");
2625

2726
// Documentation for input fields can be found at:

src/main/java/examples/UsReverseGeoExample.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void main(String[] args) {
4646
System.out.println("State Abbreviation: " + address.getStateAbbreviation());
4747
System.out.println("ZIP Code: " + address.getZipCode());
4848
System.out.println("License: " + coordinate.getLicense());
49+
System.out.println("Smartykey: " + address.getSmartykey());
4950
System.out.println();
5051
}
5152
}

0 commit comments

Comments
 (0)