Version 1.1 - Updated on 6/16/2016
public function __construct($clientKey = null,$clientSecret = null,$callbackUrl = null)
Instantiates a new SDK super-class object.
$clientKey
- Key$clientSecret
-Secret$callbackUrl
- Callback URLException
public function get($service, $method, array $params = [], $accessToken = null )
Sends a GET request to SDK and returns the result.
$accessToken
— AccessToken|string|null
SDKException
public function getAuthorize()
Helper function to create authorization URL.
public function getAuthorizeRedirection()
Redirects to the authorization URL.
public function getToken($code)
Retrieves new Access and Refresh tokens.
public function loggedIn()
public function updateAccesToken($refreshtoken)
Updates expired access token with new access token.
$refreshtoken
- Refresh tokenSDKException
public function getAccount()
Retrieves account information.
SDKException
public function getContactInfo()
Retrieves contact information.
SDKException
public function copy($source = null,$target = null ,$safe = null,$conflictsolve = null,$override = null)
Creates a copy files or folders.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.$override
- Specifies what happens when a folder of the same name already exists at the specified path:SDKException
NOTE:
You cannot perform the copy
operation on a virutal folder.
public function createFolder($name = null,$path = null ,$override = null)
Creates a folder in the user’s Cloud Storage.
$name
- Name of the folder$path
- Destination of the folder.$override
- Specifies what happens when a folder of the same name already exists at the specified path:SDKException
NOTE:
You cannot perform the createFolder
operation on a virutal folder.
public function deleteData($path = null ,$purge = null)
Deletes a file or a folder.
$path
- Path to a file or folder to be deleted$purge
- boolean valueSDKException
NOTE:
You cannot perform the deleteData
operation on a virutal folder.
public function deltaView($virtualfolder= null,$xHeaderETag = null)
Retrieves a list of all files and folders changed after ETag.
$virtualfolder
- Virtual Folder$xHeaderETag
- X Header ETag received from full view API callSDKException
public function getFileContent($path = null)
Retrieves file content.
$path
- Full file pathSDKException
public function getFullview()
Retrieves a list of all files and folders.
SDKException
public function getMetadata($path,$includeDeleted,$sort, $start, $count, $filter)
Retrieves file or folder metadata.
$path
- Folder path$includeDeleted
- boolean$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.$filter
- For folders, indicates if only file or folder children will be included in the response. Valid values are folder and file.SDKException
public function getSearch($queryString,$sort, $start, $count)
Retrieves search results matching a query.
$queryString
$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.SDKException
public function getThumbnail($contenttoken, $size= null, $th = null, $tw = null)
Retrieves thumbnail images of requested files.
$contenttoken
- Content token$size
- Thumbnail size$th
- Thumbnail height$tw
- Thumbnail widthSDKException
public function move($source = null,$target = null ,$safe = null,$conflictsolve = null)
Moves files or folders.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.SDKException
NOTE:
You cannot perform the move
operation on a virutal folder.
public function rename($source = null,$target = null ,$safe = null,$conflictsolve = null)
Renames a file or a folder.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.SDKException
NOTE:
You cannot perform the rename
operation on a virutal folder.
public function updateMetadata($name = null, $value = null, $uri = null)
Updates metadata for a file or folder.
$name
- Name of the metadata attribute$value
- Value to be updated$uri
- URI of the file pathSDKException
NOTE:
You cannot perform the file upload operation on a virutal folder.
public function commitUpload($commiturl = null)
Commits file upload when chunk is set to true in fileUploadIntent
function.
$commiturl
- Commit URL returned from fileUploadIntent
function.SDKException
public function fileUploadIntent($path = null,$name = null,$size = null,$checksum = null,$chunk = false)
Initiates file upload.
$path
- File path$name
- File name$size
- File size$checksum
-SHA-256 checksum for the file’s binary content.$chunk
- true indicates chunked upload.SDKException
public function uploadChunkData($uploadurl,$offset,$filepath)
Completes file upload process if chunk
is set to true.
$uploadurl
- Upload URL returned from fileUploadIntent
function.$offset
- File offset$filepath
- Full path of the fileSDKException
public function uploadCompleteData($uploadurl,$checksum,$filepath)
Completes file upload process when chunk
is set to false.
$uploadurl
- Upload URL returned from fileUploadIntent function
.$checksum
- SHA-256 checksum for the file’s binary content.$filepath
- Full path of the fileSDKException
public function addPlaylistItems($playlistuid = null, $playlistItems = null)
Adds items to a playlist.
$playlistuid
- UID of the playlist$playlistItems
- Playlist itemsSDKException
public function createPlaylist($name = null, $paths= null, $type = null)
Creates a playlist.
$name
- Name of the playlist$paths
- Path of the playlist$type
- Type of the playlistSDKException
public function deletePlaylist($playlistuid = null)
Deletes a playlist.
$playlistuid
- UID of the playlistSDKException
public function deletePlaylistItem($playlistuid = null, $itemUid = null)
Deletes an item from the playlist.
$playlistuid
- UID of the playlist$itemUid
- UID of the item to be deletedSDKException
public function getPlaylistDefinition($playlistUid = null)
Retrieves definition and type of a playlist.
$playlistUid
- UID of the playlistSDKException
public function getPlaylistItemContent($playlistUid = null, $itemUid = null)
Retrieves information about an item in a play list.
$playlistUid
- UID of the playlist$itemUid
- UID of the itemSDKException
public function getPlaylistItems($playlistUid = null)
Retrieves items in a playlist.
$playlistUid
- UID of the playlistSDKException
public function getPlaylists()
Retrieves a list of playlists.
SDKException
public function updatePlaylist($playlistuid = null ,$name = null ,$type = null)
Sends a request to SDK and returns the result.
$playlistuid
- UID of the playlist$type
- Playlist type to be updatedSDKException
public function updatePlaylistDefinition($playlistuid = null, $name = null, $paths = null, $type = null)
Updates playlist definition.
$playlistuid
- UID of the playlist$name
- Playlist name to be updated$paths
- Path of the playlist to be updated$type
- Type of the playlist to be updatedSDKException
public function purgeTrash($virtualfolder)
Deletes items from trash.
$virtualfolder
- Name of the virtual folderSDKException
public function restoreTrash($path)
Restores items from trash.
$path
- Path of the item to be restored.SDKException
public function trash($virtualfolder = null, $sort = null, $start = null, $count = null, $filter = null, $deep = null)
Deletes files and folders from user’s Cloud Storage Account.
$virtualfolder
- Name of the virtual folder$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.$filter
- For folders, indicates if only file or folder children will be included in the response. Valid values are folder and file.$deep
SDKException
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.
Version 1.1 - Updated on 6/16/2016
public function __construct($clientKey = null,$clientSecret = null,$callbackUrl = null)
Instantiates a new SDK super-class object.
$clientKey
- Key$clientSecret
-Secret$callbackUrl
- Callback URLException
public function get($service, $method, array $params = [], $accessToken = null )
Sends a GET request to SDK and returns the result.
$accessToken
— AccessToken|string|null
SDKException
public function getAuthorize()
Helper function to create authorization URL.
public function getAuthorizeRedirection()
Redirects to the authorization URL.
public function getToken($code)
Retrieves new Access and Refresh tokens.
public function loggedIn()
public function updateAccesToken($refreshtoken)
Updates expired access token with new access token.
$refreshtoken
- Refresh tokenSDKException
public function getAccount()
Retrieves account information.
SDKException
public function getContactInfo()
Retrieves contact information.
SDKException
public function copy($source = null,$target = null ,$safe = null,$conflictsolve = null,$override = null)
Creates a copy files or folders.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.$override
- Specifies what happens when a folder of the same name already exists at the specified path:SDKException
NOTE:
You cannot perform the copy
operation on a virutal folder.
public function createFolder($name = null,$path = null ,$override = null)
Creates a folder in the user’s Cloud Storage.
$name
- Name of the folder$path
- Destination of the folder.$override
- Specifies what happens when a folder of the same name already exists at the specified path:SDKException
NOTE:
You cannot perform the createFolder
operation on a virutal folder.
public function deleteData($path = null ,$purge = null)
Deletes a file or a folder.
$path
- Path to a file or folder to be deleted$purge
- boolean valueSDKException
NOTE:
You cannot perform the deleteData
operation on a virutal folder.
public function deltaView($virtualfolder= null,$xHeaderETag = null)
Retrieves a list of all files and folders changed after ETag.
$virtualfolder
- Virtual Folder$xHeaderETag
- X Header ETag received from full view API callSDKException
public function getFileContent($path = null)
Retrieves file content.
$path
- Full file pathSDKException
public function getFullview()
Retrieves a list of all files and folders.
SDKException
public function getMetadata($path,$includeDeleted,$sort, $start, $count, $filter)
Retrieves file or folder metadata.
$path
- Folder path$includeDeleted
- boolean$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.$filter
- For folders, indicates if only file or folder children will be included in the response. Valid values are folder and file.SDKException
public function getSearch($queryString,$sort, $start, $count)
Retrieves search results matching a query.
$queryString
$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.SDKException
public function getThumbnail($contenttoken, $size= null, $th = null, $tw = null)
Retrieves thumbnail images of requested files.
$contenttoken
- Content token$size
- Thumbnail size$th
- Thumbnail height$tw
- Thumbnail widthSDKException
public function move($source = null,$target = null ,$safe = null,$conflictsolve = null)
Moves files or folders.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.SDKException
NOTE:
You cannot perform the move
operation on a virutal folder.
public function rename($source = null,$target = null ,$safe = null,$conflictsolve = null)
Renames a file or a folder.
$source
- Source location of file or folder$target
- Destination location of file or folder$safe
- If false, overwrites any existing file or folder in the target location. If true, uses conflictSolve
param to resolve target conflicts. Default is false.$conflictsolve
- If null, operation fails if the target file or folder already exists. If set to ConflictSolveType.copy, a non-conflicting target name is generated.SDKException
NOTE:
You cannot perform the rename
operation on a virutal folder.
public function updateMetadata($name = null, $value = null, $uri = null)
Updates metadata for a file or folder.
$name
- Name of the metadata attribute$value
- Value to be updated$uri
- URI of the file pathSDKException
NOTE:
You cannot perform the file upload operation on a virutal folder.
public function commitUpload($commiturl = null)
Commits file upload when chunk is set to true in fileUploadIntent
function.
$commiturl
- Commit URL returned from fileUploadIntent
function.SDKException
public function fileUploadIntent($path = null,$name = null,$size = null,$checksum = null,$chunk = false)
Initiates file upload.
$path
- File path$name
- File name$size
- File size$checksum
-SHA-256 checksum for the file’s binary content.$chunk
- true indicates chunked upload.SDKException
public function uploadChunkData($uploadurl,$offset,$filepath)
Completes file upload process if chunk
is set to true.
$uploadurl
- Upload URL returned from fileUploadIntent
function.$offset
- File offset$filepath
- Full path of the fileSDKException
public function uploadCompleteData($uploadurl,$checksum,$filepath)
Completes file upload process when chunk
is set to false.
$uploadurl
- Upload URL returned from fileUploadIntent function
.$checksum
- SHA-256 checksum for the file’s binary content.$filepath
- Full path of the fileSDKException
public function addPlaylistItems($playlistuid = null, $playlistItems = null)
Adds items to a playlist.
$playlistuid
- UID of the playlist$playlistItems
- Playlist itemsSDKException
public function createPlaylist($name = null, $paths= null, $type = null)
Creates a playlist.
$name
- Name of the playlist$paths
- Path of the playlist$type
- Type of the playlistSDKException
public function deletePlaylist($playlistuid = null)
Deletes a playlist.
$playlistuid
- UID of the playlistSDKException
public function deletePlaylistItem($playlistuid = null, $itemUid = null)
Deletes an item from the playlist.
$playlistuid
- UID of the playlist$itemUid
- UID of the item to be deletedSDKException
public function getPlaylistDefinition($playlistUid = null)
Retrieves definition and type of a playlist.
$playlistUid
- UID of the playlistSDKException
public function getPlaylistItemContent($playlistUid = null, $itemUid = null)
Retrieves information about an item in a play list.
$playlistUid
- UID of the playlist$itemUid
- UID of the itemSDKException
public function getPlaylistItems($playlistUid = null)
Retrieves items in a playlist.
$playlistUid
- UID of the playlistSDKException
public function getPlaylists()
Retrieves a list of playlists.
SDKException
public function updatePlaylist($playlistuid = null ,$name = null ,$type = null)
Sends a request to SDK and returns the result.
$playlistuid
- UID of the playlist$type
- Playlist type to be updatedSDKException
public function updatePlaylistDefinition($playlistuid = null, $name = null, $paths = null, $type = null)
Updates playlist definition.
$playlistuid
- UID of the playlist$name
- Playlist name to be updated$paths
- Path of the playlist to be updated$type
- Type of the playlist to be updatedSDKException
public function purgeTrash($virtualfolder)
Deletes items from trash.
$virtualfolder
- Name of the virtual folderSDKException
public function restoreTrash($path)
Restores items from trash.
$path
- Path of the item to be restored.SDKException
public function trash($virtualfolder = null, $sort = null, $start = null, $count = null, $filter = null, $deep = null)
Deletes files and folders from user’s Cloud Storage Account.
$virtualfolder
- Name of the virtual folder$sort
- Sort order for folder response. Syntax is: {field}+{asc or desc}
. Valid values are: name, type, versionCreated, size, extension, album, artist, captureDate, compilation, contentType, creationDate, favorite, genre, height, modificationDate, priority, source, tags, title, timelineDate.$start
- The starting page to return in a paginated response. Defaults to 1.$count
- The maximum items to return. Defaults to 20, maximum value is 100.$filter
- For folders, indicates if only file or folder children will be included in the response. Valid values are folder and file.$deep
SDKException
Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.