replicatedvendor 0.0.2 → 0.0.3
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/lib/api/app/app.rb +7 -7
- data/lib/api/apps/apps.rb +5 -5
- data/lib/api/auditlog/auditlog.rb +1 -1
- data/lib/api/auth/auth.rb +4 -4
- data/lib/api/channel/channel.rb +5 -5
- data/lib/api/license/license.rb +10 -10
- data/lib/api/release/release.rb +7 -7
- data/lib/api/releases/releases.rb +2 -2
- data/lib/api/team/team.rb +1 -1
- data/lib/client/client.rb +3 -3
- data/lib/{api.rb → replicatedvendor.rb} +0 -0
- data/replicatedvendor.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e7639dd250dede53f3d3da597cc60a823d24ca4
|
|
4
|
+
data.tar.gz: 83836d473c0161d60be1d797e32730cf16ef49d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c40aa1347be8069ad6968ffe43c859da0d842335f6556a50222568af9ae43417d9d5bcfff6d9467a3d99e86b4c538185fad12fae357c50da2b76e478011b4792
|
|
7
|
+
data.tar.gz: da7b633cac466950214bdd2e21e74286fde8ea92dea4bf9aaec46413b80ee0f47435a7f5996a723a385313a0b8bd5c25b4e10b4ead509a6d612b81e5d813d3f5
|
data/lib/api/app/app.rb
CHANGED
|
@@ -7,48 +7,48 @@ class App < ApiModule
|
|
|
7
7
|
method = "GET"
|
|
8
8
|
endpoint = "app/" + app_id + "/branding"
|
|
9
9
|
uri = ApiUri::build_uri(endpoint)
|
|
10
|
-
return
|
|
10
|
+
return @client.request_json(method, uri)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def create_branding(app_id:)
|
|
14
14
|
method = "POST"
|
|
15
15
|
endpoint = "app/" + app_id + "/branding"
|
|
16
16
|
uri = ApiUri::build_uri(endpoint)
|
|
17
|
-
return
|
|
17
|
+
return @client.request_json(method, uri)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def list_license_fields(app_id:)
|
|
21
21
|
method = "GET"
|
|
22
22
|
endpoint = "app/" + app_id + "/licensefield"
|
|
23
23
|
uri = ApiUri::build_uri(endpoint)
|
|
24
|
-
return
|
|
24
|
+
return @client.request_json(method, uri)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def create_license_field(app_id:, options:)
|
|
28
28
|
method = "POST"
|
|
29
29
|
endpoint = "app/" + app_id + "/licensefield"
|
|
30
30
|
uri = ApiUri::build_uri(endpoint)
|
|
31
|
-
return
|
|
31
|
+
return @client.request_json(method, uri, options)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def edit_license_field(app_id:, license_field_name:, options:)
|
|
35
35
|
method = "PUT"
|
|
36
36
|
endpoint = "app/" + app_id + "/licensefield/" + license_field_name
|
|
37
37
|
uri = ApiUri::build_uri(endpoint)
|
|
38
|
-
return
|
|
38
|
+
return @client.request_json(method, uri, options)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def delete_license_field(app_id:, license_field_name:)
|
|
42
42
|
method = "DELETE"
|
|
43
43
|
endpoint = "app/" + app_id + "/licensefield/" + license_field_name
|
|
44
44
|
uri = ApiUri::build_uri(endpoint)
|
|
45
|
-
return
|
|
45
|
+
return @client.request_json(method, uri)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def list_license(app_id:)
|
|
49
49
|
method = "GET"
|
|
50
50
|
endpoint = "app/" + app_id + "/licenses"
|
|
51
51
|
uri = ApiUri::build_uri(endpoint)
|
|
52
|
-
return
|
|
52
|
+
return @client.request_json(method, uri)
|
|
53
53
|
end
|
|
54
54
|
end
|
data/lib/api/apps/apps.rb
CHANGED
|
@@ -5,29 +5,29 @@ class Apps < ApiModule
|
|
|
5
5
|
|
|
6
6
|
def list()
|
|
7
7
|
method = "GET"
|
|
8
|
-
endpoint = "
|
|
8
|
+
endpoint = "apps"
|
|
9
9
|
uri = ApiUri::build_uri(endpoint)
|
|
10
|
-
return
|
|
10
|
+
return @client.request_json(method, uri)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def delete(app_id:)
|
|
14
14
|
method = "DELETE"
|
|
15
15
|
endpoint = "app/" + app_id
|
|
16
16
|
uri = ApiUri::build_uri(endpoint)
|
|
17
|
-
return
|
|
17
|
+
return @client.request_json(method, uri)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def delete_branding(app_id:)
|
|
21
21
|
method = "DELETE"
|
|
22
22
|
endpoint = "app/" + app_id + "/branding"
|
|
23
23
|
uri = ApiUri::build_uri(endpoint)
|
|
24
|
-
return
|
|
24
|
+
return @client.request_json(method, uri)
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def create(options:)
|
|
28
28
|
method = "POST"
|
|
29
29
|
endpoint = "app"
|
|
30
30
|
uri = ApiUri::build_uri(endpoint)
|
|
31
|
-
return
|
|
31
|
+
return @client.request_json(method, uri, options)
|
|
32
32
|
end
|
|
33
33
|
end
|
data/lib/api/auth/auth.rb
CHANGED
|
@@ -3,27 +3,27 @@ class Auth < ApiModule
|
|
|
3
3
|
method = "POST"
|
|
4
4
|
endpoint = "user/login"
|
|
5
5
|
uri = ApiUri::build_uri(endpoint)
|
|
6
|
-
return
|
|
6
|
+
return @client.request_json(method, uri, options)
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def login_otp(options:)
|
|
10
10
|
method = "POST"
|
|
11
11
|
endpoint = "user/login/otp"
|
|
12
12
|
uri = ApiUri::build_uri(endpoint)
|
|
13
|
-
return
|
|
13
|
+
return @client.request_json(method, uri, options)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def logout()
|
|
17
17
|
method = "POST"
|
|
18
18
|
endpoint = "user/logout"
|
|
19
19
|
uri = ApiUri::build_uri(endpoint)
|
|
20
|
-
return
|
|
20
|
+
return @client.request_json(method, uri)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def signup(options:)
|
|
24
24
|
method = "POST"
|
|
25
25
|
endpoint = "user/signup"
|
|
26
26
|
uri = ApiUri::build_uri(endpoint)
|
|
27
|
-
return
|
|
27
|
+
return @client.request_json(method, uri, options)
|
|
28
28
|
end
|
|
29
29
|
end
|
data/lib/api/channel/channel.rb
CHANGED
|
@@ -3,34 +3,34 @@ class Channel < ApiModule
|
|
|
3
3
|
method = "POST"
|
|
4
4
|
endpoint = "app/" + app_id + "/channel"
|
|
5
5
|
uri = ApiUri::build_uri(endpoint)
|
|
6
|
-
return
|
|
6
|
+
return @client.request_json(method, uri, options)
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def update_channel(app_id:, channel_id:, options:)
|
|
10
10
|
method = "POST"
|
|
11
11
|
endpoint = "app/" + app_id + "/channel/" + channel_id
|
|
12
12
|
uri = ApiUri::build_uri(endpoint)
|
|
13
|
-
return
|
|
13
|
+
return @client.request_json(method, uri, options)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def archive_channel(app_id:, channel_id:)
|
|
17
17
|
method = "POST"
|
|
18
18
|
endpoint = "app/" + app_id + "/channel/" + channel_id + "/archive"
|
|
19
19
|
uri = ApiUri::build_uri(endpoint)
|
|
20
|
-
return
|
|
20
|
+
return @client.request_json(method, uri)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def update_release(app_id:, channel_id:, sequence:, options:)
|
|
24
24
|
method = "POST"
|
|
25
25
|
endpoint = "app/" + app_id + "/channel/" + channel_id + "/release/" + sequence
|
|
26
26
|
uri = ApiUri::build_uri(endpoint)
|
|
27
|
-
return
|
|
27
|
+
return @client.request_json(method, uri, options)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def list_releases(app_id:, channel_id:)
|
|
31
31
|
method = "GET"
|
|
32
32
|
endpoint = "app/" + app_id + "/channel/" + channel_id + "/releases"
|
|
33
33
|
uri = ApiUri::build_uri(endpoint)
|
|
34
|
-
return
|
|
34
|
+
return @client.request_json(method, uri)
|
|
35
35
|
end
|
|
36
36
|
end
|
data/lib/api/license/license.rb
CHANGED
|
@@ -3,49 +3,49 @@ class License < ApiModule
|
|
|
3
3
|
method = "POST"
|
|
4
4
|
endpoint = "license"
|
|
5
5
|
uri = ApiUri.build_uri(endpoint)
|
|
6
|
-
return
|
|
6
|
+
return @client.request_json(method, uri, options)
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def get(license_id:)
|
|
10
10
|
method = "GET"
|
|
11
11
|
endpoint = "license/" << license_id
|
|
12
12
|
uri = ApiUri.build_uri(endpoint)
|
|
13
|
-
return
|
|
13
|
+
return @client.request_json(method, uri)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def update(license_id:, options:)
|
|
17
17
|
method = "PUT"
|
|
18
18
|
endpoint = "license/" << license_id
|
|
19
19
|
uri = ApiUri.build_uri(endpoint)
|
|
20
|
-
return
|
|
20
|
+
return @client.request_json(method, uri, options)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def archive(license_id:)
|
|
24
24
|
method = "DELETE"
|
|
25
25
|
endpoint = "license/" << license_id
|
|
26
26
|
uri = ApiUri.build_uri(endpoint)
|
|
27
|
-
return
|
|
27
|
+
return @client.request_json(method, uri)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def update_airgap(license_id:)
|
|
31
31
|
method = "POST"
|
|
32
32
|
endpoint = "license/" << license_id << "/airgap/password"
|
|
33
33
|
uri = ApiUri.build_uri(endpoint)
|
|
34
|
-
return
|
|
34
|
+
return @client.request_json(method, uri)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def update_billing(license_id:, options:)
|
|
38
38
|
method = "PUT"
|
|
39
39
|
endpoint = "license/" << license_id << "/billing"
|
|
40
40
|
uri = ApiUri.build_uri(endpoint)
|
|
41
|
-
return
|
|
41
|
+
return @client.request_json(method, uri)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def create_billing_event(license_id:, options:)
|
|
45
45
|
method = "POST"
|
|
46
46
|
endpoint = "license/" << license_id << "/billling_event"
|
|
47
47
|
uri = ApiUri.build_uri(endpoint)
|
|
48
|
-
return
|
|
48
|
+
return @client.request_json(method, uri, options)
|
|
49
49
|
end
|
|
50
50
|
|
|
51
51
|
def update_billing_event(license_id:, billing_event_id:, options:)
|
|
@@ -53,21 +53,21 @@ class License < ApiModule
|
|
|
53
53
|
endpoint = "license/" << license_id << "/billing_event/" <<
|
|
54
54
|
billing_event_id
|
|
55
55
|
uri = ApiUri.build_uri(endpoint)
|
|
56
|
-
return
|
|
56
|
+
return @client.request_json(method, uri, options)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def update_channel(license_id:, options:)
|
|
60
60
|
method = "PUT"
|
|
61
61
|
endpoint = "license/" << license_id << "/channel"
|
|
62
62
|
uri = ApiUri.build_uri(endpoint)
|
|
63
|
-
return
|
|
63
|
+
return @client.request_json(method, uri, options)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def update_expiration(license_id:, options:)
|
|
67
67
|
method = "PUT"
|
|
68
68
|
endpoint = "license/" << license_id << "/expire"
|
|
69
69
|
uri = ApiUri.build_uri(endpoint)
|
|
70
|
-
return
|
|
70
|
+
return @client.request_json(method, uri, options)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
def set_license_field(license_id:, options:)
|
data/lib/api/release/release.rb
CHANGED
|
@@ -3,48 +3,48 @@ class Release < ApiModule
|
|
|
3
3
|
method = "POST"
|
|
4
4
|
endpoint = "app/" << appid << "/release"
|
|
5
5
|
uri = ApiUri::build_uri(endpoint)
|
|
6
|
-
return
|
|
6
|
+
return @client.request_json(method, uri)
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def archive(appid:, squence:)
|
|
10
10
|
method = "POST"
|
|
11
11
|
endpoint = "app/" << appid << "/" << sequence << "/archive"
|
|
12
12
|
uri = ApiUri::build_uri(endpoint)
|
|
13
|
-
return
|
|
13
|
+
return @client.request_json(method, uri)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def get_preflight_checks(appid:, sequence:)
|
|
17
17
|
method = "GET"
|
|
18
18
|
endpoint = "app/" << appid << "/" << sequence << "/preflightchecks"
|
|
19
19
|
uri = ApiUri::build_uri(endpoint)
|
|
20
|
-
return
|
|
20
|
+
return @client.request_json(method, uri)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
def promote(appid:, sequence:, options:)
|
|
24
24
|
method = "POST"
|
|
25
25
|
endpoint = "app/" << appid << "/" << sequence << "/promote"
|
|
26
26
|
uri = ApiUri::build_uri(endpoint)
|
|
27
|
-
return
|
|
27
|
+
return @client.request_json(method, uri, options)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def get_properties(appid:, sequence:)
|
|
31
31
|
method = "GET"
|
|
32
32
|
endpoint = "app/" << appid << "/" << sequence << "/properties"
|
|
33
33
|
uri = ApiUri::build_uri(endpoint)
|
|
34
|
-
return
|
|
34
|
+
return @client.request_json(method, uri)
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def get_config(appid:, sequence:)
|
|
38
38
|
method = "GET"
|
|
39
39
|
endpoint = "app/" << appid << "/" << sequence << "/raw"
|
|
40
40
|
uri = ApiUri::build_uri(endpoint)
|
|
41
|
-
return
|
|
41
|
+
return @client.request_json(method, uri)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def update_config(appid:, sequence:)
|
|
45
45
|
method = "PUT"
|
|
46
46
|
endpoint = "app/" << appid << "/" << sequence << "/raw"
|
|
47
47
|
uri = ApiUri::build_uri(endpoint)
|
|
48
|
-
return
|
|
48
|
+
return @client.request_json(method, uri)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -3,13 +3,13 @@ class Releases < ApiModule
|
|
|
3
3
|
method = "GET"
|
|
4
4
|
endpoint = "app/" + app_id + "/releases"
|
|
5
5
|
uri = ApiUri::build_uri(endpoint)
|
|
6
|
-
return
|
|
6
|
+
return @client.request_json(method, uri)
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
def get_releases(app_id:, options:)
|
|
10
10
|
method = "GET"
|
|
11
11
|
endpoint = "app/" + app_id + "/releases/paged"
|
|
12
12
|
uri = ApiUri::build_uri(endpoint, options)
|
|
13
|
-
return
|
|
13
|
+
return @client.request_json(method, uri)
|
|
14
14
|
end
|
|
15
15
|
end
|
data/lib/api/team/team.rb
CHANGED
data/lib/client/client.rb
CHANGED
|
@@ -14,8 +14,8 @@ class ApiClient
|
|
|
14
14
|
|
|
15
15
|
def initialize
|
|
16
16
|
# Create persistent HTTP connection
|
|
17
|
-
@http = Net::HTTP.new(VENDOR_HOST, URI::HTTPS::DEFAULT_PORT
|
|
18
|
-
|
|
17
|
+
@http = Net::HTTP.new(VENDOR_HOST, URI::HTTPS::DEFAULT_PORT)
|
|
18
|
+
@http.use_ssl = true
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def set_token(api_token)
|
|
@@ -36,7 +36,7 @@ class ApiClient
|
|
|
36
36
|
|
|
37
37
|
request = VERB_MAP[method_sym].new(uri)
|
|
38
38
|
|
|
39
|
-
unless method_sym
|
|
39
|
+
unless method_sym == :get
|
|
40
40
|
request.set_form_data(params)
|
|
41
41
|
end
|
|
42
42
|
|
|
File without changes
|
data/replicatedvendor.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'replicatedvendor'
|
|
3
|
-
s.version = '0.0.
|
|
3
|
+
s.version = '0.0.3'
|
|
4
4
|
s.licenses = ['MIT']
|
|
5
5
|
s.summary = "A ruby wrapper for the replicated vendor api"
|
|
6
6
|
s.description = "A ruby wrapper for the replicated vendor api: https://replicated-vendor-api.readme.io/v1.0/reference"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: replicatedvendor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Guy Moore
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2017-10-
|
|
12
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: 'A ruby wrapper for the replicated vendor api: https://replicated-vendor-api.readme.io/v1.0/reference'
|
|
15
15
|
email: guy.moore.normal@mgmail.com
|
|
@@ -17,7 +17,6 @@ executables: []
|
|
|
17
17
|
extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
|
19
19
|
files:
|
|
20
|
-
- lib/api.rb
|
|
21
20
|
- lib/api/apimodule.rb
|
|
22
21
|
- lib/api/apiuri.rb
|
|
23
22
|
- lib/api/app/app.rb
|
|
@@ -31,6 +30,7 @@ files:
|
|
|
31
30
|
- lib/api/releases/releases.rb
|
|
32
31
|
- lib/api/team/team.rb
|
|
33
32
|
- lib/client/client.rb
|
|
33
|
+
- lib/replicatedvendor.rb
|
|
34
34
|
- replicatedvendor.gemspec
|
|
35
35
|
homepage: https://rubygems.org/gems/replicatedvendor
|
|
36
36
|
licenses:
|