Class: Imagekitio::Models::AssetListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/imagekitio/models/asset_list_params.rb,
sig/imagekitio/models/asset_list_params.rbs

Overview

See Also:

  • Imagekitio::Resources::Assets#list

Defined Under Namespace

Modules: FileType, Sort, Type

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Imagekitio

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(file_type: nil, limit: nil, path: nil, search_query: nil, skip: nil, sort: nil, type: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Imagekitio::Models::AssetListParams for more details.

Parameters:

  • file_type (Symbol, Imagekitio::Models::AssetListParams::FileType) (defaults to: nil)

    Filter results by file type.

  • limit (Integer) (defaults to: nil)

    The maximum number of results to return in response.

  • path (String) (defaults to: nil)

    Folder path if you want to limit the search within a specific folder. For exampl

  • search_query (String) (defaults to: nil)

    Query string in a Lucene-like query language e.g. createdAt > "7d".

  • skip (Integer) (defaults to: nil)

    The number of results to skip before returning results.

  • sort (Symbol, Imagekitio::Models::AssetListParams::Sort) (defaults to: nil)

    Sort the results by one of the supported fields in ascending or descending order

  • type (Symbol, Imagekitio::Models::AssetListParams::Type) (defaults to: nil)

    Filter results by asset type.

  • request_options (Imagekitio::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/imagekitio/models/asset_list_params.rb', line 79

Instance Attribute Details

#file_typeSymbol, ...

Filter results by file type.

  • all — include all file types
  • image — include only image files
  • non-image — include only non-image files (e.g., JS, CSS, video)


18
# File 'lib/imagekitio/models/asset_list_params.rb', line 18

optional :file_type, enum: -> { Imagekitio::AssetListParams::FileType }

#limitInteger?

The maximum number of results to return in response.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


24
# File 'lib/imagekitio/models/asset_list_params.rb', line 24

optional :limit, Integer

#pathString?

Folder path if you want to limit the search within a specific folder. For example, /sales-banner/ will only search in folder sales-banner.

Note : If your use case involves searching within a folder as well as its subfolders, you can use path parameter in searchQuery with appropriate operator. Checkout Supported parameters for more information.

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/imagekitio/models/asset_list_params.rb', line 37

optional :path, String

#search_queryString?

Query string in a Lucene-like query language e.g. createdAt > "7d".

Note : When the searchQuery parameter is present, the following query parameters will have no effect on the result:

  1. tags
  2. type
  3. name

Learn more from examples.

Parameters:

  • (String)

Returns:

  • (String, nil)


53
# File 'lib/imagekitio/models/asset_list_params.rb', line 53

optional :search_query, String

#skipInteger?

The number of results to skip before returning results.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


59
# File 'lib/imagekitio/models/asset_list_params.rb', line 59

optional :skip, Integer

#sortSymbol, ...

Sort the results by one of the supported fields in ascending or descending order.



66
# File 'lib/imagekitio/models/asset_list_params.rb', line 66

optional :sort, enum: -> { Imagekitio::AssetListParams::Sort }

#typeSymbol, ...

Filter results by asset type.

  • file — returns only files
  • file-version — returns specific file versions
  • folder — returns only folders
  • all — returns both files and folders (excludes file-version)


77
# File 'lib/imagekitio/models/asset_list_params.rb', line 77

optional :type, enum: -> { Imagekitio::AssetListParams::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/imagekitio/models/asset_list_params.rb', line 111

Instance Method Details

#to_hash{

Returns:

  • ({)


64
# File 'sig/imagekitio/models/asset_list_params.rbs', line 64

def to_hash: -> {