fastly 4.0.0.alpha3 → 4.0.0.alpha4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54ef7582c4c71dc7eb2e7d251dd0d308801cec0784525ef56d8a762bd2b35a7d
4
- data.tar.gz: 5e70ce781aebde09740fb997e735bdca9551555a6ec6ea8f93123e15022ff109
3
+ metadata.gz: 2d46c336512593f74744373df6e68e69b6de204ea90ab22a0d1cfe7463b60d1a
4
+ data.tar.gz: b188289070cee9297b7babb9afaa0418bd76bb96a41f5a3eccc22021a03e3ea8
5
5
  SHA512:
6
- metadata.gz: 26eacf89448310ea54ad4db48af7c21797676d73faa9ece38c6f05dfa6b1383633e25f145f23ff3fe597f3ed293199023fa34653243a78e70cdc01aee5ebf29f
7
- data.tar.gz: e804beabd029add91a8cc4d5ea4aaa05733c9186f067e9731236ed9641914a79ee806784672870395de000670b64f6617aae98ab9066355ba50b2e24b1a90a74
6
+ metadata.gz: f2d54bfaa4b182de187f2435efc67e435301f29cfa90eb326ece75ef5df04defa483adf330445a02403bd929b2ba705bf4270cd3feed4560f07d9c98a6d74501
7
+ data.tar.gz: 11533a29046951b54f522aebad680a6aa2c210b475aaf2d61ff07874d069db2cdaec09b31b32126821b786584338f8a158243c58d379d36b14dda4b10e2a872c
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A Ruby client library for interacting with most facets of the [Fastly API](https://developer.fastly.com/reference/api).
4
4
 
5
- > ⚠️ This client library (`4.0.0.alpha3`) is an early-access release. Features may change without notice. Use at your own risk.
5
+ > ⚠️ This client library (`4.0.0.alpha4`) is an early-access release. Features may change without notice. Use at your own risk.
6
6
 
7
7
  **We strongly recommend that you do not install alpha and beta releases on live production services.** No official support is provided for such releases. Please try out the library in a test environment, see what breaks without worrying about consequences, and give us [feedback](#issues).
8
8
 
@@ -14,7 +14,7 @@ Read about the [Fastly Product Lifecycle](https://docs.fastly.com/products/fastl
14
14
  To install via RubyGems, add the following to your project's `Gemfile`:
15
15
 
16
16
  ```ruby
17
- gem 'fastly', '~> 4.0.0.alpha3'
17
+ gem 'fastly', '~> 4.0.0.alpha4'
18
18
  ```
19
19
 
20
20
  Then run `bundle install`.
@@ -73,7 +73,11 @@ Class | Method | Description
73
73
  [*Fastly::AclApi*](docs/AclApi.md) | [**list_acls**](docs/AclApi.md#list_acls) | List ACLs
74
74
  [*Fastly::AclApi*](docs/AclApi.md) | [**update_acl**](docs/AclApi.md#update_acl) | Update an ACL
75
75
  [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**bulk_update_acl_entries**](docs/AclEntryApi.md#bulk_update_acl_entries) | Update multiple ACL entries
76
+ [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**create_acl_entry**](docs/AclEntryApi.md#create_acl_entry) | Create an ACL entry
76
77
  [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**delete_acl_entry**](docs/AclEntryApi.md#delete_acl_entry) | Delete an ACL entry
78
+ [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**get_acl_entry**](docs/AclEntryApi.md#get_acl_entry) | Describe an ACL entry
79
+ [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**list_acl_entries**](docs/AclEntryApi.md#list_acl_entries) | List ACL entries
80
+ [*Fastly::AclEntryApi*](docs/AclEntryApi.md) | [**update_acl_entry**](docs/AclEntryApi.md#update_acl_entry) | Update an ACL entry
77
81
  [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**delete_apex_redirect**](docs/ApexRedirectApi.md#delete_apex_redirect) | Delete an apex redirect
78
82
  [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**get_apex_redirect**](docs/ApexRedirectApi.md#get_apex_redirect) | Get an apex redirect
79
83
  [*Fastly::ApexRedirectApi*](docs/ApexRedirectApi.md) | [**list_apex_redirects**](docs/ApexRedirectApi.md#list_apex_redirects) | List apex redirects
@@ -102,6 +106,7 @@ Class | Method | Description
102
106
  [*Fastly::ConditionApi*](docs/ConditionApi.md) | [**update_condition**](docs/ConditionApi.md#update_condition) | Update a condition
103
107
  [*Fastly::ContactApi*](docs/ContactApi.md) | [**delete_contact**](docs/ContactApi.md#delete_contact) | Delete a contact
104
108
  [*Fastly::ContactApi*](docs/ContactApi.md) | [**list_contacts**](docs/ContactApi.md#list_contacts) | List contacts
109
+ [*Fastly::ContentApi*](docs/ContentApi.md) | [**content_check**](docs/ContentApi.md#content_check) | Check status of content in each POP's cache
105
110
  [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**delete_customer**](docs/CustomerApi.md#delete_customer) | Delete a customer
106
111
  [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**get_customer**](docs/CustomerApi.md#get_customer) | Get a customer
107
112
  [*Fastly::CustomerApi*](docs/CustomerApi.md) | [**get_logged_in_customer**](docs/CustomerApi.md#get_logged_in_customer) | Get the logged in customer
data/docs/AclEntryApi.md CHANGED
@@ -11,7 +11,11 @@ api_instance = Fastly::AclEntryApi.new
11
11
  | Method | HTTP request | Description |
12
12
  | ------ | ------------ | ----------- |
13
13
  | [**bulk_update_acl_entries**](AclEntryApi.md#bulk_update_acl_entries) | **PATCH** /service/{service_id}/acl/{acl_id}/entries | Update multiple ACL entries |
14
+ | [**create_acl_entry**](AclEntryApi.md#create_acl_entry) | **POST** /service/{service_id}/acl/{acl_id}/entry | Create an ACL entry |
14
15
  | [**delete_acl_entry**](AclEntryApi.md#delete_acl_entry) | **DELETE** /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} | Delete an ACL entry |
16
+ | [**get_acl_entry**](AclEntryApi.md#get_acl_entry) | **GET** /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} | Describe an ACL entry |
17
+ | [**list_acl_entries**](AclEntryApi.md#list_acl_entries) | **GET** /service/{service_id}/acl/{acl_id}/entries | List ACL entries |
18
+ | [**update_acl_entry**](AclEntryApi.md#update_acl_entry) | **PATCH** /service/{service_id}/acl/{acl_id}/entry/{acl_entry_id} | Update an ACL entry |
15
19
 
16
20
 
17
21
  ## `bulk_update_acl_entries()`
@@ -53,6 +57,47 @@ end
53
57
 
54
58
  [**InlineResponse200**](InlineResponse200.md)
55
59
 
60
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
61
+ [[Back to README]](../../README.md)
62
+ ## `create_acl_entry()`
63
+
64
+ ```ruby
65
+ create_acl_entry(opts): <AclEntryResponse> # Create an ACL entry
66
+ ```
67
+
68
+ Add an ACL entry to an ACL.
69
+
70
+ ### Examples
71
+
72
+ ```ruby
73
+ api_instance = Fastly::AclEntryApi.new
74
+ opts = {
75
+ service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
76
+ acl_id: 'acl_id_example', # String | Alphanumeric string identifying a ACL.
77
+ acl_entry: Fastly::AclEntry.new, # AclEntry |
78
+ }
79
+
80
+ begin
81
+ # Create an ACL entry
82
+ result = api_instance.create_acl_entry(opts)
83
+ p result
84
+ rescue Fastly::ApiError => e
85
+ puts "Error when calling AclEntryApi->create_acl_entry: #{e}"
86
+ end
87
+ ```
88
+
89
+ ### Options
90
+
91
+ | Name | Type | Description | Notes |
92
+ | ---- | ---- | ----------- | ----- |
93
+ | **service_id** | **String** | Alphanumeric string identifying the service. | |
94
+ | **acl_id** | **String** | Alphanumeric string identifying a ACL. | |
95
+ | **acl_entry** | [**AclEntry**](AclEntry.md) | | [optional] |
96
+
97
+ ### Return type
98
+
99
+ [**AclEntryResponse**](AclEntryResponse.md)
100
+
56
101
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
57
102
  [[Back to README]](../../README.md)
58
103
  ## `delete_acl_entry()`
@@ -96,3 +141,134 @@ end
96
141
 
97
142
  [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
98
143
  [[Back to README]](../../README.md)
144
+ ## `get_acl_entry()`
145
+
146
+ ```ruby
147
+ get_acl_entry(opts): <AclEntryResponse> # Describe an ACL entry
148
+ ```
149
+
150
+ Retrieve a single ACL entry.
151
+
152
+ ### Examples
153
+
154
+ ```ruby
155
+ api_instance = Fastly::AclEntryApi.new
156
+ opts = {
157
+ service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
158
+ acl_id: 'acl_id_example', # String | Alphanumeric string identifying a ACL.
159
+ acl_entry_id: 'acl_entry_id_example', # String | Alphanumeric string identifying an ACL Entry.
160
+ }
161
+
162
+ begin
163
+ # Describe an ACL entry
164
+ result = api_instance.get_acl_entry(opts)
165
+ p result
166
+ rescue Fastly::ApiError => e
167
+ puts "Error when calling AclEntryApi->get_acl_entry: #{e}"
168
+ end
169
+ ```
170
+
171
+ ### Options
172
+
173
+ | Name | Type | Description | Notes |
174
+ | ---- | ---- | ----------- | ----- |
175
+ | **service_id** | **String** | Alphanumeric string identifying the service. | |
176
+ | **acl_id** | **String** | Alphanumeric string identifying a ACL. | |
177
+ | **acl_entry_id** | **String** | Alphanumeric string identifying an ACL Entry. | |
178
+
179
+ ### Return type
180
+
181
+ [**AclEntryResponse**](AclEntryResponse.md)
182
+
183
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
184
+ [[Back to README]](../../README.md)
185
+ ## `list_acl_entries()`
186
+
187
+ ```ruby
188
+ list_acl_entries(opts): <Array<AclEntryResponse>> # List ACL entries
189
+ ```
190
+
191
+ List ACL entries for a specified ACL.
192
+
193
+ ### Examples
194
+
195
+ ```ruby
196
+ api_instance = Fastly::AclEntryApi.new
197
+ opts = {
198
+ service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
199
+ acl_id: 'acl_id_example', # String | Alphanumeric string identifying a ACL.
200
+ page: 1, # Integer | Current page.
201
+ per_page: 20, # Integer | Number of records per page.
202
+ sort: 'created', # String | Field on which to sort.
203
+ direction: 'ascend', # String | Direction in which to sort results.
204
+ }
205
+
206
+ begin
207
+ # List ACL entries
208
+ result = api_instance.list_acl_entries(opts)
209
+ p result
210
+ rescue Fastly::ApiError => e
211
+ puts "Error when calling AclEntryApi->list_acl_entries: #{e}"
212
+ end
213
+ ```
214
+
215
+ ### Options
216
+
217
+ | Name | Type | Description | Notes |
218
+ | ---- | ---- | ----------- | ----- |
219
+ | **service_id** | **String** | Alphanumeric string identifying the service. | |
220
+ | **acl_id** | **String** | Alphanumeric string identifying a ACL. | |
221
+ | **page** | **Integer** | Current page. | [optional] |
222
+ | **per_page** | **Integer** | Number of records per page. | [optional][default to 20] |
223
+ | **sort** | **String** | Field on which to sort. | [optional][default to &#39;created&#39;] |
224
+ | **direction** | **String** | Direction in which to sort results. | [optional][default to &#39;ascend&#39;] |
225
+
226
+ ### Return type
227
+
228
+ [**Array&lt;AclEntryResponse&gt;**](AclEntryResponse.md)
229
+
230
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
231
+ [[Back to README]](../../README.md)
232
+ ## `update_acl_entry()`
233
+
234
+ ```ruby
235
+ update_acl_entry(opts): <AclEntryResponse> # Update an ACL entry
236
+ ```
237
+
238
+ Update an ACL entry for a specified ACL.
239
+
240
+ ### Examples
241
+
242
+ ```ruby
243
+ api_instance = Fastly::AclEntryApi.new
244
+ opts = {
245
+ service_id: 'service_id_example', # String | Alphanumeric string identifying the service.
246
+ acl_id: 'acl_id_example', # String | Alphanumeric string identifying a ACL.
247
+ acl_entry_id: 'acl_entry_id_example', # String | Alphanumeric string identifying an ACL Entry.
248
+ acl_entry: Fastly::AclEntry.new, # AclEntry |
249
+ }
250
+
251
+ begin
252
+ # Update an ACL entry
253
+ result = api_instance.update_acl_entry(opts)
254
+ p result
255
+ rescue Fastly::ApiError => e
256
+ puts "Error when calling AclEntryApi->update_acl_entry: #{e}"
257
+ end
258
+ ```
259
+
260
+ ### Options
261
+
262
+ | Name | Type | Description | Notes |
263
+ | ---- | ---- | ----------- | ----- |
264
+ | **service_id** | **String** | Alphanumeric string identifying the service. | |
265
+ | **acl_id** | **String** | Alphanumeric string identifying a ACL. | |
266
+ | **acl_entry_id** | **String** | Alphanumeric string identifying an ACL Entry. | |
267
+ | **acl_entry** | [**AclEntry**](AclEntry.md) | | [optional] |
268
+
269
+ ### Return type
270
+
271
+ [**AclEntryResponse**](AclEntryResponse.md)
272
+
273
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
274
+ [[Back to README]](../../README.md)
@@ -0,0 +1,52 @@
1
+ # Fastly::ContentApi
2
+
3
+
4
+ ```ruby
5
+ require 'fastly'
6
+ api_instance = Fastly::ContentApi.new
7
+ ```
8
+
9
+ ## Methods
10
+
11
+ | Method | HTTP request | Description |
12
+ | ------ | ------------ | ----------- |
13
+ | [**content_check**](ContentApi.md#content_check) | **GET** /content/edge_check | Check status of content in each POP&#39;s cache |
14
+
15
+
16
+ ## `content_check()`
17
+
18
+ ```ruby
19
+ content_check(opts): <Array<Content>> # Check status of content in each POP's cache
20
+ ```
21
+
22
+ Retrieve headers and MD5 hash of the content for a particular URL from each Fastly edge server. This API is limited to 200 requests per hour.
23
+
24
+ ### Examples
25
+
26
+ ```ruby
27
+ api_instance = Fastly::ContentApi.new
28
+ opts = {
29
+ url: 'https://www.example.com/foo/bar', # String | Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed.
30
+ }
31
+
32
+ begin
33
+ # Check status of content in each POP's cache
34
+ result = api_instance.content_check(opts)
35
+ p result
36
+ rescue Fastly::ApiError => e
37
+ puts "Error when calling ContentApi->content_check: #{e}"
38
+ end
39
+ ```
40
+
41
+ ### Options
42
+
43
+ | Name | Type | Description | Notes |
44
+ | ---- | ---- | ----------- | ----- |
45
+ | **url** | **String** | Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed. | [optional] |
46
+
47
+ ### Return type
48
+
49
+ [**Array&lt;Content&gt;**](Content.md)
50
+
51
+ [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
52
+ [[Back to README]](../../README.md)
@@ -94,6 +94,83 @@ module Fastly
94
94
  return data, status_code, headers
95
95
  end
96
96
 
97
+ # Create an ACL entry
98
+ # Add an ACL entry to an ACL.
99
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
100
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
101
+ # @option opts [AclEntry] :acl_entry
102
+ # @return [AclEntryResponse]
103
+ def create_acl_entry(opts = {})
104
+ data, _status_code, _headers = create_acl_entry_with_http_info(opts)
105
+ data
106
+ end
107
+
108
+ # Create an ACL entry
109
+ # Add an ACL entry to an ACL.
110
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
111
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
112
+ # @option opts [AclEntry] :acl_entry
113
+ # @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
114
+ def create_acl_entry_with_http_info(opts = {})
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug 'Calling API: AclEntryApi.create_acl_entry ...'
117
+ end
118
+ # unbox the parameters from the hash
119
+ service_id = opts[:'service_id']
120
+ acl_id = opts[:'acl_id']
121
+ # verify the required parameter 'service_id' is set
122
+ if @api_client.config.client_side_validation && service_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.create_acl_entry"
124
+ end
125
+ # verify the required parameter 'acl_id' is set
126
+ if @api_client.config.client_side_validation && acl_id.nil?
127
+ fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.create_acl_entry"
128
+ end
129
+ # resource path
130
+ local_var_path = '/service/{service_id}/acl/{acl_id}/entry'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s))
131
+
132
+ # query parameters
133
+ query_params = opts[:query_params] || {}
134
+
135
+ # header parameters
136
+ header_params = opts[:header_params] || {}
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+ # HTTP header 'Content-Type'
140
+ content_type = @api_client.select_header_content_type(['application/json'])
141
+ if !content_type.nil?
142
+ header_params['Content-Type'] = content_type
143
+ end
144
+
145
+ # form parameters
146
+ form_params = opts[:form_params] || {}
147
+
148
+ # http body (model)
149
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'acl_entry'])
150
+
151
+ # return_type
152
+ return_type = opts[:debug_return_type] || 'AclEntryResponse'
153
+
154
+ # auth_names
155
+ auth_names = opts[:debug_auth_names] || ['token']
156
+
157
+ new_options = opts.merge(
158
+ :operation => :"AclEntryApi.create_acl_entry",
159
+ :header_params => header_params,
160
+ :query_params => query_params,
161
+ :form_params => form_params,
162
+ :body => post_body,
163
+ :auth_names => auth_names,
164
+ :return_type => return_type
165
+ )
166
+
167
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug "API called: AclEntryApi#create_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
170
+ end
171
+ return data, status_code, headers
172
+ end
173
+
97
174
  # Delete an ACL entry
98
175
  # Delete an ACL entry from a specified ACL.
99
176
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
@@ -170,5 +247,260 @@ module Fastly
170
247
  end
171
248
  return data, status_code, headers
172
249
  end
250
+
251
+ # Describe an ACL entry
252
+ # Retrieve a single ACL entry.
253
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
254
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
255
+ # @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
256
+ # @return [AclEntryResponse]
257
+ def get_acl_entry(opts = {})
258
+ data, _status_code, _headers = get_acl_entry_with_http_info(opts)
259
+ data
260
+ end
261
+
262
+ # Describe an ACL entry
263
+ # Retrieve a single ACL entry.
264
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
265
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
266
+ # @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
267
+ # @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
268
+ def get_acl_entry_with_http_info(opts = {})
269
+ if @api_client.config.debugging
270
+ @api_client.config.logger.debug 'Calling API: AclEntryApi.get_acl_entry ...'
271
+ end
272
+ # unbox the parameters from the hash
273
+ service_id = opts[:'service_id']
274
+ acl_id = opts[:'acl_id']
275
+ acl_entry_id = opts[:'acl_entry_id']
276
+ # verify the required parameter 'service_id' is set
277
+ if @api_client.config.client_side_validation && service_id.nil?
278
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.get_acl_entry"
279
+ end
280
+ # verify the required parameter 'acl_id' is set
281
+ if @api_client.config.client_side_validation && acl_id.nil?
282
+ fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.get_acl_entry"
283
+ end
284
+ # verify the required parameter 'acl_entry_id' is set
285
+ if @api_client.config.client_side_validation && acl_entry_id.nil?
286
+ fail ArgumentError, "Missing the required parameter 'acl_entry_id' when calling AclEntryApi.get_acl_entry"
287
+ end
288
+ # resource path
289
+ local_var_path = '/service/{service_id}/acl/{acl_id}/entry/{acl_entry_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)).sub('{' + 'acl_entry_id' + '}', CGI.escape(acl_entry_id.to_s))
290
+
291
+ # query parameters
292
+ query_params = opts[:query_params] || {}
293
+
294
+ # header parameters
295
+ header_params = opts[:header_params] || {}
296
+ # HTTP header 'Accept' (if needed)
297
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
298
+
299
+ # form parameters
300
+ form_params = opts[:form_params] || {}
301
+
302
+ # http body (model)
303
+ post_body = opts[:debug_body]
304
+
305
+ # return_type
306
+ return_type = opts[:debug_return_type] || 'AclEntryResponse'
307
+
308
+ # auth_names
309
+ auth_names = opts[:debug_auth_names] || ['token']
310
+
311
+ new_options = opts.merge(
312
+ :operation => :"AclEntryApi.get_acl_entry",
313
+ :header_params => header_params,
314
+ :query_params => query_params,
315
+ :form_params => form_params,
316
+ :body => post_body,
317
+ :auth_names => auth_names,
318
+ :return_type => return_type
319
+ )
320
+
321
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug "API called: AclEntryApi#get_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
+ end
325
+ return data, status_code, headers
326
+ end
327
+
328
+ # List ACL entries
329
+ # List ACL entries for a specified ACL.
330
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
331
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
332
+ # @option opts [Integer] :page Current page.
333
+ # @option opts [Integer] :per_page Number of records per page. (default to 20)
334
+ # @option opts [String] :sort Field on which to sort. (default to 'created')
335
+ # @option opts [String] :direction Direction in which to sort results. (default to 'ascend')
336
+ # @return [Array<AclEntryResponse>]
337
+ def list_acl_entries(opts = {})
338
+ data, _status_code, _headers = list_acl_entries_with_http_info(opts)
339
+ data
340
+ end
341
+
342
+ # List ACL entries
343
+ # List ACL entries for a specified ACL.
344
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
345
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
346
+ # @option opts [Integer] :page Current page.
347
+ # @option opts [Integer] :per_page Number of records per page. (default to 20)
348
+ # @option opts [String] :sort Field on which to sort. (default to 'created')
349
+ # @option opts [String] :direction Direction in which to sort results. (default to 'ascend')
350
+ # @return [Array<(Array<AclEntryResponse>, Integer, Hash)>] Array<AclEntryResponse> data, response status code and response headers
351
+ def list_acl_entries_with_http_info(opts = {})
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug 'Calling API: AclEntryApi.list_acl_entries ...'
354
+ end
355
+ # unbox the parameters from the hash
356
+ service_id = opts[:'service_id']
357
+ acl_id = opts[:'acl_id']
358
+ # verify the required parameter 'service_id' is set
359
+ if @api_client.config.client_side_validation && service_id.nil?
360
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.list_acl_entries"
361
+ end
362
+ # verify the required parameter 'acl_id' is set
363
+ if @api_client.config.client_side_validation && acl_id.nil?
364
+ fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.list_acl_entries"
365
+ end
366
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
367
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling AclEntryApi.list_acl_entries, must be smaller than or equal to 100.'
368
+ end
369
+
370
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
371
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling AclEntryApi.list_acl_entries, must be greater than or equal to 1.'
372
+ end
373
+
374
+ allowable_values = ["ascend", "descend"]
375
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
376
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
377
+ end
378
+ # resource path
379
+ local_var_path = '/service/{service_id}/acl/{acl_id}/entries'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s))
380
+
381
+ # query parameters
382
+ query_params = opts[:query_params] || {}
383
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
384
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
385
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
386
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
387
+
388
+ # header parameters
389
+ header_params = opts[:header_params] || {}
390
+ # HTTP header 'Accept' (if needed)
391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
392
+
393
+ # form parameters
394
+ form_params = opts[:form_params] || {}
395
+
396
+ # http body (model)
397
+ post_body = opts[:debug_body]
398
+
399
+ # return_type
400
+ return_type = opts[:debug_return_type] || 'Array<AclEntryResponse>'
401
+
402
+ # auth_names
403
+ auth_names = opts[:debug_auth_names] || ['token']
404
+
405
+ new_options = opts.merge(
406
+ :operation => :"AclEntryApi.list_acl_entries",
407
+ :header_params => header_params,
408
+ :query_params => query_params,
409
+ :form_params => form_params,
410
+ :body => post_body,
411
+ :auth_names => auth_names,
412
+ :return_type => return_type
413
+ )
414
+
415
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
416
+ if @api_client.config.debugging
417
+ @api_client.config.logger.debug "API called: AclEntryApi#list_acl_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
418
+ end
419
+ return data, status_code, headers
420
+ end
421
+
422
+ # Update an ACL entry
423
+ # Update an ACL entry for a specified ACL.
424
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
425
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
426
+ # @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
427
+ # @option opts [AclEntry] :acl_entry
428
+ # @return [AclEntryResponse]
429
+ def update_acl_entry(opts = {})
430
+ data, _status_code, _headers = update_acl_entry_with_http_info(opts)
431
+ data
432
+ end
433
+
434
+ # Update an ACL entry
435
+ # Update an ACL entry for a specified ACL.
436
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
437
+ # @option opts [String] :acl_id Alphanumeric string identifying a ACL. (required)
438
+ # @option opts [String] :acl_entry_id Alphanumeric string identifying an ACL Entry. (required)
439
+ # @option opts [AclEntry] :acl_entry
440
+ # @return [Array<(AclEntryResponse, Integer, Hash)>] AclEntryResponse data, response status code and response headers
441
+ def update_acl_entry_with_http_info(opts = {})
442
+ if @api_client.config.debugging
443
+ @api_client.config.logger.debug 'Calling API: AclEntryApi.update_acl_entry ...'
444
+ end
445
+ # unbox the parameters from the hash
446
+ service_id = opts[:'service_id']
447
+ acl_id = opts[:'acl_id']
448
+ acl_entry_id = opts[:'acl_entry_id']
449
+ # verify the required parameter 'service_id' is set
450
+ if @api_client.config.client_side_validation && service_id.nil?
451
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling AclEntryApi.update_acl_entry"
452
+ end
453
+ # verify the required parameter 'acl_id' is set
454
+ if @api_client.config.client_side_validation && acl_id.nil?
455
+ fail ArgumentError, "Missing the required parameter 'acl_id' when calling AclEntryApi.update_acl_entry"
456
+ end
457
+ # verify the required parameter 'acl_entry_id' is set
458
+ if @api_client.config.client_side_validation && acl_entry_id.nil?
459
+ fail ArgumentError, "Missing the required parameter 'acl_entry_id' when calling AclEntryApi.update_acl_entry"
460
+ end
461
+ # resource path
462
+ local_var_path = '/service/{service_id}/acl/{acl_id}/entry/{acl_entry_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'acl_id' + '}', CGI.escape(acl_id.to_s)).sub('{' + 'acl_entry_id' + '}', CGI.escape(acl_entry_id.to_s))
463
+
464
+ # query parameters
465
+ query_params = opts[:query_params] || {}
466
+
467
+ # header parameters
468
+ header_params = opts[:header_params] || {}
469
+ # HTTP header 'Accept' (if needed)
470
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
471
+ # HTTP header 'Content-Type'
472
+ content_type = @api_client.select_header_content_type(['application/json'])
473
+ if !content_type.nil?
474
+ header_params['Content-Type'] = content_type
475
+ end
476
+
477
+ # form parameters
478
+ form_params = opts[:form_params] || {}
479
+
480
+ # http body (model)
481
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'acl_entry'])
482
+
483
+ # return_type
484
+ return_type = opts[:debug_return_type] || 'AclEntryResponse'
485
+
486
+ # auth_names
487
+ auth_names = opts[:debug_auth_names] || ['token']
488
+
489
+ new_options = opts.merge(
490
+ :operation => :"AclEntryApi.update_acl_entry",
491
+ :header_params => header_params,
492
+ :query_params => query_params,
493
+ :form_params => form_params,
494
+ :body => post_body,
495
+ :auth_names => auth_names,
496
+ :return_type => return_type
497
+ )
498
+
499
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug "API called: AclEntryApi#update_acl_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
502
+ end
503
+ return data, status_code, headers
504
+ end
173
505
  end
174
506
  end
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class ContentApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Check status of content in each POP's cache
21
+ # Retrieve headers and MD5 hash of the content for a particular URL from each Fastly edge server. This API is limited to 200 requests per hour.
22
+ # @option opts [String] :url Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed.
23
+ # @return [Array<Content>]
24
+ def content_check(opts = {})
25
+ data, _status_code, _headers = content_check_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # Check status of content in each POP&#39;s cache
30
+ # Retrieve headers and MD5 hash of the content for a particular URL from each Fastly edge server. This API is limited to 200 requests per hour.
31
+ # @option opts [String] :url Full URL (host and path) to check on all nodes. if protocol is omitted, http will be assumed.
32
+ # @return [Array<(Array<Content>, Integer, Hash)>] Array<Content> data, response status code and response headers
33
+ def content_check_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: ContentApi.content_check ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ # resource path
39
+ local_var_path = '/content/edge_check'
40
+
41
+ # query parameters
42
+ query_params = opts[:query_params] || {}
43
+ query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'Array<Content>'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['token']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"ContentApi.content_check",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: ContentApi#content_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
@@ -9,5 +9,5 @@ Contact: oss@fastly.com
9
9
  =end
10
10
 
11
11
  module Fastly
12
- VERSION = '4.0.0.alpha3'
12
+ VERSION = '4.0.0.alpha4'
13
13
  end
data/lib/fastly.rb CHANGED
@@ -561,6 +561,7 @@ require 'fastly/api/billing_address_api'
561
561
  require 'fastly/api/cache_settings_api'
562
562
  require 'fastly/api/condition_api'
563
563
  require 'fastly/api/contact_api'
564
+ require 'fastly/api/content_api'
564
565
  require 'fastly/api/customer_api'
565
566
  require 'fastly/api/dictionary_api'
566
567
  require 'fastly/api/dictionary_info_api'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastly
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha3
4
+ version: 4.0.0.alpha4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fastly
@@ -104,6 +104,7 @@ files:
104
104
  - docs/ContactResponse.md
105
105
  - docs/ContactResponseAllOf.md
106
106
  - docs/Content.md
107
+ - docs/ContentApi.md
107
108
  - docs/Customer.md
108
109
  - docs/CustomerApi.md
109
110
  - docs/CustomerResponse.md
@@ -690,6 +691,7 @@ files:
690
691
  - lib/fastly/api/cache_settings_api.rb
691
692
  - lib/fastly/api/condition_api.rb
692
693
  - lib/fastly/api/contact_api.rb
694
+ - lib/fastly/api/content_api.rb
693
695
  - lib/fastly/api/customer_api.rb
694
696
  - lib/fastly/api/dictionary_api.rb
695
697
  - lib/fastly/api/dictionary_info_api.rb
@@ -1312,9 +1314,6 @@ files:
1312
1314
  - lib/fastly/models/waf_tags_response_all_of.rb
1313
1315
  - lib/fastly/models/waf_tags_response_data_item.rb
1314
1316
  - lib/fastly/version.rb
1315
- - pkg/fastly-4.0.0.alpha1.gem
1316
- - pkg/fastly-4.0.0.alpha2.gem
1317
- - pkg/foo
1318
1317
  homepage: https://github.com/fastly/fastly-ruby
1319
1318
  licenses:
1320
1319
  - MIT
Binary file
Binary file
data/pkg/foo DELETED
Binary file