fantasticstay_api 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -3
- data/lib/fantasticstay_api/client.rb +11 -0
- data/lib/fantasticstay_api/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: 3edde0d39d9a83238e729e588238d8fbeffca50ea873da073de943729dcdca07
|
4
|
+
data.tar.gz: 3abc453bfc9599a7767eeb42534cbe99cc14a8484ae6a4cfb8b5bb3840c01339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df0c54d26a59fce2a7aa02b1c58fcc7234745213409ab8684194bcbd22332eacd1a2c0bc555b50d46ebc9803423619aa96a8af809d803bcbe4ff82db60ed638a
|
7
|
+
data.tar.gz: 68bc2fc9c89a243ed8a0e4162f6c10cbc4d8ad26d694abbd9853d0690f2fa3e92302faa7ffb7b3043f7c60c37a14d4bf1bf7dc78e8c63154f502e2cffe1e23c7
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fantasticstay_api (0.1.
|
4
|
+
fantasticstay_api (0.1.5)
|
5
5
|
api_cache (~> 0.3.0)
|
6
|
+
dry-configurable (~> 0.13)
|
6
7
|
faraday (~> 2.6.0)
|
7
8
|
oj (~> 3.11)
|
8
9
|
|
@@ -13,10 +14,16 @@ GEM
|
|
13
14
|
public_suffix (>= 2.0.2, < 6.0)
|
14
15
|
api_cache (0.3.0)
|
15
16
|
ast (2.4.2)
|
17
|
+
concurrent-ruby (1.1.10)
|
16
18
|
crack (0.4.5)
|
17
19
|
rexml
|
18
20
|
diff-lcs (1.5.0)
|
19
|
-
|
21
|
+
dry-configurable (0.16.1)
|
22
|
+
dry-core (~> 0.6)
|
23
|
+
zeitwerk (~> 2.6)
|
24
|
+
dry-core (0.9.1)
|
25
|
+
concurrent-ruby (~> 1.0)
|
26
|
+
zeitwerk (~> 2.6)
|
20
27
|
faraday (2.6.0)
|
21
28
|
faraday-net_http (>= 2.0, < 3.1)
|
22
29
|
ruby2_keywords (>= 0.0.4)
|
@@ -63,13 +70,13 @@ GEM
|
|
63
70
|
addressable (>= 2.8.0)
|
64
71
|
crack (>= 0.3.2)
|
65
72
|
hashdiff (>= 0.4.0, < 2.0.0)
|
73
|
+
zeitwerk (2.6.1)
|
66
74
|
|
67
75
|
PLATFORMS
|
68
76
|
aarch64-linux
|
69
77
|
x86_64-linux
|
70
78
|
|
71
79
|
DEPENDENCIES
|
72
|
-
dotenv (~> 2.7)
|
73
80
|
fantasticstay_api!
|
74
81
|
rake (~> 13.0)
|
75
82
|
rspec (~> 3.0)
|
@@ -82,6 +82,17 @@ module FantasticstayApi
|
|
82
82
|
process_response(response)
|
83
83
|
end
|
84
84
|
|
85
|
+
# FantasticstayApi::Client.new.search(query)
|
86
|
+
def search(query, type = nil, global_params = {})
|
87
|
+
response = request(
|
88
|
+
http_method: :get,
|
89
|
+
endpoint: 'search',
|
90
|
+
params: { q: query, type: type }.merge!(global_params),
|
91
|
+
cache_ttl: 3600 * 24
|
92
|
+
)
|
93
|
+
process_response(response)
|
94
|
+
end
|
95
|
+
|
85
96
|
protected
|
86
97
|
|
87
98
|
def process_response(response)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fantasticstay_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dinis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api_cache
|