Skip to content

Commit fb3ee1a

Browse files
committed
refactor method name
1 parent 354b081 commit fb3ee1a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ imagekitio = ImageKitIo.client
175175
image_url = imagekitio.url({
176176
path: "/default-image.jpg",
177177
url_endpoint: "https://ik.imagekit.io/your_imagekit_id/endpoint/",
178-
transformation: [{height: "300", width: "400", raw: 'ar-4-3,q-40'}]
178+
transformation: [{height: "300", width: "400", raw: "ar-4-3,q-40"}]
179179
})
180180
```
181181

@@ -429,7 +429,7 @@ parameters to be updated.
429429

430430
```ruby
431431
imagekitio.update_file_details(
432-
file_id: 'file_id_xyz',
432+
file_id: '598821f949c0a938d57563bd',
433433
tags: ["image_tag"],
434434
custom_coordinates: "10,10,100, 100"
435435
)
@@ -617,7 +617,7 @@ imagekitio.create_custom_metadata_field(
617617
Get the custom metadata fields as per the [API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/get-custom-metadata-field)
618618

619619
```ruby
620-
imagekitio.get_custom_metadata_field(
620+
imagekitio.get_custom_metadata_fields(
621621
include_deleted: true #optional
622622
)
623623
```
@@ -629,7 +629,7 @@ Update custom metadata fields as per the [API documentation here](https://docs.i
629629
```ruby
630630
imagekitio.update_custom_metadata_field(
631631
id: '5e21880d5efe355febd4bccd', #field_id
632-
label: 'custom-price',
632+
label: 'custom-price', #Either label or schema or both should be given
633633
schema: nil
634634
)
635635
```

lib/imagekitio/api_service/folder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def create(folder_name: nil, parent_folder_path: nil)
1818
@req_obj.request('post', url, @req_obj.create_headers, payload)
1919
end
2020

21-
def delete(folder_path: nil)
21+
def delete(folder_path: nil)
2222
if folder_path == '' || folder_path.nil?
2323
raise ArgumentError, 'folder_path is required'
2424
end

lib/imagekitio/client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Client
1818
include Utils::Calculation
1919
include Constantable
2020

21-
attr_reader :file, :custom_metadata_field, :folder
21+
attr_reader :file_service, :custom_metadata_field_service, :folder_service, :bulk_service
2222

2323
def initialize(private_key, public_key, url_endpoint, transformation_pos = nil, options = nil)
2424
unless(private_key.is_a?(String) && private_key.to_s.strip.length != 0)
@@ -157,7 +157,7 @@ def create_custom_metadata_field(name: nil, label: nil, schema: {})
157157
@custom_metadata_field_service.create(name: name, label: label, schema: schema)
158158
end
159159

160-
def get_custom_metadata_field(options = {})
160+
def get_custom_metadata_fields(options = {})
161161
@custom_metadata_field_service.list(**options)
162162
end
163163

0 commit comments

Comments
 (0)