Property | Type | Description | |
---|---|---|---|
$_config | array | ||
$_httpClient | Horde_Http_Client | HTTP client object to use for accessing the Scribd API. |
Method | Description | |
---|---|---|
__construct ( $config ) | Constructor | |
changeSettings ( mixed $docIds, array $settings ) : true | Change a document's settings. | |
delete ( integer $docId ) : true | Delete a document. | |
getConversionStatus ( integer $docId ) : string | Get the current conversion status of a document. | |
getHttpClient ( ) : Horde_Http_Client | Gets the HTTP client object. | |
getList ( ) : Traversable | Return an iterator over the authorized user's documents. | |
getSettings ( integer $docId ) : array | Get a document's settings | |
login ( string $username, string $password ) : array | Log in as a user | |
newRequest ( string $method, string $args = [] ) : Horde_Service_Scribd_Request | Create an API request for $method with $args | |
search ( string $query, integer $num_results = null, integer $num_start = null, string $scope = null ) : array | Search the Scribd database | |
setHttpClient ( Horde_Http_Client $httpClient ) | Set the HTTP client instance | |
signup ( string $username, string $password, string $email, string $name = null ) : array | Sign up a new user | |
upload ( string $file, $doc_type = null, string $access = null, $revId = null ) : array | Upload a local file. | |
uploadFromUrl ( string $url, $doc_type = null, string $access = null, integer $rev_id = null ) : array | Upload a document from a publicly accessible URL. |
public changeSettings ( mixed $docIds, array $settings ) : true | ||
$docIds | mixed | One or more document ids to change. |
$settings | array | The values to set for each $docId. Possible keys: title: string description: string access: ["public", "private"] license: ["by", "by-nc", "by-nc-nd", "by-nc-sa", "by-nd", "by-sa", "c", "pd" show_ads: ["default", "true", "false"] link_back_url: string tags: comma-separated stringlist (or PHP array) |
return | true |
public getConversionStatus ( integer $docId ) : string | ||
$docId | integer | Document id to get status for |
return | string | "DISPLAYABLE", "DONE", "ERROR", or "PROCESSING" |
public static getHttpClient ( ) : Horde_Http_Client | ||
return | Horde_Http_Client |
public getList ( ) : Traversable | ||
return | Traversable |
public getSettings ( integer $docId ) : array | ||
$docId | integer | Document id to get status for |
return | array | [doc_id, title, description, access, license, tags[], show_ads, access_key, thumbnail_url, secret_password] |
public newRequest ( string $method, string $args = [] ) : Horde_Service_Scribd_Request | ||
$method | string | The API method to call. |
$args | string | Method arguments |
return | Horde_Service_Scribd_Request |
public search ( string $query, integer $num_results = null, integer $num_start = null, string $scope = null ) : array | ||
$query | string | : search query |
$num_results | integer | : number of results to return (10 default, 1000 max) |
$num_start | integer | : number to start from |
$scope | string | : scope of search, "all" or "user" |
return | array | of results, each of which contain doc_id, secret password, access_key, title, and description |
public static setHttpClient ( Horde_Http_Client $httpClient ) | ||
$httpClient | Horde_Http_Client |
public signup ( string $username, string $password, string $email, string $name = null ) : array | ||
$username | string | : username of user to create |
$password | string | : password of user to create |
string | : email address of user | |
$name | string | : name of user |
return | array | containing session_key, name, username, and user_id of the user |
public uploadFromUrl ( string $url, $doc_type = null, string $access = null, integer $rev_id = null ) : array | ||
$url | string | Document location |
$access | string | Document visibility. 'public' or 'private', default 'public' |
$rev_id | integer | The doc_id to save uploaded file as a revision to |
return | array | [doc_id, access_key, [secret_password]] |