files.com 1.0.292 → 1.0.294
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/_VERSION +1 -1
- data/docs/sftp_host_key.md +130 -0
- data/lib/files.com/errors.rb +1 -0
- data/lib/files.com/models/sftp_host_key.rb +167 -0
- data/lib/files.com.rb +1 -0
- 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: cdaf110d3bd4999c4190b8ce6994037a0f12d7591b50f611b2059962f8591b04
|
4
|
+
data.tar.gz: 19bd25c8c5693b35ea942252128e1badb0f2bd9ce47265d6ff129e88213c38eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 220ecfe32113cb98ff6f74a9a6953585da1e90434b79396bc071f970a48b56f3ae344dcc1570bc9aeef3dd2cdd917b834c912310b078633af397c76c50eec39d
|
7
|
+
data.tar.gz: e6597bb77b9b7894f101e92074d1f38900706637c73a0b90d78af9252ce2efb4a4160746585a0bfafa6d1212a6fd8ba35de5025ffccd63141200a2c94932c362
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.294
|
@@ -0,0 +1,130 @@
|
|
1
|
+
# SftpHostKey
|
2
|
+
|
3
|
+
## Example SftpHostKey Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"name": "",
|
9
|
+
"fingerprint_md5": "",
|
10
|
+
"fingerprint_sha256": ""
|
11
|
+
}
|
12
|
+
```
|
13
|
+
|
14
|
+
* `id` (int64): Sftp Host Key ID
|
15
|
+
* `name` (string): The friendly name of this SFTP Host Key.
|
16
|
+
* `fingerprint_md5` (string): MD5 Fingerpint of the public key
|
17
|
+
* `fingerprint_sha256` (string): SHA256 Fingerpint of the public key
|
18
|
+
* `private_key` (string): The private key data.
|
19
|
+
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
## List Sftp Host Keys
|
24
|
+
|
25
|
+
```
|
26
|
+
Files::SftpHostKey.list(
|
27
|
+
per_page: 1
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
31
|
+
### Parameters
|
32
|
+
|
33
|
+
* `cursor` (string): Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
34
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
35
|
+
|
36
|
+
|
37
|
+
---
|
38
|
+
|
39
|
+
## Show Sftp Host Key
|
40
|
+
|
41
|
+
```
|
42
|
+
Files::SftpHostKey.find(id)
|
43
|
+
```
|
44
|
+
|
45
|
+
### Parameters
|
46
|
+
|
47
|
+
* `id` (int64): Required - Sftp Host Key ID.
|
48
|
+
|
49
|
+
|
50
|
+
---
|
51
|
+
|
52
|
+
## Create Sftp Host Key
|
53
|
+
|
54
|
+
```
|
55
|
+
Files::SftpHostKey.create(
|
56
|
+
name: "",
|
57
|
+
private_key: ""
|
58
|
+
)
|
59
|
+
```
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
* `name` (string): The friendly name of this SFTP Host Key.
|
64
|
+
* `private_key` (string): The private key data.
|
65
|
+
|
66
|
+
|
67
|
+
---
|
68
|
+
|
69
|
+
## Update Sftp Host Key
|
70
|
+
|
71
|
+
```
|
72
|
+
Files::SftpHostKey.update(id,
|
73
|
+
name: "",
|
74
|
+
private_key: ""
|
75
|
+
)
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
* `id` (int64): Required - Sftp Host Key ID.
|
81
|
+
* `name` (string): The friendly name of this SFTP Host Key.
|
82
|
+
* `private_key` (string): The private key data.
|
83
|
+
|
84
|
+
|
85
|
+
---
|
86
|
+
|
87
|
+
## Delete Sftp Host Key
|
88
|
+
|
89
|
+
```
|
90
|
+
Files::SftpHostKey.delete(id)
|
91
|
+
```
|
92
|
+
|
93
|
+
### Parameters
|
94
|
+
|
95
|
+
* `id` (int64): Required - Sftp Host Key ID.
|
96
|
+
|
97
|
+
|
98
|
+
---
|
99
|
+
|
100
|
+
## Update Sftp Host Key
|
101
|
+
|
102
|
+
```
|
103
|
+
sftp_host_key = Files::SftpHostKey.list.first
|
104
|
+
|
105
|
+
sftp_host_key.update(
|
106
|
+
name: "",
|
107
|
+
private_key: ""
|
108
|
+
)
|
109
|
+
```
|
110
|
+
|
111
|
+
### Parameters
|
112
|
+
|
113
|
+
* `id` (int64): Required - Sftp Host Key ID.
|
114
|
+
* `name` (string): The friendly name of this SFTP Host Key.
|
115
|
+
* `private_key` (string): The private key data.
|
116
|
+
|
117
|
+
|
118
|
+
---
|
119
|
+
|
120
|
+
## Delete Sftp Host Key
|
121
|
+
|
122
|
+
```
|
123
|
+
sftp_host_key = Files::SftpHostKey.list.first
|
124
|
+
|
125
|
+
sftp_host_key.delete
|
126
|
+
```
|
127
|
+
|
128
|
+
### Parameters
|
129
|
+
|
130
|
+
* `id` (int64): Required - Sftp Host Key ID.
|
data/lib/files.com/errors.rb
CHANGED
@@ -53,6 +53,7 @@ module Files
|
|
53
53
|
class FolderMustNotBeAFileError < BadRequestError; end
|
54
54
|
class InvalidBodyError < BadRequestError; end
|
55
55
|
class InvalidCursorError < BadRequestError; end
|
56
|
+
class InvalidCursorTypeForSortError < BadRequestError; end
|
56
57
|
class InvalidEtagsError < BadRequestError; end
|
57
58
|
class InvalidFilterCombinationError < BadRequestError; end
|
58
59
|
class InvalidFilterFieldError < BadRequestError; end
|
@@ -0,0 +1,167 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class SftpHostKey
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# int64 - Sftp Host Key ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# string - The friendly name of this SFTP Host Key.
|
22
|
+
def name
|
23
|
+
@attributes[:name]
|
24
|
+
end
|
25
|
+
|
26
|
+
def name=(value)
|
27
|
+
@attributes[:name] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# string - MD5 Fingerpint of the public key
|
31
|
+
def fingerprint_md5
|
32
|
+
@attributes[:fingerprint_md5]
|
33
|
+
end
|
34
|
+
|
35
|
+
def fingerprint_md5=(value)
|
36
|
+
@attributes[:fingerprint_md5] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# string - SHA256 Fingerpint of the public key
|
40
|
+
def fingerprint_sha256
|
41
|
+
@attributes[:fingerprint_sha256]
|
42
|
+
end
|
43
|
+
|
44
|
+
def fingerprint_sha256=(value)
|
45
|
+
@attributes[:fingerprint_sha256] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# string - The private key data.
|
49
|
+
def private_key
|
50
|
+
@attributes[:private_key]
|
51
|
+
end
|
52
|
+
|
53
|
+
def private_key=(value)
|
54
|
+
@attributes[:private_key] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# Parameters:
|
58
|
+
# name - string - The friendly name of this SFTP Host Key.
|
59
|
+
# private_key - string - The private key data.
|
60
|
+
def update(params = {})
|
61
|
+
params ||= {}
|
62
|
+
params[:id] = @attributes[:id]
|
63
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
64
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
65
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
66
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
|
67
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
68
|
+
|
69
|
+
Api.send_request("/sftp_host_keys/#{@attributes[:id]}", :patch, params, @options)
|
70
|
+
end
|
71
|
+
|
72
|
+
def delete(params = {})
|
73
|
+
params ||= {}
|
74
|
+
params[:id] = @attributes[:id]
|
75
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
76
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
77
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
78
|
+
|
79
|
+
Api.send_request("/sftp_host_keys/#{@attributes[:id]}", :delete, params, @options)
|
80
|
+
end
|
81
|
+
|
82
|
+
def destroy(params = {})
|
83
|
+
delete(params)
|
84
|
+
end
|
85
|
+
|
86
|
+
def save
|
87
|
+
if @attributes[:id]
|
88
|
+
update(@attributes)
|
89
|
+
else
|
90
|
+
new_obj = SftpHostKey.create(@attributes, @options)
|
91
|
+
@attributes = new_obj.attributes
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Parameters:
|
96
|
+
# cursor - string - Used for pagination. Send a cursor value to resume an existing list from the point at which you left off. Get a cursor from an existing list via either the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
|
97
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
98
|
+
def self.list(params = {}, options = {})
|
99
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
100
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
101
|
+
|
102
|
+
List.new(SftpHostKey, params) do
|
103
|
+
Api.send_request("/sftp_host_keys", :get, params, options)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.all(params = {}, options = {})
|
108
|
+
list(params, options)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Parameters:
|
112
|
+
# id (required) - int64 - Sftp Host Key ID.
|
113
|
+
def self.find(id, params = {}, options = {})
|
114
|
+
params ||= {}
|
115
|
+
params[:id] = id
|
116
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
117
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
118
|
+
|
119
|
+
response, options = Api.send_request("/sftp_host_keys/#{params[:id]}", :get, params, options)
|
120
|
+
SftpHostKey.new(response.data, options)
|
121
|
+
end
|
122
|
+
|
123
|
+
def self.get(id, params = {}, options = {})
|
124
|
+
find(id, params, options)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Parameters:
|
128
|
+
# name - string - The friendly name of this SFTP Host Key.
|
129
|
+
# private_key - string - The private key data.
|
130
|
+
def self.create(params = {}, options = {})
|
131
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
132
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
|
133
|
+
|
134
|
+
response, options = Api.send_request("/sftp_host_keys", :post, params, options)
|
135
|
+
SftpHostKey.new(response.data, options)
|
136
|
+
end
|
137
|
+
|
138
|
+
# Parameters:
|
139
|
+
# name - string - The friendly name of this SFTP Host Key.
|
140
|
+
# private_key - string - The private key data.
|
141
|
+
def self.update(id, params = {}, options = {})
|
142
|
+
params ||= {}
|
143
|
+
params[:id] = id
|
144
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
145
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
146
|
+
raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params[:private_key] and !params[:private_key].is_a?(String)
|
147
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
148
|
+
|
149
|
+
response, options = Api.send_request("/sftp_host_keys/#{params[:id]}", :patch, params, options)
|
150
|
+
SftpHostKey.new(response.data, options)
|
151
|
+
end
|
152
|
+
|
153
|
+
def self.delete(id, params = {}, options = {})
|
154
|
+
params ||= {}
|
155
|
+
params[:id] = id
|
156
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
157
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
158
|
+
|
159
|
+
response, _options = Api.send_request("/sftp_host_keys/#{params[:id]}", :delete, params, options)
|
160
|
+
response.data
|
161
|
+
end
|
162
|
+
|
163
|
+
def self.destroy(id, params = {}, options = {})
|
164
|
+
delete(id, params, options)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
data/lib/files.com.rb
CHANGED
@@ -95,6 +95,7 @@ require "files.com/models/remote_server"
|
|
95
95
|
require "files.com/models/request"
|
96
96
|
require "files.com/models/session"
|
97
97
|
require "files.com/models/settings_change"
|
98
|
+
require "files.com/models/sftp_host_key"
|
98
99
|
require "files.com/models/site"
|
99
100
|
require "files.com/models/sso_strategy"
|
100
101
|
require "files.com/models/status"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.294
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- docs/request.md
|
180
180
|
- docs/session.md
|
181
181
|
- docs/settings_change.md
|
182
|
+
- docs/sftp_host_key.md
|
182
183
|
- docs/site.md
|
183
184
|
- docs/sso_strategy.md
|
184
185
|
- docs/status.md
|
@@ -261,6 +262,7 @@ files:
|
|
261
262
|
- lib/files.com/models/request.rb
|
262
263
|
- lib/files.com/models/session.rb
|
263
264
|
- lib/files.com/models/settings_change.rb
|
265
|
+
- lib/files.com/models/sftp_host_key.rb
|
264
266
|
- lib/files.com/models/site.rb
|
265
267
|
- lib/files.com/models/sso_strategy.rb
|
266
268
|
- lib/files.com/models/status.rb
|