@apiverve/zipcodes 1.0.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +13 -226
  2. package/index.js +1 -1
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- Zip Codes API
1
+ Zip Codes Lookup API
2
2
  ============
3
3
 
4
- Zip Codes is a simple tool for looking up zip codes. It returns the city, state, and more of a zip code.
4
+ Zip Codes Lookup is a simple tool for looking up the zip codes of a city. It returns the zip codes of the city.
5
5
 
6
6
  ![Build Status](https://img.shields.io/badge/build-passing-green)
7
7
  ![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
8
8
  ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
9
9
 
10
- This is a Javascript Wrapper for the [Zip Codes API](https://apiverve.com/marketplace/api/zipcodes)
10
+ This is a Javascript Wrapper for the [Zip Codes Lookup API](https://apiverve.com/marketplace/api/zipcodes)
11
11
 
12
12
  ---
13
13
 
@@ -25,7 +25,7 @@ You can get it by signing up at [https://apiverve.com](https://apiverve.com)
25
25
 
26
26
  ## Usage
27
27
 
28
- The Zip Codes API documentation is found here: [https://docs.apiverve.com/api/zipcodes](https://docs.apiverve.com/api/zipcodes).
28
+ The Zip Codes Lookup API documentation is found here: [https://docs.apiverve.com/api/zipcodes](https://docs.apiverve.com/api/zipcodes).
29
29
  You can find parameters, example responses, and status codes documented here.
30
30
 
31
31
  ### Setup
@@ -48,8 +48,7 @@ Using the API client, you can perform requests to the API.
48
48
 
49
49
  ```
50
50
  var query = {
51
- city: "San Francisco",
52
- state: "CA"
51
+ zip: "64082"
53
52
  };
54
53
  ```
55
54
 
@@ -72,226 +71,14 @@ api.execute(query, function (error, data) {
72
71
  "status": "ok",
73
72
  "error": null,
74
73
  "data": {
75
- "search": "San Francisco",
76
- "foundCities": [
77
- {
78
- "zipcode": "94102",
79
- "state_abbr": "CA",
80
- "latitude": "37.779329",
81
- "longitude": "-122.41915",
82
- "city": "San Francisco",
83
- "state": "California"
84
- },
85
- {
86
- "zipcode": "94103",
87
- "state_abbr": "CA",
88
- "latitude": "37.772329",
89
- "longitude": "-122.41087",
90
- "city": "San Francisco",
91
- "state": "California"
92
- },
93
- {
94
- "zipcode": "94104",
95
- "state_abbr": "CA",
96
- "latitude": "37.791728",
97
- "longitude": "-122.40190",
98
- "city": "San Francisco",
99
- "state": "California"
100
- },
101
- {
102
- "zipcode": "94105",
103
- "state_abbr": "CA",
104
- "latitude": "37.789228",
105
- "longitude": "-122.39570",
106
- "city": "San Francisco",
107
- "state": "California"
108
- },
109
- {
110
- "zipcode": "94107",
111
- "state_abbr": "CA",
112
- "latitude": "37.766529",
113
- "longitude": "-122.39577",
114
- "city": "San Francisco",
115
- "state": "California"
116
- },
117
- {
118
- "zipcode": "94108",
119
- "state_abbr": "CA",
120
- "latitude": "37.792678",
121
- "longitude": "-122.40793",
122
- "city": "San Francisco",
123
- "state": "California"
124
- },
125
- {
126
- "zipcode": "94109",
127
- "state_abbr": "CA",
128
- "latitude": "37.792778",
129
- "longitude": "-122.42188",
130
- "city": "San Francisco",
131
- "state": "California"
132
- },
133
- {
134
- "zipcode": "94110",
135
- "state_abbr": "CA",
136
- "latitude": "37.748730",
137
- "longitude": "-122.41545",
138
- "city": "San Francisco",
139
- "state": "California"
140
- },
141
- {
142
- "zipcode": "94111",
143
- "state_abbr": "CA",
144
- "latitude": "37.798228",
145
- "longitude": "-122.40027",
146
- "city": "San Francisco",
147
- "state": "California"
148
- },
149
- {
150
- "zipcode": "94112",
151
- "state_abbr": "CA",
152
- "latitude": "37.720931",
153
- "longitude": "-122.44241",
154
- "city": "San Francisco",
155
- "state": "California"
156
- },
157
- {
158
- "zipcode": "94114",
159
- "state_abbr": "CA",
160
- "latitude": "37.758434",
161
- "longitude": "-122.43512",
162
- "city": "San Francisco",
163
- "state": "California"
164
- },
165
- {
166
- "zipcode": "94115",
167
- "state_abbr": "CA",
168
- "latitude": "37.786129",
169
- "longitude": "-122.43736",
170
- "city": "San Francisco",
171
- "state": "California"
172
- },
173
- {
174
- "zipcode": "94116",
175
- "state_abbr": "CA",
176
- "latitude": "37.743381",
177
- "longitude": "-122.48578",
178
- "city": "San Francisco",
179
- "state": "California"
180
- },
181
- {
182
- "zipcode": "94117",
183
- "state_abbr": "CA",
184
- "latitude": "37.770937",
185
- "longitude": "-122.44276",
186
- "city": "San Francisco",
187
- "state": "California"
188
- },
189
- {
190
- "zipcode": "94118",
191
- "state_abbr": "CA",
192
- "latitude": "37.782029",
193
- "longitude": "-122.46158",
194
- "city": "San Francisco",
195
- "state": "California"
196
- },
197
- {
198
- "zipcode": "94121",
199
- "state_abbr": "CA",
200
- "latitude": "37.778729",
201
- "longitude": "-122.49265",
202
- "city": "San Francisco",
203
- "state": "California"
204
- },
205
- {
206
- "zipcode": "94122",
207
- "state_abbr": "CA",
208
- "latitude": "37.758380",
209
- "longitude": "-122.48478",
210
- "city": "San Francisco",
211
- "state": "California"
212
- },
213
- {
214
- "zipcode": "94123",
215
- "state_abbr": "CA",
216
- "latitude": "37.801028",
217
- "longitude": "-122.43836",
218
- "city": "San Francisco",
219
- "state": "California"
220
- },
221
- {
222
- "zipcode": "94124",
223
- "state_abbr": "CA",
224
- "latitude": "37.732797",
225
- "longitude": "-122.39348",
226
- "city": "San Francisco",
227
- "state": "California"
228
- },
229
- {
230
- "zipcode": "94127",
231
- "state_abbr": "CA",
232
- "latitude": "37.734964",
233
- "longitude": "-122.45970",
234
- "city": "San Francisco",
235
- "state": "California"
236
- },
237
- {
238
- "zipcode": "94128",
239
- "state_abbr": "CA",
240
- "latitude": "37.621964",
241
- "longitude": "-122.39534",
242
- "city": "San Francisco",
243
- "state": "California"
244
- },
245
- {
246
- "zipcode": "94129",
247
- "state_abbr": "CA",
248
- "latitude": "37.799840",
249
- "longitude": "-122.46167",
250
- "city": "San Francisco",
251
- "state": "California"
252
- },
253
- {
254
- "zipcode": "94130",
255
- "state_abbr": "CA",
256
- "latitude": "37.819423",
257
- "longitude": "-122.36966",
258
- "city": "San Francisco",
259
- "state": "California"
260
- },
261
- {
262
- "zipcode": "94131",
263
- "state_abbr": "CA",
264
- "latitude": "37.741797",
265
- "longitude": "-122.43780",
266
- "city": "San Francisco",
267
- "state": "California"
268
- },
269
- {
270
- "zipcode": "94132",
271
- "state_abbr": "CA",
272
- "latitude": "37.724231",
273
- "longitude": "-122.47958",
274
- "city": "San Francisco",
275
- "state": "California"
276
- },
277
- {
278
- "zipcode": "94133",
279
- "state_abbr": "CA",
280
- "latitude": "37.801878",
281
- "longitude": "-122.41018",
282
- "city": "San Francisco",
283
- "state": "California"
284
- },
285
- {
286
- "zipcode": "94134",
287
- "state_abbr": "CA",
288
- "latitude": "37.719581",
289
- "longitude": "-122.41085",
290
- "city": "San Francisco",
291
- "state": "California"
292
- }
293
- ]
294
- }
74
+ "zipcode": "64082",
75
+ "state_abbr": "MO",
76
+ "latitude": "38.850243",
77
+ "longitude": "-94.39570",
78
+ "city": "Lees Summit",
79
+ "state": "Missouri"
80
+ },
81
+ "code": 200
295
82
  }
296
83
  ```
297
84
 
package/index.js CHANGED
@@ -33,7 +33,7 @@ class zipcodesWrapper {
33
33
  query = {};
34
34
  }
35
35
 
36
- var requiredParams = ["city", "state"];
36
+ var requiredParams = ["zip"];
37
37
  if (requiredParams.length > 0) {
38
38
  for (var i = 0; i < requiredParams.length; i++) {
39
39
  if (!query[requiredParams[i]]) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apiverve/zipcodes",
3
- "version": "1.0.3",
4
- "description": "Zip Codes is a simple tool for looking up zip codes. It returns the city, state, and more of a zip code.",
3
+ "version": "1.1.4",
4
+ "description": "Zip Codes Lookup is a simple tool for looking up the zip codes of a city. It returns the zip codes of the city.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "test": "mocha"
@@ -18,15 +18,15 @@
18
18
  "bugs": {
19
19
  "url": "https://github.com/apiverve/zipcodes-API/issues"
20
20
  },
21
- "homepage": "https://github.com/apiverve/zipcodes-API",
21
+ "homepage": "https://apiverve.com/marketplace/api/zipcodes",
22
22
  "devDependencies": {
23
- "mocha": "^10.4.0",
23
+ "mocha": "^10.7.3",
24
24
  "chai": "^5.1.1",
25
25
  "dotenv": "^16.4.5"
26
26
  },
27
27
  "dependencies": {
28
- "node-fetch": "3.3.2",
28
+ "node-fetch": "^3.3.2",
29
29
  "promise": "^8.3.0",
30
- "axios": "1.6.8"
30
+ "axios": "1.7.4"
31
31
  }
32
32
  }