spyri-api 0.1.3 → 0.1.4

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: e759bc4bade99c858c05fec7c965e8dde021cbde0044521704aff5f3b5718461
4
+ data.tar.gz: 43903fef0750ee67b7a016f58d1bcad6568f48a152658562f9b148368975781e
5
5
  SHA512:
6
- metadata.gz: d3c72cb73fd9fa1f65a0551541deebf114cca2dc16c841a43c6a0327a5aab7786d173786e57219762732e107cc9a99b576668383657422585096a0db362e7e5a
7
- data.tar.gz: 7ac34820a0a5cbc33d42393d0214f501f61bc9ba4de4f9377661fe00dfa8ee3e94742c2cf233a7dc69a525ba7da0366c949a9d73f965b13490eae4d3affa1ec9
6
+ metadata.gz: cf10d3392685541c75241f533ced043c619e74e36b91a5687c531ee0b298095d6c9c6df8e0fdab469ce4b056004ec8bd14e94c014ea4211debcf05286dd756d1
7
+ data.tar.gz: ff16bb12d2a95e64a8d6c4a70a527cd3122e5e991f339cff59897dcb1185bdece3a868a518eeef82d9ef547aa298c61a4717fc18e52046147fb6377b7fea6ddf
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,5 @@ 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"
@@ -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.4"
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - pabois
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-10 00:00:00.000000000 Z
11
+ date: 2025-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -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