spyri-api 0.1.4 → 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 +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +70 -0
- data/lib/spyri-api.rb +3 -1
- data/lib/spyri_api/definitions.rb +30 -0
- data/lib/spyri_api/modules.rb +30 -0
- data/lib/spyri_api/version.rb +1 -1
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17344ba07c89a16273c0bff7ba9044ef1e48c9547d8bc81ab21c38e53b8dd7b5
|
4
|
+
data.tar.gz: 8083e38bf58b89956d98b1d3b53db5fbe631cc79a21c578ca0c0e422000b2ce2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a5da8d6539bbff3995bf8c91a5a2ce36773d877c5474958fdbf2225683347fdcb0b7cb8803103e2c89076cbbdd3c0417b835ed804639ec3c0dcee929a6591e9
|
7
|
+
data.tar.gz: f75bcef9e223862a1be4f24282dbc1b9d90113cbf9e286bd2d58fccfe58570b5c8dfe7238ba69259a9b0548fcb5eac034668f0e2dfe87d6c4954aa0ec530d575
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/spyri-api.rb
CHANGED
@@ -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
|
data/lib/spyri_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spyri-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pabois
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email:
|
29
29
|
- pierreandre.boissinot@noesya.coop
|
30
30
|
executables: []
|
@@ -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
|
@@ -56,7 +59,7 @@ metadata:
|
|
56
59
|
homepage_uri: https://github.com/letemps-ch/spyri-api
|
57
60
|
source_code_uri: https://github.com/letemps-ch/spyri-api
|
58
61
|
changelog_uri: https://github.com/letemps-ch/spyri-api/CHANGELOG.md
|
59
|
-
post_install_message:
|
62
|
+
post_install_message:
|
60
63
|
rdoc_options: []
|
61
64
|
require_paths:
|
62
65
|
- lib
|
@@ -71,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
74
|
- !ruby/object:Gem::Version
|
72
75
|
version: '0'
|
73
76
|
requirements: []
|
74
|
-
rubygems_version: 3.
|
75
|
-
signing_key:
|
77
|
+
rubygems_version: 3.5.16
|
78
|
+
signing_key:
|
76
79
|
specification_version: 4
|
77
80
|
summary: Ruby client library for the Spyri API
|
78
81
|
test_files: []
|