kinetic_sdk 5.0.11 → 5.0.12

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: 1bef4ef5b7a3772de01000faf66ca84663367f55adef418ec9ff0df0792e06df
4
- data.tar.gz: c8f6a905d0564a853e1c4314296356afc2a3b165d85e87e590c18dd42e0368ad
3
+ metadata.gz: b48973a248ca9299a82e2f508af5fe67bea291f0b9a3b672c250fd963e96531b
4
+ data.tar.gz: b2403cc106dee26a0a4f11f4bfe9be956d8ca3e7130a429285109569e4d406b0
5
5
  SHA512:
6
- metadata.gz: 8b44e5014b26f7fd8f9e89e5cebe8d5474e78e82295b6ff3a57d6efef437e8e3baef44a52578373a6b491d94b5e8ddfe7613af1a934021a98014cd05084d47fd
7
- data.tar.gz: 97504862c6bab2088cad7ed1f71676ef1a7474340b55c17fefc7b24370d72a55da9b2f5623f7caa61a30b6ddbc41d5d61632f3571718a7965713ab121590c64d
6
+ metadata.gz: 9b511e848a0eb5ba0c452b2407edb60382ae1a1fc03ca286e88245f8bd94330b0327b503dc1c592e2eaefd2769a86df09409c42c54b4a99ed1e8be8b6cf69680
7
+ data.tar.gz: df63b8db823ae2d18b427534604ec14014f8e4263a303edb38bbfe62befe8cd0ed547c9cd8e0642e9d371fd2d3ad4140ad2c5bb31d9bde0f1821c922ac3fdda7
@@ -1,5 +1,65 @@
1
1
  # Change Log
2
2
 
3
+ ## [5.0.12](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.12) (2020-08-27)
4
+
5
+ Added routes for webapis.
6
+
7
+ ## [5.0.11](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.11) (2020-08-24)
8
+
9
+ Don't remove spaces in filenames when exporting items. Spaces are valid in Windows filenames.
10
+
11
+ ## [5.0.10](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.10) (2020-08-24)
12
+
13
+ Changed how filenames are stored when items are exported to be compatible with Windows.
14
+
15
+ ## [5.0.9](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.9) (2020-06-29)
16
+
17
+ Bug Fixes.
18
+
19
+ ## [5.0.8](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.8) (2020-06-11)
20
+
21
+ Bug Fixes.
22
+
23
+ ## [5.0.7](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.7) (2020-05-15)
24
+
25
+ Bug Fixes.
26
+
27
+ ## [5.0.6](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.6) (2020-04-24)
28
+
29
+ Bug Fixes.
30
+
31
+ ## [5.0.5](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.5) (2020-04-24)
32
+
33
+ Bug Fixes.
34
+
35
+ ## [5.0.4](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.4) (2020-02-12)
36
+
37
+ Bug Fixes.
38
+
39
+ ## [5.0.3](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.3) (2020-01-16)
40
+
41
+ Bug Fixes.
42
+
43
+ ## [5.0.2](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.2) (2020-01-10)
44
+
45
+ Bug Fixes.
46
+
47
+ ## [5.0.1](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.1) (2020-01-10)
48
+
49
+ Bug Fixes.
50
+
51
+ ## [5.0.0](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/5.0.0) (2019-12-19)
52
+
53
+ Bumped version to correspond with Kinetic Platform 5.0.0.
54
+
55
+ ## [1.0.2](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/1.0.2) (2019-12-18)
56
+
57
+ Bug Fixes.
58
+
59
+ ## [1.0.1](https://github.com/kineticdata/kinetic-sdk-rb/releases/tag/1.0.1) (2019-12-17)
60
+
61
+ Bug Fixes.
62
+
3
63
  ## [1.0.0](https://github.com/kineticdata/kinetic-sdk-rb/tree/1.0.0) (2019-06-13)
4
64
 
5
65
  ** 0.x to 1.x Upgrade Warning **
