PHP Class SevenShores\Hubspot\Resources\Files

Inheritance: extends Resource
ファイルを表示 Open project: fungku/hubspot-php

Public Methods

Method Description
all ( array $params = [] ) : Response Get meta data for all files.
archive ( integer $file_id ) : Response Archive a file.
createFolder ( string $folder_name, integer $parent_folder_id ) : Response Create a new folder.
delete ( integer $file_id ) : Response Delete a file.
deleteFolder ( integer $folder_id ) : Response Delete a folder.
folders ( array $params = [] ) : Response List folders metadata.
getFolderById ( integer $folder_id ) : Response Get the folder by ID.
meta ( $file_id ) : Response Get file metadata.
move ( integer $file_id, array $params = [] ) : Response Move a file to a new folder.
moveFolder ( integer $folder_id, array $params = [] ) : Response Move a folder.
replace ( integer $file_id, string $file ) : Response Upload a replacement file.
updateFolder ( integer $folder_id, array $params = [] ) : Response Update a folder.
upload ( string $file, array $params = [] ) : Response Upload a new file.

Method Details

all() public method

Get meta data for all files.
public all ( array $params = [] ) : Response
$params array Optional parameters
return SevenShores\Hubspot\Http\Response

archive() public method

Archive a file.
public archive ( integer $file_id ) : Response
$file_id integer The file ID
return SevenShores\Hubspot\Http\Response

createFolder() public method

Create a new folder.
public createFolder ( string $folder_name, integer $parent_folder_id ) : Response
$folder_name string
$parent_folder_id integer
return SevenShores\Hubspot\Http\Response

delete() public method

Delete a file.
public delete ( integer $file_id ) : Response
$file_id integer The file ID
return SevenShores\Hubspot\Http\Response

deleteFolder() public method

Delete a folder.
public deleteFolder ( integer $folder_id ) : Response
$folder_id integer
return SevenShores\Hubspot\Http\Response

folders() public method

List folders metadata.
public folders ( array $params = [] ) : Response
$params array
return SevenShores\Hubspot\Http\Response

getFolderById() public method

Get the folder by ID.
public getFolderById ( integer $folder_id ) : Response
$folder_id integer
return SevenShores\Hubspot\Http\Response

meta() public method

Get file metadata.
public meta ( $file_id ) : Response
$file_id
return SevenShores\Hubspot\Http\Response

move() public method

Parameters: folder_path string The path of the folder to move the file into. Use this OR folder_id - not both. folder_id string The id of the folder to move the file into. Use this OR folder_path - not both. name string The new name of the file.
public move ( integer $file_id, array $params = [] ) : Response
$file_id integer
$params array
return SevenShores\Hubspot\Http\Response

moveFolder() public method

Move a folder.
public moveFolder ( integer $folder_id, array $params = [] ) : Response
$folder_id integer
$params array
return SevenShores\Hubspot\Http\Response

replace() public method

Upload a replacement file.
public replace ( integer $file_id, string $file ) : Response
$file_id integer The file ID
$file string The file path
return SevenShores\Hubspot\Http\Response

updateFolder() public method

Update a folder.
public updateFolder ( integer $folder_id, array $params = [] ) : Response
$folder_id integer
$params array
return SevenShores\Hubspot\Http\Response

upload() public method

Upload a new file.
public upload ( string $file, array $params = [] ) : Response
$file string File path
$params array Optional parameters
return SevenShores\Hubspot\Http\Response