Methods summary
public
Ctct\Components\ResultSet
|
#
getLibraryFiles( string $accessToken, array $params = array() )
Get files from the Library
Get files from the Library
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $params
- associative array of query parameters and values to append to the request.
Allowed parameters include:
limit - Specifies the number of results displayed per page of output, from 1 - 1000, default = 50.
sort_by - Specifies how the list of files is sorted; valid sort options are:
CREATED_DATE, CREATED_DATE_DESC, MODIFIED_DATE, MODIFIED_DATE_DESC, NAME, NAME_DESC, SIZE, SIZE_DESC DIMENSION, DIMENSION_DESC
source - Specifies to retrieve files from a particular source:
ALL, MyComputer, Facebook, Instagram, Shutterstock, Mobile
next - the next link returned from a previous paginated call. May only be used by itself.
Returns
Throws
|
public
Ctct\Components\ResultSet
|
#
getLibraryFilesByFolder( string $accessToken, string $folderId, array $params = array() )
Get files from the Library in a specific Folder
Get files from the Library in a specific Folder
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $folderId
- $params
- associative array of query parameters and values to append to the request.
Allowed parameters include:
limit - Specifies the number of results displayed per page of output, from 1 - 1000, default = 50.
sort_by - Specifies how the list of files is sorted; valid sort options are:
CREATED_DATE, CREATED_DATE_DESC, MODIFIED_DATE, MODIFIED_DATE_DESC, NAME, NAME_DESC, SIZE, SIZE_DESC DIMENSION, DIMENSION_DESC
source - Specifies to retrieve files from a particular source:
ALL, MyComputer, Facebook, Instagram, Shutterstock, Mobile
next - the next link returned from a previous paginated call. May only be used by itself.
Returns
Throws
|
public
Ctct\Components\Library\File
|
#
getLibraryFile( string $accessToken, string $fileId )
Get File by Id
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $fileId
Returns
Throws
|
public
boolean
|
#
deleteLibraryFile( string $accessToken, string $fileId )
Delete a File
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $fileId
Returns
boolean
Throws
|
public
Ctct\Components\ResultSet
|
#
getLibraryFolders( string $accessToken, array $params = array() )
Get folders from the Library
Get folders from the Library
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $params
- associative array of query parameters and values to append to the request.
Allowed parameters include:
limit - Specifies the number of results displayed per page of output, from 1 - 1000, default = 50.
sort_by - Specifies how the list of files is sorted; valid sort options are:
CREATED_DATE, CREATED_DATE_DESC, MODIFIED_DATE, MODIFIED_DATE_DESC, NAME, NAME_DESC
Returns
Throws
|
public
Ctct\Components\Library\Folder
|
#
getLibraryFolder( string $accessToken, string $folderId )
Get a specific Folder
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $folderId
Returns
Throws
|
public
boolean
|
#
deleteLibraryFolder( string $accessToken, string $folderId )
Delete a Library Folder
Parameters
- $accessToken
- Constant Contact OAuth2 Access Token
- $folderId
Returns
boolean
Throws
|
public
string
|
#
uploadFile( string $accessToken, string $fileName, string $fileLocation, string $description, string $source, string $folderId )
Upload a file to the Library. Must be one of PNG, JPG, JPEG, GIF, or PDF.
The server scans files for viruses, so this returns an ID for a FileUploadStatus.
Upload a file to the Library. Must be one of PNG, JPG, JPEG, GIF, or PDF.
The server scans files for viruses, so this returns an ID for a FileUploadStatus.
Parameters
- $accessToken
- Constant Contact Oauth2 Access Token
- $fileName
- $fileLocation
- Path to the location of the file on the server
- $description
- $source
- $folderId
- Folder ID to upload file to. Set as 0 for no folder.
Returns
string File upload status ID
Throws
|
public
Ctct\Components\Library\FileUploadStatus[]
|
#
getFileUploadStatus( string $accessToken, string $uploadStatusIds )
Get the status of a File upload
Get the status of a File upload
Parameters
- $accessToken
- Constant Contact OAuth2 token
- $uploadStatusIds
- Single ID or ID's of statuses to check, separated by commas (no spaces)
Returns
Throws
|