parseapi 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/lib/parseapi/client.rb +61 -9
- data/lib/parseapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 868c5608156b4b163714dfc77a3ed9b06482349b62300a3e666ccbe25e3b6287
|
|
4
|
+
data.tar.gz: b9720f39d8b3645dacfda109dac42367167f0dc7e4510fcd1fcacd79d51d7831
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9cbe7f0d377a9e57e2256eb0e8ab8d4d47325ca407b632f7bad7bca731d0e83e798abdacb77b9210b15f00e266b52f74f1035e8f37a824697c68593c813d50c
|
|
7
|
+
data.tar.gz: 922d527290e88207d68955bc2f4c46368b94267ff4986eef3c925e95ec2a35e3c3a6a914f5eac6ad3f15079c4f1967775af04af5edb1385d0f388cba3310cf50
|
data/README.md
CHANGED
|
@@ -23,7 +23,14 @@ One method per endpoint, named after the route.
|
|
|
23
23
|
parse.ip('8.8.8.8')
|
|
24
24
|
parse.ip_self
|
|
25
25
|
parse.email('hello@gmail.com')
|
|
26
|
+
parse.vat('DE136695976')
|
|
27
|
+
parse.iban('DE89370400440532013000')
|
|
28
|
+
parse.npi('1881018208')
|
|
26
29
|
parse.phone('+14155552671')
|
|
30
|
+
parse.carrier('+14155552671')
|
|
31
|
+
parse.caller('+14155552671')
|
|
32
|
+
parse.hlr('+14155552671')
|
|
33
|
+
parse.postal('SW1A 1AA')
|
|
27
34
|
parse.postal('28202', country: 'US')
|
|
28
35
|
parse.postal_nearby('28202', country: 'US', radius: 40)
|
|
29
36
|
parse.postal_distance('28202', '10001', country: 'US')
|
|
@@ -31,8 +38,10 @@ parse.city('charlotte', country: 'US')
|
|
|
31
38
|
parse.city_id('city_mb8mbqrkz8zb')
|
|
32
39
|
parse.city_search('char', country: 'US', limit: 10)
|
|
33
40
|
parse.city_nearest(35.2271, -80.8431)
|
|
41
|
+
parse.city_nearby('denver', radius: 8, unit: 'mi')
|
|
34
42
|
parse.country('US')
|
|
35
43
|
parse.country_states('US')
|
|
44
|
+
parse.state('colorado')
|
|
36
45
|
parse.state('NC', country: 'US')
|
|
37
46
|
parse.state_districts('NC', country: 'US')
|
|
38
47
|
parse.district('37081')
|
|
@@ -41,6 +50,7 @@ parse.continent_countries('NA')
|
|
|
41
50
|
parse.currency('USD')
|
|
42
51
|
parse.currency_rate('USD', 'EUR')
|
|
43
52
|
parse.language('en')
|
|
53
|
+
parse.name('BILLY OSHALL')
|
|
44
54
|
parse.timezone('America/New_York')
|
|
45
55
|
parse.holiday('US', year: 2026)
|
|
46
56
|
parse.holiday_date('US', '2026-12-25')
|
|
@@ -50,6 +60,7 @@ parse.weather(40.7128, -74.006)
|
|
|
50
60
|
parse.domain('example.com')
|
|
51
61
|
parse.mx('example.com')
|
|
52
62
|
parse.useragent(ua_string)
|
|
63
|
+
parse.vin('1HGCM82633A004352')
|
|
53
64
|
parse.emoji('rocket')
|
|
54
65
|
parse.emoji_search('fire')
|
|
55
66
|
```
|
data/lib/parseapi/client.rb
CHANGED
|
@@ -55,6 +55,14 @@ module ParseAPI
|
|
|
55
55
|
get("/continent/#{seg(code)}/countries")
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
def bloc(code)
|
|
59
|
+
get("/bloc/#{seg(code)}")
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def bloc_countries(code)
|
|
63
|
+
get("/bloc/#{seg(code)}/countries")
|
|
64
|
+
end
|
|
65
|
+
|
|
58
66
|
def country(code)
|
|
59
67
|
get("/country/#{seg(code)}")
|
|
60
68
|
end
|
|
@@ -63,16 +71,16 @@ module ParseAPI
|
|
|
63
71
|
get("/country/#{seg(code)}/states")
|
|
64
72
|
end
|
|
65
73
|
|
|
66
|
-
def state(code, country:)
|
|
74
|
+
def state(code, country: nil)
|
|
67
75
|
get("/state/#{seg(code)}", country: country)
|
|
68
76
|
end
|
|
69
77
|
|
|
70
|
-
def state_districts(code, country:)
|
|
78
|
+
def state_districts(code, country: nil)
|
|
71
79
|
get("/state/#{seg(code)}/districts", country: country)
|
|
72
80
|
end
|
|
73
81
|
|
|
74
|
-
def district(code, country: nil)
|
|
75
|
-
get("/district/#{seg(code)}", country: country)
|
|
82
|
+
def district(code, country: nil, state: nil)
|
|
83
|
+
get("/district/#{seg(code)}", country: country, state: state)
|
|
76
84
|
end
|
|
77
85
|
|
|
78
86
|
def city(name, country: nil, state: nil)
|
|
@@ -91,15 +99,19 @@ module ParseAPI
|
|
|
91
99
|
get('/city', lat: lat, lon: lon)
|
|
92
100
|
end
|
|
93
101
|
|
|
94
|
-
def
|
|
102
|
+
def city_nearby(name, radius: nil, unit: nil, country: nil, state: nil, limit: nil)
|
|
103
|
+
get("/city/#{seg(name)}/nearby", radius: radius, unit: unit, country: country, state: state, limit: limit)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def postal(code, country: nil)
|
|
95
107
|
get("/postal/#{seg(code)}", country: country)
|
|
96
108
|
end
|
|
97
109
|
|
|
98
|
-
def postal_nearby(code, country
|
|
110
|
+
def postal_nearby(code, country: nil, radius: nil, unit: nil)
|
|
99
111
|
get("/postal/#{seg(code)}/nearby", country: country, radius: radius, unit: unit)
|
|
100
112
|
end
|
|
101
113
|
|
|
102
|
-
def postal_distance(from, to, country:)
|
|
114
|
+
def postal_distance(from, to, country: nil)
|
|
103
115
|
get("/postal/#{seg(from)}/distance/#{seg(to)}", country: country)
|
|
104
116
|
end
|
|
105
117
|
|
|
@@ -107,10 +119,34 @@ module ParseAPI
|
|
|
107
119
|
get("/email/#{seg(email)}", deep: deep)
|
|
108
120
|
end
|
|
109
121
|
|
|
122
|
+
def vat(number, country: nil, deep: false, from: nil)
|
|
123
|
+
get("/vat/#{seg(number)}", country: country, deep: deep, from: from)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def iban(iban, country: nil)
|
|
127
|
+
get("/iban/#{seg(iban)}", country: country)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def npi(npi, deep: false)
|
|
131
|
+
get("/npi/#{seg(npi)}", deep: deep)
|
|
132
|
+
end
|
|
133
|
+
|
|
110
134
|
def phone(number, country: nil, deep: false)
|
|
111
135
|
get("/phone/#{seg(number)}", country: country, deep: deep)
|
|
112
136
|
end
|
|
113
137
|
|
|
138
|
+
def carrier(number, country: nil)
|
|
139
|
+
get("/carrier/#{seg(number)}", country: country)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def caller(number, country: nil)
|
|
143
|
+
get("/caller/#{seg(number)}", country: country)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def hlr(number, country: nil)
|
|
147
|
+
get("/hlr/#{seg(number)}", country: country)
|
|
148
|
+
end
|
|
149
|
+
|
|
114
150
|
def domain(domain, deep: false)
|
|
115
151
|
get("/domain/#{seg(domain)}", deep: deep)
|
|
116
152
|
end
|
|
@@ -123,18 +159,34 @@ module ParseAPI
|
|
|
123
159
|
get('/useragent', { deep: deep }, { 'User-Agent' => ua })
|
|
124
160
|
end
|
|
125
161
|
|
|
162
|
+
def vin(vin, deep: false)
|
|
163
|
+
get("/vin/#{seg(vin)}", deep: deep)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def hts(code, deep: false, origin: nil)
|
|
167
|
+
get("/hts/#{seg(code)}", deep: deep, origin: origin)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
def hts_search(q)
|
|
171
|
+
get('/hts', q: q)
|
|
172
|
+
end
|
|
173
|
+
|
|
126
174
|
def currency(code)
|
|
127
175
|
get("/currency/#{seg(code)}")
|
|
128
176
|
end
|
|
129
177
|
|
|
130
|
-
def currency_rate(base, quote)
|
|
131
|
-
get("/currency/#{seg(base)}/#{seg(quote)}")
|
|
178
|
+
def currency_rate(base, quote, date: nil, amount: nil)
|
|
179
|
+
get("/currency/#{seg(base)}/#{seg(quote)}", date: date, amount: amount)
|
|
132
180
|
end
|
|
133
181
|
|
|
134
182
|
def language(code)
|
|
135
183
|
get("/language/#{seg(code)}")
|
|
136
184
|
end
|
|
137
185
|
|
|
186
|
+
def name(name)
|
|
187
|
+
get("/name/#{seg(name)}")
|
|
188
|
+
end
|
|
189
|
+
|
|
138
190
|
def timezone(id, at: nil)
|
|
139
191
|
get("/timezone/#{seg(id)}", at: at)
|
|
140
192
|
end
|
data/lib/parseapi/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: parseapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- parseAPI
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|