convoy.rb 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/convoy/convoy_configuration.rb +1 -1
- data/lib/convoy/resources/source.rb +23 -0
- data/lib/convoy/resources/subscription.rb +23 -0
- data/lib/convoy/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f33937f312b1c892facfce7d871bb972fd0f18ccd4fd0480697e91cd7a8b1662
|
4
|
+
data.tar.gz: 8f8335fc9c3257ad80d68c07fda93fe3066792a0acdb55b1e9c3c9c89da73521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6efa47b6410966a4ee0fd8d254210a5e1e201634544725585739e7b2f80b562b82d5c8ee621bb4890095da43f755f15e410aa2ef77e6e0495e4089c5848e321a
|
7
|
+
data.tar.gz: 680f6f45ab3fc28ea5ef4236d0b8a26676566ba927d4a9f352c0921af03c4a32735fbce7ce9fc75c37733b4dae65f6c5597c7724ba52afdeee1c3d78ab457d02
|
@@ -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
|
data/lib/convoy/version.rb
CHANGED
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.
|
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-
|
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:
|