spyri-api 0.1.3 → 0.1.5

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: a9276b472ff9ba32b8a872b3d2d556bd34faeb5c8e137b4f0558b3324d88c067
4
- data.tar.gz: 25f3c03511833a8e8c0b920e6936d0c1a6177f05e2fe7085253d4c44b0f3fc98
3
+ metadata.gz: 33145cdfe453e19a3a87b411538c55bfa6dad7f3ecd85b11b31e6bd7e0af7f78
4
+ data.tar.gz: 4e10fd4ce429b7c983e33e340f008fdc586c55fd82cc66294bc2bf9ff3f247d6
5
5
  SHA512:
6
- metadata.gz: d3c72cb73fd9fa1f65a0551541deebf114cca2dc16c841a43c6a0327a5aab7786d173786e57219762732e107cc9a99b576668383657422585096a0db362e7e5a
7
- data.tar.gz: 7ac34820a0a5cbc33d42393d0214f501f61bc9ba4de4f9377661fe00dfa8ee3e94742c2cf233a7dc69a525ba7da0366c949a9d73f965b13490eae4d3affa1ec9
6
+ metadata.gz: 761d4342ac442a7bd0c50c9667e6467d20bb96795e314472ad09a98aae2e7aa737092f46e9846177df7599a1579ebd674672fb856c9c7d315bf2f75dc6a32c61
7
+ data.tar.gz: 6d47ce7d05ba2604442672e56009cc2f4a8f1a5cff59e7ad9e2ba893e98ed51bef83b69312a868ed680c498ea31e3952177c2d080f8991d7b81e4b28fba311d0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.1.4] - 2025-07-04
2
+
3
+ - Add users endpoint
4
+
1
5
  ## [0.1.2] - 2024-12-04
2
6
 
3
7
  - Add update and terminate methods to subscriptions
data/lib/spyri-api.rb CHANGED
@@ -4,4 +4,7 @@ require "spyri_api/client"
4
4
  require "spyri_api/error"
5
5
  require "spyri_api/invoices"
6
6
  require "spyri_api/subscriptions"
7
- require "spyri_api/users"
7
+ require "spyri_api/users"
8
+ require "spyri_api/articles"
9
+ require "spyri_api/modules"
10
+ require "spyri_api/definitions"
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SpyriApi
4
+ class Articles
5
+
6
+ BASEPATH = '/articles'.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.3"
4
+ VERSION = "0.1.5"
5
5
  end
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.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - pabois
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-10 00:00:00.000000000 Z
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: []
@@ -41,6 +41,7 @@ files:
41
41
  - bin/console
42
42
  - bin/setup
43
43
  - lib/spyri-api.rb
44
+ - lib/spyri_api/articles.rb
44
45
  - lib/spyri_api/client.rb
45
46
  - lib/spyri_api/error.rb
46
47
  - lib/spyri_api/invoices.rb
@@ -55,7 +56,7 @@ metadata:
55
56
  homepage_uri: https://github.com/letemps-ch/spyri-api
56
57
  source_code_uri: https://github.com/letemps-ch/spyri-api
57
58
  changelog_uri: https://github.com/letemps-ch/spyri-api/CHANGELOG.md
58
- post_install_message:
59
+ post_install_message:
59
60
  rdoc_options: []
60
61
  require_paths:
61
62
  - lib
@@ -70,8 +71,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0'
72
73
  requirements: []
73
- rubygems_version: 3.1.4
74
- signing_key:
74
+ rubygems_version: 3.5.16
75
+ signing_key:
75
76
  specification_version: 4
76
77
  summary: Ruby client library for the Spyri API
77
78
  test_files: []