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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0a1ffbd9b718491b56f7c65719d95f3e13a73f008b5d0c4aa7c24f2723d001d
4
- data.tar.gz: b9066707773e9cdbe183ef3c695cb5f7264d1e285724b6925a12000728ceea05
3
+ metadata.gz: bc56baf3b3dea55810b451e476acf813f48f43b75b8966319c260f479f82642d
4
+ data.tar.gz: 56da4b3d1cff75fcb9b238a5022247877f31623b390066ad43795b9739adcbf4
5
5
  SHA512:
6
- metadata.gz: 2296c90e7446e8963ea98bea98d97b80251e3c07c8e611135856f51727bc911b41cea2235dcf84590d15699dfd1a095a8070928c4e5e1dd80330b7dc14dbe1d1
7
- data.tar.gz: 905c4b2d3404d1ba6c4da0229b495c03ccbac6a0bfe5b3aeebad8893d57cb7e6cec18f87018c7cf9070401c82d710ab3e78ce3c15528f97a692148d63448e7b8
6
+ metadata.gz: 4319706e400e6710b11497611cf7830c5aa5fc059049851c041042928949b7f77b3eb69c2ec595879bf2db3887b6c4135351ece7bbf7049e760ca0082c0f21d7
7
+ data.tar.gz: ebc0f3179d397207252685e615e5f4471dfa7a752c96976b372e70b89dac2f57af40084323fda0db673524469acc5c834f7fa07399bad4484b5d6cdd9b6b3706
@@ -19,8 +19,7 @@ require 'lolitado/box'
19
19
  # end
20
20
 
21
21
  # def get_details_of_a_city city_slug, locale
22
- # add_headers({'Accept-Language' => locale})
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
 
@@ -1,3 +1,3 @@
1
1
  module Lolitado
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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
- rubyforge_project:
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