stigg-api-client 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb5028b371f0211e5eb36b851f178f31511e4fab423638d92724e534d120a400
4
- data.tar.gz: 31e5e37fab257d53fd006f5854ad3c8e4650398607a4c7113ba37901eef34df8
3
+ metadata.gz: 3d1d05cb491e5fbc8302149a9d694cd4dd6cb8ce1d98ab0e2f64ec932308ecc3
4
+ data.tar.gz: 8e71bdf8e5b4a0223f89bde227b38b3775f67eb82bb20a7cfee4c6069ef9c7c6
5
5
  SHA512:
6
- metadata.gz: 84fde9de567650ab41a0ee5f13f7322303dae573457dbe276082c77dce300b1444ab3d1e7f8f0f087dd5c790ffa1abca16ef349387603f3c80cced268882f994
7
- data.tar.gz: 3dbab4968ff612a628dca33a59766b802d397d6a48d5a4ab8c06f2c809790eaf89383126380df2e8336d44dbfcee0c753a134a9eb96beb77b06d359ae1c877ea
6
+ metadata.gz: 712f2d419658e57b3224c90e6334df8a9b22ae89d498383fa14f1abf99b266b3da7d218c7f5cd7a53391bbedf6823bc0e2bb1a82c20ef3d426cb93d89b4d7533
7
+ data.tar.gz: a8b50713a93f2fac5267c017534de63975c4ae60ed0b5a2d95ab00784ece8f1b96039006f64fe967e0d3b407032d4afc98149c78c09dea899dc689a2d3f2f5f3
data/Gemfile CHANGED
@@ -10,3 +10,5 @@ gem "rake", "~> 13.0"
10
10
  gem "rspec", "~> 3.0"
11
11
 
12
12
  gem "rubocop", "~> 1.21"
13
+
14
+ gem "bump", "~> 0.10"
data/Gemfile.lock CHANGED
@@ -1,35 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- stigg-api-client (0.1.0)
4
+ stigg-api-client (0.3.0)
5
5
  graphlient (~> 0.7.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4)
10
+ activesupport (7.0.4.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
15
  ast (2.4.2)
16
- concurrent-ruby (1.1.10)
16
+ bump (0.10.0)
17
+ concurrent-ruby (1.2.2)
17
18
  diff-lcs (1.5.0)
18
- faraday (2.6.0)
19
+ faraday (2.7.4)
19
20
  faraday-net_http (>= 2.0, < 3.1)
20
21
  ruby2_keywords (>= 0.0.4)
21
22
  faraday-net_http (3.0.2)
22
23
  graphlient (0.7.0)
23
24
  faraday (~> 2.0)
24
25
  graphql-client
25
- graphql (2.0.15)
26
+ graphql (2.0.20)
26
27
  graphql-client (0.18.0)
27
28
  activesupport (>= 3.0)
28
29
  graphql
29
30
  i18n (1.12.0)
30
31
  concurrent-ruby (~> 1.0)
31
32
  json (2.6.2)
32
- minitest (5.16.3)
33
+ minitest (5.18.0)
33
34
  parallel (1.22.1)
34
35
  parser (3.1.2.1)
35
36
  ast (~> 2.4.1)
@@ -64,7 +65,7 @@ GEM
64
65
  parser (>= 3.1.1.0)
65
66
  ruby-progressbar (1.11.0)
66
67
  ruby2_keywords (0.0.5)
67
- tzinfo (2.0.5)
68
+ tzinfo (2.0.6)
68
69
  concurrent-ruby (~> 1.0)
69
70
  unicode-display_width (2.3.0)
70
71
 
@@ -72,6 +73,7 @@ PLATFORMS
72
73
  x86_64-darwin-21
73
74
 
74
75
  DEPENDENCIES
76
+ bump (~> 0.10)
75
77
  rake (~> 13.0)
76
78
  rspec (~> 3.0)
77
79
  rubocop (~> 1.21)
data/README.md CHANGED
@@ -1,10 +1,7 @@
1
1
  # Stigg::Client
2
2
 
3
- This library provides a Ruby wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on
4
- the operations the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk) is using under the hood.
5
-
6
- It leverages the [graphlient](https://github.com/ashkan18/graphlient) library, and utilizes the `Graphlient::Client` class to send the API requests.
7
-
3
+ This Ruby gem provides a wrapper to [Stigg's GraphQL API](https://docs.stigg.io/docs/graphql-api) based on the operations that are in use by the [Stigg's Node.js SDK](https://docs.stigg.io/docs/nodejs-sdk).
4
+ It leverages the [graphlient](https://github.com/ashkan18/graphlient) library under the hood, and utilizes the `Graphlient::Client` class to execute the API requests.
8
5
 
9
6
  ## Documentation
10
7
 
data/lib/stigg/client.rb CHANGED
@@ -19,6 +19,8 @@ module Stigg
19
19
  # @param [String api_url
20
20
  # @return [Client]
21
21
  def create_client(api_key, api_url = "https://api.stigg.io/graphql", request_timeout=30)
22
+ schema_path = File.join(__dir__, '../../schema.json').to_s
23
+
22
24
  client = Graphlient::Client.new(
23
25
  api_url,
24
26
  headers: {
@@ -28,7 +30,7 @@ module Stigg
28
30
  read_timeout: request_timeout,
29
31
  write_timeout: request_timeout
30
32
  },
31
- schema_path: 'schema.json'
33
+ schema_path: schema_path
32
34
  )
33
35
 
34
36
  Client.new(client)