lolitado 0.1.1 → 0.1.2
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/lib/lolitado.rb +6 -4
- data/lib/lolitado/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc56baf3b3dea55810b451e476acf813f48f43b75b8966319c260f479f82642d
|
4
|
+
data.tar.gz: 56da4b3d1cff75fcb9b238a5022247877f31623b390066ad43795b9739adcbf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4319706e400e6710b11497611cf7830c5aa5fc059049851c041042928949b7f77b3eb69c2ec595879bf2db3887b6c4135351ece7bbf7049e760ca0082c0f21d7
|
7
|
+
data.tar.gz: ebc0f3179d397207252685e615e5f4471dfa7a752c96976b372e70b89dac2f57af40084323fda0db673524469acc5c834f7fa07399bad4484b5d6cdd9b6b3706
|
data/lib/lolitado.rb
CHANGED
@@ -19,8 +19,7 @@ require 'lolitado/box'
|
|
19
19
|
# end
|
20
20
|
|
21
21
|
# def get_details_of_a_city city_slug, locale
|
22
|
-
#
|
23
|
-
# request('get', "/cities/#{city_slug}")
|
22
|
+
# request('get', "/cities/#{city_slug}", locale)
|
24
23
|
# end
|
25
24
|
# end
|
26
25
|
#
|
@@ -33,7 +32,6 @@ require 'lolitado/box'
|
|
33
32
|
# end
|
34
33
|
|
35
34
|
# def user_login payload
|
36
|
-
# add_headers({'Content-Type' => "application/json"})
|
37
35
|
# query = "mutation login($input: UserLoginInput!) {userLogin(input:$input) {authToken}}"
|
38
36
|
# graph_request(query, payload)
|
39
37
|
# end
|
@@ -45,9 +43,13 @@ module Lolitado
|
|
45
43
|
#
|
46
44
|
# @param method [String] http request method
|
47
45
|
# @param endpoint [String] http request endpoint
|
46
|
+
# @param token [String] authorization token if query needed
|
47
|
+
# @param locale [String] locale if query needed
|
48
48
|
# @param body [String] http request body
|
49
49
|
#
|
50
|
-
def request method, endpoint, body=false
|
50
|
+
def request method, endpoint, token = false, locale = false, body=false
|
51
|
+
add_headers({'Authorization' => "Bearer #{token}"}) if token
|
52
|
+
add_headers({'Accept-Language' => locale}) if locale
|
51
53
|
API.request(method, endpoint, body)
|
52
54
|
end
|
53
55
|
|
data/lib/lolitado/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolitado
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dolores Zhang
|
@@ -103,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.7.7
|
106
|
+
rubygems_version: 3.0.6
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: Lolitado DSL for database process
|