Class: Imagekitio::Resources::Accounts::URLEndpoints
- Inherits:
-
Object
- Object
- Imagekitio::Resources::Accounts::URLEndpoints
- Defined in:
- lib/imagekitio/resources/accounts/url_endpoints.rb
Instance Method Summary collapse
-
#create(description: , origins: nil, url_prefix: nil, url_rewriter: nil, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointCreateParams for more details.
-
#delete(id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointDeleteParams for more details.
-
#get(id, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointGetParams for more details.
-
#initialize(client:) ⇒ URLEndpoints
constructor
private
A new instance of URLEndpoints.
-
#list(request_options: {}) ⇒ Array<Imagekitio::Models::Accounts::URLEndpointResponse>
Note: This API is currently in beta.
-
#update(id, description: , origins: nil, url_prefix: nil, url_rewriter: nil, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ URLEndpoints
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of URLEndpoints.
145 146 147 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 145 def initialize(client:) @client = client end |
Instance Method Details
#create(description: , origins: nil, url_prefix: nil, url_rewriter: nil, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointCreateParams for more details.
Note: This API is currently in beta. Creates a new URL‑endpoint and returns the resulting object.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 28 def create(params) parsed, = Imagekitio::Accounts::URLEndpointCreateParams.dump_request(params) @client.request( method: :post, path: "v1/accounts/url-endpoints", body: parsed, model: Imagekitio::Accounts::URLEndpointResponse, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointDeleteParams for more details.
Note: This API is currently in beta. Deletes the URL‑endpoint identified by ‘id`. You cannot delete the default URL‑endpoint created by ImageKit during account creation.
109 110 111 112 113 114 115 116 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 109 def delete(id, params = {}) @client.request( method: :delete, path: ["v1/accounts/url-endpoints/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#get(id, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointGetParams for more details.
Note: This API is currently in beta. Retrieves the URL‑endpoint identified by ‘id`.
133 134 135 136 137 138 139 140 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 133 def get(id, params = {}) @client.request( method: :get, path: ["v1/accounts/url-endpoints/%1$s", id], model: Imagekitio::Accounts::URLEndpointResponse, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ Array<Imagekitio::Models::Accounts::URLEndpointResponse>
Note: This API is currently in beta. Returns an array of all URL‑endpoints configured including the default URL-endpoint generated by ImageKit during account creation.
84 85 86 87 88 89 90 91 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 84 def list(params = {}) @client.request( method: :get, path: "v1/accounts/url-endpoints", model: Imagekitio::Internal::Type::ArrayOf[Imagekitio::Accounts::URLEndpointResponse], options: params[:request_options] ) end |
#update(id, description: , origins: nil, url_prefix: nil, url_rewriter: nil, request_options: {}) ⇒ Imagekitio::Models::Accounts::URLEndpointResponse
Some parameter documentations has been truncated, see Models::Accounts::URLEndpointUpdateParams for more details.
Note: This API is currently in beta. Updates the URL‑endpoint identified by ‘id` and returns the updated object.
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/imagekitio/resources/accounts/url_endpoints.rb', line 62 def update(id, params) parsed, = Imagekitio::Accounts::URLEndpointUpdateParams.dump_request(params) @client.request( method: :put, path: ["v1/accounts/url-endpoints/%1$s", id], body: parsed, model: Imagekitio::Accounts::URLEndpointResponse, options: ) end |