Package io.imagekit.lib
Class Helper
-
- All Implemented Interfaces:
-
io.imagekit.lib.HelperService
public final class Helper implements HelperService
Helper service containing utility methods for ImageKit SDK operations like URL building, transformation string generation, and authentication parameter generation.
-
-
Method Summary
Modifier and Type Method Description StringbuildUrl(SrcOptions options)Builds a URL with the given options including transformations. StringbuildTransformationString(List<Transformation> transformations)Builds a transformation string from the given transformations. Map<String, Object>getAuthenticationParameters(String token, Long expire)Generates authentication parameters for client-side file uploads. final static Helpercreate(String privateKey)Creates a new Helper instance with the given private key. final static Helpercreate(ClientOptions options)Creates a new Helper instance from ClientOptions. -
-
Constructor Detail
-
Helper
Helper(String privateKey)
-
-
Method Detail
-
buildUrl
String buildUrl(SrcOptions options)
Builds a URL with the given options including transformations.
- Parameters:
options- The source options for URL generation- Returns:
The generated URL string
-
buildTransformationString
String buildTransformationString(List<Transformation> transformations)
Builds a transformation string from the given transformations.
- Parameters:
transformations- The list of transformations- Returns:
The transformation string
-
getAuthenticationParameters
Map<String, Object> getAuthenticationParameters(String token, Long expire)
Generates authentication parameters for client-side file uploads.
- Parameters:
token- Optional custom token.expire- Optional expiration timestamp in seconds.- Returns:
Map containing token, expire, and signature
-
create
final static Helper create(String privateKey)
Creates a new Helper instance with the given private key.
- Parameters:
privateKey- The private API key from ImageKit dashboard- Returns:
A new Helper instance
-
create
final static Helper create(ClientOptions options)
Creates a new Helper instance from ClientOptions.
- Parameters:
options- The client options containing the private key- Returns:
A new Helper instance
-
-
-
-