@@ -0,0 +1,144 @@
1
+ module KineticSdk
2
+ class Core
3
+
4
+ # Add a Web API on the Space
5
+ #
6
+ # @param body [Hash] hash of Web API properties
7
+ # - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
8
+ # - +slug+ - The slug of the Web API
9
+ # - +securityPolicies+ - [Array] Array of hashes
10
+ # - - +endpoint+ - "Execution"
11
+ # - - +name+ - Name of an existing Space Security Definition
12
+
13
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
14
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
15
+ def add_space_webapi(body, headers=default_headers)
16
+ raise StandardError.new "Web API properties is not valid, must be a Hash." unless body.is_a? Hash
17
+ @logger.info("Adding the \"#{body['slug']}\" to the Space.")
18
+ post("#{@api_url}/webApis", body, headers)
19
+ end
20
+
21
+ # Add a Web API on a Kapp
22
+ #
23
+ # @param kapp_slug [String] the Kapp slug
24
+ # @param body [Hash] hash of Web API properties
25
+ # - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
26
+ # - +slug+ - The slug of the Web API
27
+ # - +securityPolicies+ - [Array] Array of hashes
28
+ # - - +endpoint+ - "Execution"
29
+ # - - +name+ - Name of an existing Space Security Definition
30
+
31
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
32
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
33
+ def add_kapp_webapi(kapp_slug, body, headers=default_headers)
34
+ raise StandardError.new "Web API properties is not valid, must be a Hash." unless body.is_a? Hash
35
+ @logger.info("Adding the \"#{body['slug']}\" to the \"#{kapp_slug}\" Kapp.")
36
+ post("#{@api_url}/kapps/#{kapp_slug}/webApis", body, headers)
37
+ end
38
+
39
+ # Find all Web APIs for the Space
40
+ #
41
+ # @param params [Hash] Query parameters that are added to the URL, such as +include+
42
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
43
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
44
+ def find_space_webapis(params={}, headers=default_headers)
45
+ @logger.info("Finding all Web APIs on the Space")
46
+ get("#{@api_url}/webApis", params, headers)
47
+ end
48
+
49
+ # Find a single Web API on the Space
50
+ #
51
+ # @param slug [String] slug of the Web API
52
+ # @param params [Hash] Query parameters that are added to the URL, such as +include+
53
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
54
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
55
+ def find_space_webapi(slug, params={}, headers=default_headers)
56
+ @logger.info("Finding the \"#{slug}\" Web API on the Space")
57
+ get("#{@api_url}/webApis/#{slug}", params, headers)
58
+ end
59
+
60
+ # Find all Web APIs for a Kapp
61
+ #
62
+ # @param kapp_slug [String] the Kapp slug
63
+ # @param params [Hash] Query parameters that are added to the URL, such as +include+
64
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
65
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
66
+ def find_kapp_webapis(kapp_slug, params={}, headers=default_headers)
67
+ @logger.info("Finding all Web APIs on the \"#{kapp_slug}\" Kapp.")
68
+ get("#{@api_url}/kapps/#{kapp_slug}/webApis", params, headers)
69
+ end
70
+
71
+ # Find a single Web API on the Kapp
72
+ #
73
+ # @param kapp_slug [String] the Kapp slug
74
+ # @param slug [String] slug of the Web API
75
+ # @param params [Hash] Query parameters that are added to the URL, such as +include+
76
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
77
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
78
+ def find_kapp_webapi(kapp_slug, slug, params={}, headers=default_headers)
79
+ @logger.info("Finding the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
80
+ get("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", params, headers)
81
+ end
82
+
83
+ # Update a Web API on the Space
84
+ #
85
+ # All of the Web API properties are optional. Only the properties provided
86
+ # in the Hash will be updated, the other properties will retain their
87
+ # current values.
88
+ #
89
+ # @param slug [String] the slug of the Web API
90
+ # @param body [Hash] hash of Web API properties
91
+ # - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
92
+ # - +slug+ - The slug of the Web API
93
+ # - +securityPolicies+ - [Array] Array of hashes
94
+ # - - +endpoint+ - "Execution"
95
+ # - - +name+ - Name of an existing Space Security Definition
96
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
97
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
98
+ def update_space_webapi(slug, body, headers=default_headers)
99
+ @logger.info("Updating the \"#{slug}\" Web API on the Space.")
100
+ put("#{@api_url}/webApis/#{slug}", body, headers)
101
+ end
102
+
103
+ # Update a Web API on a Kapp
104
+ #
105
+ # All of the Web API properties are optional. Only the properties provided
106
+ # in the Hash will be updated, the other properties will retain their
107
+ # current values.
108
+ #
109
+ # @param kapp_slug [String] the Kapp slug
110
+ # @param slug [String] the slug of the Web API
111
+ # @param body [Hash] hash of Web API properties
112
+ # - +method+ - The method of the Web API - "GET", "POST", "PUT", or "DELETE"
113
+ # - +slug+ - The slug of the Web API
114
+ # - +securityPolicies+ - [Array] Array of hashes
115
+ # - - +endpoint+ - "Execution"
116
+ # - - +name+ - Name of an existing Space Security Definition
117
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
118
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
119
+ def update_kapp_webapi(kapp_slug, slug, body, headers=default_headers)
120
+ @logger.info("Updating the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
121
+ put("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", body, headers)
122
+ end
123
+
124
+ # Delete a Web API on the Space
125
+ # @param slug [String] the slug of the Web API
126
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
127
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
128
+ def delete_space_webapi(slug, headers=default_headers)
129
+ @logger.info("Deleting the \"#{slug}\" Web API on the Space.")
130
+ delete("#{@api_url}/webApis/#{slug}", headers)
131
+ end
132
+
133
+ # Delete a Web API on a Kapp
134
+ # @param kapp_slug [String] the Kapp slug
135
+ # @param slug [String] the slug of the Web API
136
+ # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
137
+ # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
138
+ def delete_kapp_webapi(kapp_slug, slug, headers=default_headers)
139
+ @logger.info("Deleting the \"#{slug}\" Web API on the \"#{kapp_slug}\" Kapp.")
140
+ delete("#{@api_url}/kapps/#{kapp_slug}/webApis/#{slug}", headers)
141
+ end
142
+
143
+ end
144
+ end
@@ -3,5 +3,5 @@ module KineticSdk
3
3
  # Version of Kinetic SDK
4
4
  #
5
5
  # @return [String] Version of the SDK
6
- VERSION = "5.0.11"
6
+ VERSION = "5.0.12"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kinetic_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.11
4
+ version: 5.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kinetic Data
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-24 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -362,6 +362,7 @@ files:
362
362
  - lib/kinetic_sdk/core/lib/system_api.rb
363
363
  - lib/kinetic_sdk/core/lib/teams.rb
364
364
  - lib/kinetic_sdk/core/lib/users.rb
365
+ - lib/kinetic_sdk/core/lib/webapis.rb
365
366
  - lib/kinetic_sdk/core/lib/webhook_jobs.rb
366
367
  - lib/kinetic_sdk/core/lib/webhooks.rb
367
368
  - lib/kinetic_sdk/discussions/discussions-sdk.rb