Class: Imagekitio::Resources::Accounts::Origins
- Inherits:
-
Object
- Object
- Imagekitio::Resources::Accounts::Origins
- Defined in:
- lib/imagekitio/resources/accounts/origins.rb,
sig/imagekitio/resources/accounts/origins.rbs
Instance Method Summary collapse
-
#create(origin_request:, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Note: This API is currently in beta.
-
#delete(id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Accounts::OriginDeleteParams for more details.
-
#get(id, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Some parameter documentations has been truncated, see Models::Accounts::OriginGetParams for more details.
-
#initialize(client:) ⇒ Origins
constructor
private
A new instance of Origins.
-
#list(request_options: {}) ⇒ Array<Imagekitio::Models::Accounts::OriginResponse::S3, Imagekitio::Models::Accounts::OriginResponse::S3Compatible, Imagekitio::Models::Accounts::OriginResponse::CloudinaryBackup, Imagekitio::Models::Accounts::OriginResponse::WebFolder, Imagekitio::Models::Accounts::OriginResponse::WebProxy, Imagekitio::Models::Accounts::OriginResponse::Gcs, Imagekitio::Models::Accounts::OriginResponse::AzureBlob, Imagekitio::Models::Accounts::OriginResponse::AkeneoPim>
Note: This API is currently in beta.
-
#update(id, origin_request:, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Some parameter documentations has been truncated, see Models::Accounts::OriginUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Origins
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 Origins.
129 130 131 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 129 def initialize(client:) @client = client end |
Instance Method Details
#create(origin_request:, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Note: This API is currently in beta. Creates a new origin and returns the origin object.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 19 def create(params) parsed, = Imagekitio::Accounts::OriginCreateParams.dump_request(params) @client.request( method: :post, path: "v1/accounts/origins", body: parsed[:origin_request], model: Imagekitio::Accounts::OriginResponse, options: ) end |
#delete(id, request_options: {}) ⇒ nil
Some parameter documentations has been truncated, see Models::Accounts::OriginDeleteParams for more details.
Note: This API is currently in beta.
Permanently removes the origin identified by id. If the origin is in use by
any URL‑endpoints, the API will return an error.
93 94 95 96 97 98 99 100 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 93 def delete(id, params = {}) @client.request( method: :delete, path: ["v1/accounts/origins/%1$s", id], model: NilClass, options: params[:request_options] ) end |
#get(id, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Some parameter documentations has been truncated, see Models::Accounts::OriginGetParams for more details.
Note: This API is currently in beta.
Retrieves the origin identified by id.
117 118 119 120 121 122 123 124 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 117 def get(id, params = {}) @client.request( method: :get, path: ["v1/accounts/origins/%1$s", id], model: Imagekitio::Accounts::OriginResponse, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ Array<Imagekitio::Models::Accounts::OriginResponse::S3, Imagekitio::Models::Accounts::OriginResponse::S3Compatible, Imagekitio::Models::Accounts::OriginResponse::CloudinaryBackup, Imagekitio::Models::Accounts::OriginResponse::WebFolder, Imagekitio::Models::Accounts::OriginResponse::WebProxy, Imagekitio::Models::Accounts::OriginResponse::Gcs, Imagekitio::Models::Accounts::OriginResponse::AzureBlob, Imagekitio::Models::Accounts::OriginResponse::AkeneoPim>
Note: This API is currently in beta. Returns an array of all configured origins for the current account.
68 69 70 71 72 73 74 75 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 68 def list(params = {}) @client.request( method: :get, path: "v1/accounts/origins", model: Imagekitio::Internal::Type::ArrayOf[union: Imagekitio::Accounts::OriginResponse], options: params[:request_options] ) end |
#update(id, origin_request:, request_options: {}) ⇒ Imagekitio::Models::Accounts::OriginResponse::S3, ...
Some parameter documentations has been truncated, see Models::Accounts::OriginUpdateParams for more details.
Note: This API is currently in beta.
Updates the origin identified by id and returns the updated origin object.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/imagekitio/resources/accounts/origins.rb', line 47 def update(id, params) parsed, = Imagekitio::Accounts::OriginUpdateParams.dump_request(params) @client.request( method: :put, path: ["v1/accounts/origins/%1$s", id], body: parsed[:origin_request], model: Imagekitio::Accounts::OriginResponse, options: ) end |