-
Notifications
You must be signed in to change notification settings - Fork 14
ImageKit
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
Imagekit Class
| Name | Description |
|---|---|
| __construct | ImageKit Client Constructor |
| bulkAddTags | Add tags to multiple files in a single request. The method accepts an array of fileIDs of the files and an |
| array of tags that have to be added to those files. | |
| bulkDeleteFiles | Delete multiple files. The method accepts an array of file IDs of the files that have to be deleted. |
| bulkFileDeleteByIds | Delete multiple files. The method accepts an array of file IDs of the files that have to be deleted. |
| bulkRemoveTags | Remove tags to multiple files in a single request. The method accepts an array of fileIDs of the files and an |
| array of tags that have to be removed to those files. | |
| copyFile | This will copy a file from one location to another. This method accepts the source file's path and destination |
| folder path. | |
| copyFolder | This will copy a folder from one location to another. This method accepts the source folder's path |
| and destination folder path. | |
| createFolder | This will create a new folder. This method accepts folder name and parent folder path. |
| deleteFile | You can programmatically delete uploaded files in media library using delete file API. |
| deleteFolder | This will delete the specified folder and all nested files & folders. |
| getAuthenticationParameters | |
| getBulkJobStatus | This endpoint allows you to get the status of a bulk operation e.g. copy or move folder API. |
| getDetails | Get the file details such as tags, customCoordinates, and isPrivate properties using get file detail API. |
| getFileDetails | Get the file details such as tags, customCoordinates, and isPrivate properties using get file detail API. |
| getFileMetaData | Get image exif, pHash and other metadata for uploaded files in ImageKit.io media library using this API. |
| getFileMetadataFromRemoteURL | Get image exif, pHash and other metadata for uploaded files in ImageKit.io powered remote URL using this API. |
| getMetaData | Get image exif, pHash and other metadata for uploaded files in ImageKit.io media library using this API. |
| getPurgeCacheStatus | Get the status of submitted purge request. |
| listFiles | This API can list all the uploaded files in your ImageKit.io media library. |
| moveFile | This will move a file from one location to another. This method accepts the source file's path and destination |
| folder path. | |
| moveFolder | This will move a folder from one location to another. This method accepts the source folder's path |
| and destination folder path. | |
| pHashDistance | Using pHash to find similar or duplicate images |
| The hamming distance between two pHash values determines how similar or different the images are. | |
| purgeCache | This will purge CDN and ImageKit.io internal cache. |
| purgeCacheApi | This will purge CDN and ImageKit.io internal cache. |
| purgeCacheApiStatus | Get the status of submitted purge request. |
| purgeFileCacheApi | This will purge CDN and ImageKit.io internal cache. |
| purgeFileCacheApiStatus | Get the status of submitted purge request. |
| renameFile | This will rename a file. This method accepts the source file's path, new file name and an optional parameter |
| boolean to purge cache | |
| updateDetails | Update file details such as tags and customCoordinates attribute using update file detail API. |
| updateFileDetails | Update file details such as tags and customCoordinates attribute using update file detail API. |
| upload | You can upload files to ImageKit.io media library from your server-side using private API key authentication. |
| uploadFile | You can upload files to ImageKit.io media library from your server-side using private API key authentication. |
| uploadFiles | You can upload files to ImageKit.io media library from your server-side using private API key authentication. |
| url | You can add multiple origins in the same ImageKit.io account. |
Description
public __construct (string $publicKey, string $privateKey, string $urlEndpoint, string $transformationPosition)ImageKit Client Constructor
Parameters
-
(string) $publicKey: The Public Key as obtained from the imagekit developer dashboard -
(string) $privateKey: The Private Key as obtained from the imagekit developer dashboard -
(string) $urlEndpoint: The URL Endpoint as obtained from the imagekit developer dashboard -
(string) $transformationPosition: Default value is path that places the transformation string as a path parameter in the URL. Can also be specified as query which adds the transformation string as the query parameter tr in the URL. If you use src parameter to create the URL, then the transformation string is always added as a query parameter.
Return Values
void
Description
public bulkAddTags (array<int,string> $fileIds, array<int,string> $tags)Add tags to multiple files in a single request. The method accepts an array of fileIDs of the files and an array of tags that have to be added to those files.
Parameters
(array<int,string>) $fileIds(array<int,string>) $tags
Return Values
\Response
Description
public bulkDeleteFiles ( $fileIds)Delete multiple files. The method accepts an array of file IDs of the files that have to be deleted.
Parameters
() $fileIds
Return Values
\Response
Description
public bulkFileDeleteByIds ( $options)Delete multiple files. The method accepts an array of file IDs of the files that have to be deleted.
Parameters
() $options
Return Values
\Response
Description
public bulkRemoveTags (array<int,string> $fileIds, array<int,string> $tags)Remove tags to multiple files in a single request. The method accepts an array of fileIDs of the files and an array of tags that have to be removed to those files.
Parameters
(array<int,string>) $fileIds(array<int,string>) $tags
Return Values
\Response
Description
public copyFile ( $sourceFilePath, $destinationPath)This will copy a file from one location to another. This method accepts the source file's path and destination folder path.
Parameters
() $sourceFilePath() $destinationPath
Return Values
\Response
Description
public copyFolder ( $sourceFolderPath, $destinationPath)This will copy a folder from one location to another. This method accepts the source folder's path and destination folder path.
Parameters
() $sourceFolderPath() $destinationPath
Return Values
\Response
Description
public createFolder ( $folderName, $parentFolderPath)This will create a new folder. This method accepts folder name and parent folder path.
Parameters
() $folderName() $parentFolderPath
Return Values
\Response
Description
public deleteFile ( $fileId)You can programmatically delete uploaded files in media library using delete file API.
Parameters
() $fileId
Return Values
\Response
Description
public deleteFolder ( $folderPath)This will delete the specified folder and all nested files & folders.
This method accepts the full path of the folder that is to be deleted.
Parameters
() $folderPath
Return Values
\Response
Description
getAuthenticationParameters (void)Parameters
This function has no parameters.
Return Values
void
Description
public getBulkJobStatus ( $jobId)This endpoint allows you to get the status of a bulk operation e.g. copy or move folder API.
Parameters
() $jobId
Return Values
\Response
Description
public getDetails (string $fileId)Get the file details such as tags, customCoordinates, and isPrivate properties using get file detail API.
Parameters
(string) $fileId
Return Values
\Response
Description
public getFileDetails (string $fileId)Get the file details such as tags, customCoordinates, and isPrivate properties using get file detail API.
Parameters
(string) $fileId
Return Values
\Response
Description
public getFileMetaData (string $fileId)Get image exif, pHash and other metadata for uploaded files in ImageKit.io media library using this API.
Parameters
-
(string) $fileId: The unique fileId of the uploaded file. fileId is returned in list files API and upload API
Return Values
\Response
Description
public getFileMetadataFromRemoteURL ( $url)Get image exif, pHash and other metadata for uploaded files in ImageKit.io powered remote URL using this API.
Parameters
() $url
Return Values
\Response
Description
public getMetaData (string $fileId)Get image exif, pHash and other metadata for uploaded files in ImageKit.io media library using this API.
Parameters
-
(string) $fileId: The unique fileId of the uploaded file. fileId is returned in list files API and upload API
Return Values
\Response
Description
public getPurgeCacheStatus ( $requestId)Get the status of submitted purge request.
Parameters
() $requestId
Return Values
\Response
Description
public listFiles (array $parameters)This API can list all the uploaded files in your ImageKit.io media library.
For searching and filtering, you can use query parameters as described below.
Parameters
(array) $parameters
Return Values
\Response
Description
public moveFile ( $sourceFilePath, $destinationPath)This will move a file from one location to another. This method accepts the source file's path and destination folder path.
Parameters
() $sourceFilePath() $destinationPath
Return Values
\Response
Description
public moveFolder ( $sourceFolderPath, $destinationPath)This will move a folder from one location to another. This method accepts the source folder's path and destination folder path.
Parameters
() $sourceFolderPath() $destinationPath
Return Values
\Response
Description
public pHashDistance (string $firstPHash, string $secondPHash)Using pHash to find similar or duplicate images The hamming distance between two pHash values determines how similar or different the images are.
The pHash value returned by ImageKit.io metadata API is a hexadecimal string of 64bit pHash. The distance between two hash can be between 0 and 64. A lower distance means similar images. If the distance is 0, that means two images are identical.
Parameters
(string) $firstPHash(string) $secondPHash
Return Values
int
Description
public purgeCache ( $options)This will purge CDN and ImageKit.io internal cache.
Parameters
() $options
Return Values
\Response
Description
public purgeCacheApi ( $options)This will purge CDN and ImageKit.io internal cache.
Parameters
() $options
Return Values
\Response
Description
public purgeCacheApiStatus ( $requestId)Get the status of submitted purge request.
Parameters
() $requestId
Return Values
\Response
Description
public purgeFileCacheApi ( $options)This will purge CDN and ImageKit.io internal cache.
Parameters
() $options
Return Values
\Response
Description
public purgeFileCacheApiStatus ( $requestId)Get the status of submitted purge request.
Parameters
() $requestId
Return Values
\Response
Description
public renameFile ( $filePath, $newFileName, $purgeCache)This will rename a file. This method accepts the source file's path, new file name and an optional parameter boolean to purge cache
Parameters
() $filePath() $newFileName() $purgeCache
Return Values
\Response
Description
public updateDetails (string $fileId, array $updateData)Update file details such as tags and customCoordinates attribute using update file detail API.
Parameters
-
(string) $fileId: The unique fileId of the uploaded file. fileId is returned in list files API and upload API (array) $updateData
Return Values
\Response
Description
public updateFileDetails (string $fileId, array $updateData)Update file details such as tags and customCoordinates attribute using update file detail API.
Parameters
-
(string) $fileId: The unique fileId of the uploaded file. fileId is returned in list files API and upload API (array) $updateData
Return Values
\Response
Description
public upload (array $options)You can upload files to ImageKit.io media library from your server-side using private API key authentication.
File size limit The maximum upload file size is limited to 25MB.
Parameters
(array) $options
Return Values
object
Description
public uploadFile (array $options)You can upload files to ImageKit.io media library from your server-side using private API key authentication.
File size limit The maximum upload file size is limited to 25MB.
Parameters
(array) $options
Return Values
\Response
Description
public uploadFiles (array $options)You can upload files to ImageKit.io media library from your server-side using private API key authentication.
File size limit The maximum upload file size is limited to 25MB.
Parameters
(array) $options
Return Values
\Response
Description
public url (array $options)You can add multiple origins in the same ImageKit.io account.
URL endpoints allow you to configure which origins are accessible through your account and set their preference order as well.
Parameters
(array) $options
Return Values
string