spyri-api 0.1.5 → 0.1.6

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: 33145cdfe453e19a3a87b411538c55bfa6dad7f3ecd85b11b31e6bd7e0af7f78
4
- data.tar.gz: 4e10fd4ce429b7c983e33e340f008fdc586c55fd82cc66294bc2bf9ff3f247d6
3
+ metadata.gz: 17344ba07c89a16273c0bff7ba9044ef1e48c9547d8bc81ab21c38e53b8dd7b5
4
+ data.tar.gz: 8083e38bf58b89956d98b1d3b53db5fbe631cc79a21c578ca0c0e422000b2ce2
5
5
  SHA512:
6
- metadata.gz: 761d4342ac442a7bd0c50c9667e6467d20bb96795e314472ad09a98aae2e7aa737092f46e9846177df7599a1579ebd674672fb856c9c7d315bf2f75dc6a32c61
7
- data.tar.gz: 6d47ce7d05ba2604442672e56009cc2f4a8f1a5cff59e7ad9e2ba893e98ed51bef83b69312a868ed680c498ea31e3952177c2d080f8991d7b81e4b28fba311d0
6
+ metadata.gz: 5a5da8d6539bbff3995bf8c91a5a2ce36773d877c5474958fdbf2225683347fdcb0b7cb8803103e2c89076cbbdd3c0417b835ed804639ec3c0dcee929a6591e9
7
+ data.tar.gz: f75bcef9e223862a1be4f24282dbc1b9d90113cbf9e286bd2d58fccfe58570b5c8dfe7238ba69259a9b0548fcb5eac034668f0e2dfe87d6c4954aa0ec530d575
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
+ ## [0.1.6] - 2025-07-08
2
+
3
+ - Add modules & definitions endpoints
4
+
1
5
  ## [0.1.4] - 2025-07-04
2
6
 
3
- - Add users endpoint
7
+ - Add articles endpoint
4
8
 
5
9
  ## [0.1.2] - 2024-12-04
6
10
 
data/Gemfile.lock ADDED
@@ -0,0 +1,70 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ spyri-api (0.1.6)
5
+ excon
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.3)
11
+ diff-lcs (1.6.2)
12
+ excon (1.2.7)
13
+ logger
14
+ json (2.12.2)
15
+ language_server-protocol (3.17.0.5)
16
+ lint_roller (1.1.0)
17
+ logger (1.7.0)
18
+ parallel (1.27.0)
19
+ parser (3.3.8.0)
20
+ ast (~> 2.4.1)
21
+ racc
22
+ prism (1.4.0)
23
+ racc (1.8.1)
24
+ rainbow (3.1.1)
25
+ rake (13.3.0)
26
+ regexp_parser (2.10.0)
27
+ rspec (3.13.1)
28
+ rspec-core (~> 3.13.0)
29
+ rspec-expectations (~> 3.13.0)
30
+ rspec-mocks (~> 3.13.0)
31
+ rspec-core (3.13.5)
32
+ rspec-support (~> 3.13.0)
33
+ rspec-expectations (3.13.5)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.13.0)
36
+ rspec-mocks (3.13.5)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.13.0)
39
+ rspec-support (3.13.4)
40
+ rubocop (1.78.0)
41
+ json (~> 2.3)
42
+ language_server-protocol (~> 3.17.0.2)
43
+ lint_roller (~> 1.1.0)
44
+ parallel (~> 1.10)
45
+ parser (>= 3.3.0.2)
46
+ rainbow (>= 2.2.2, < 4.0)
47
+ regexp_parser (>= 2.9.3, < 3.0)
48
+ rubocop-ast (>= 1.45.1, < 2.0)
49
+ ruby-progressbar (~> 1.7)
50
+ unicode-display_width (>= 2.4.0, < 4.0)
51
+ rubocop-ast (1.45.1)
52
+ parser (>= 3.3.7.2)
53
+ prism (~> 1.4)
54
+ ruby-progressbar (1.13.0)
55
+ unicode-display_width (3.1.4)
56
+ unicode-emoji (~> 4.0, >= 4.0.4)
57
+ unicode-emoji (4.0.4)
58
+
59
+ PLATFORMS
60
+ ruby
61
+ x86_64-darwin-23
62
+
63
+ DEPENDENCIES
64
+ rake (~> 13.0)
65
+ rspec (~> 3.0)
66
+ rubocop (~> 1.21)
67
+ spyri-api!
68
+
69
+ BUNDLED WITH
70
+ 2.6.2
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SpyriApi
4
+ class Definitions
5
+
6
+ BASEPATH = '/definitions'.freeze
7
+ SEARCHABLE_ATTRIBUTES = [:sirius_id, :title].freeze
8
+
9
+ attr_accessor :api_client
10
+
11
+ def initialize(api_client)
12
+ @api_client = api_client
13
+ end
14
+
15
+ def search(opts = {})
16
+ query_params = {}
17
+ SEARCHABLE_ATTRIBUTES.each do |key|
18
+ query_params[key.to_s] = opts[key] if !opts[key].nil?
19
+ end
20
+ path = BASEPATH
21
+ @api_client.call_api(:GET, path, query_params: query_params)
22
+ end
23
+
24
+ def get(id)
25
+ path = "#{BASEPATH}/#{id}"
26
+ @api_client.call_api(:GET, path)
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SpyriApi
4
+ class Modules
5
+
6
+ BASEPATH = '/modules'.freeze
7
+ SEARCHABLE_ATTRIBUTES = [:sirius_id, :title].freeze
8
+
9
+ attr_accessor :api_client
10
+
11
+ def initialize(api_client)
12
+ @api_client = api_client
13
+ end
14
+
15
+ def search(opts = {})
16
+ query_params = {}
17
+ SEARCHABLE_ATTRIBUTES.each do |key|
18
+ query_params[key.to_s] = opts[key] if !opts[key].nil?
19
+ end
20
+ path = BASEPATH
21
+ @api_client.call_api(:GET, path, query_params: query_params)
22
+ end
23
+
24
+ def get(id)
25
+ path = "#{BASEPATH}/#{id}"
26
+ @api_client.call_api(:GET, path)
27
+ end
28
+
29
+ end
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpyriApi
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spyri-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - pabois
@@ -35,6 +35,7 @@ files:
35
35
  - ".rubocop.yml"
36
36
  - CHANGELOG.md
37
37
  - Gemfile
38
+ - Gemfile.lock
38
39
  - LICENSE.txt
39
40
  - README.md
40
41
  - Rakefile
@@ -43,8 +44,10 @@ files:
43
44
  - lib/spyri-api.rb
44
45
  - lib/spyri_api/articles.rb
45
46
  - lib/spyri_api/client.rb
47
+ - lib/spyri_api/definitions.rb
46
48
  - lib/spyri_api/error.rb
47
49
  - lib/spyri_api/invoices.rb
50
+ - lib/spyri_api/modules.rb
48
51
  - lib/spyri_api/subscriptions.rb
49
52
  - lib/spyri_api/users.rb
50
53
  - lib/spyri_api/version.rb