convoy.rb 0.1.8 → 0.1.9

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: ee919edcdd707b9e06dc0106c3925878397766c114e7742475a7c87aee9db66d
4
- data.tar.gz: 1cb0aab99274569dcba20195d43b93275bd555412f3c558040fd6b2d9cea8c34
3
+ metadata.gz: f33937f312b1c892facfce7d871bb972fd0f18ccd4fd0480697e91cd7a8b1662
4
+ data.tar.gz: 8f8335fc9c3257ad80d68c07fda93fe3066792a0acdb55b1e9c3c9c89da73521
5
5
  SHA512:
6
- metadata.gz: 6f9137bdef6d7894adacc0665a161cd437fcfcd2739b59b7867131b0655c1d63602f210d017494c8dd5197247328f7fb84f955bbf0b2c1e698fe1e8c134bd4d2
7
- data.tar.gz: 4be077174a93871e7c9f9c38a0110709327aa7aa8590e5fd5924e672df84f0a13984bdf05ba7b2c63b6a144e302c272dc119a3070c0ffff8fd3e0b779b301714
6
+ metadata.gz: 6efa47b6410966a4ee0fd8d254210a5e1e201634544725585739e7b2f80b562b82d5c8ee621bb4890095da43f755f15e410aa2ef77e6e0495e4089c5848e321a
7
+ data.tar.gz: 680f6f45ab3fc28ea5ef4236d0b8a26676566ba927d4a9f352c0921af03c4a32735fbce7ce9fc75c37733b4dae65f6c5597c7724ba52afdeee1c3d78ab457d02
@@ -12,7 +12,7 @@ module Convoy
12
12
  attr_accessor :log_level
13
13
 
14
14
  def initialize
15
- @base_uri = "https://cloud.getconvoy.io"
15
+ @base_uri = "https://dashboard.getconvoy.io"
16
16
  @path_version = "/v1"
17
17
  @ssl = true
18
18
  @debug = false
@@ -0,0 +1,23 @@
1
+ module Convoy
2
+ class Source < ApiResource
3
+ include ApiOperations::Save
4
+ include ApiOperations::Delete
5
+ include ApiOperations::List
6
+ extend ApiOperations::Create
7
+
8
+ def initialize(id = nil, config = Convoy.config, **kwargs)
9
+ @id = id
10
+ @data = kwargs[:data].nil? ? {} : kwargs[:data]
11
+ @params = kwargs[:params].nil? ? {} : kwargs[:params]
12
+ @config = config
13
+ end
14
+
15
+ def resource_url
16
+ if @id.nil?
17
+ return "#{@config.base_uri}/#{@config.path_version}/sources"
18
+ end
19
+
20
+ "#{@config.base_uri}/#{@config.path_version}/sources" + "/#{@id}"
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ module Convoy
2
+ class Subscription < ApiResource
3
+ include ApiOperations::Save
4
+ include ApiOperations::Delete
5
+ include ApiOperations::List
6
+ extend ApiOperations::Create
7
+
8
+ def initialize(id = nil, config = Convoy.config, **kwargs)
9
+ @id = id
10
+ @data = kwargs[:data].nil? ? {} : kwargs[:data]
11
+ @params = kwargs[:params].nil? ? {} : kwargs[:params]
12
+ @config = config
13
+ end
14
+
15
+ def resource_url
16
+ if @id.nil?
17
+ return "#{@config.base_uri}/#{@config.path_version}/subscriptions"
18
+ end
19
+
20
+ "#{@config.base_uri}/#{@config.path_version}/subscriptions" + "/#{@id}"
21
+ end
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Convoy
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convoy.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subomi Oluwalana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -60,6 +60,8 @@ files:
60
60
  - lib/convoy/resources/event.rb
61
61
  - lib/convoy/resources/event_delivery.rb
62
62
  - lib/convoy/resources/group.rb
63
+ - lib/convoy/resources/source.rb
64
+ - lib/convoy/resources/subscription.rb
63
65
  - lib/convoy/version.rb
64
66
  homepage: https://getconvoy.io
65
67
  licenses: