lolitado 0.1.0 → 0.1.1
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/version.rb +1 -1
- data/lib/lolitado.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d0a1ffbd9b718491b56f7c65719d95f3e13a73f008b5d0c4aa7c24f2723d001d
|
|
4
|
+
data.tar.gz: b9066707773e9cdbe183ef3c695cb5f7264d1e285724b6925a12000728ceea05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2296c90e7446e8963ea98bea98d97b80251e3c07c8e611135856f51727bc911b41cea2235dcf84590d15699dfd1a095a8070928c4e5e1dd80330b7dc14dbe1d1
|
|
7
|
+
data.tar.gz: 905c4b2d3404d1ba6c4da0229b495c03ccbac6a0bfe5b3aeebad8893d57cb7e6cec18f87018c7cf9070401c82d710ab3e78ce3c15528f97a692148d63448e7b8
|
data/lib/lolitado/version.rb
CHANGED
data/lib/lolitado.rb
CHANGED
|
@@ -55,9 +55,14 @@ module Lolitado
|
|
|
55
55
|
# forward graph_request method from Graph class to Graph.request method
|
|
56
56
|
#
|
|
57
57
|
# @param query [String] graph query
|
|
58
|
+
# @param token [String] authorization token if query needed
|
|
59
|
+
# @param locale [String] locale if query needed
|
|
58
60
|
# @param variables [String] input variables for graph query using
|
|
59
61
|
#
|
|
60
|
-
def graph_request query, variables = false
|
|
62
|
+
def graph_request query, token = false, locale = false, variables = false
|
|
63
|
+
add_headers({'Content-Type' => "application/json"})
|
|
64
|
+
add_headers({'Authorization' => "Bearer #{token}"}) if token
|
|
65
|
+
add_headers({'Accept-Language' => locale}) if locale
|
|
61
66
|
Graph.request(query, variables)
|
|
62
67
|
end
|
|
63
68
|
|