프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_config | array | ||
$_httpClient | Horde_Http_Client | HTTP client object to use for accessing the Scribd API. |
메소드 | 설명 | |
---|---|---|
__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) |
리턴 | true |
public getConversionStatus ( integer $docId ) : string | ||
$docId | integer | Document id to get status for |
리턴 | string | "DISPLAYABLE", "DONE", "ERROR", or "PROCESSING" |
public static getHttpClient ( ) : Horde_Http_Client | ||
리턴 | Horde_Http_Client |
public getList ( ) : Traversable | ||
리턴 | Traversable |
public getSettings ( integer $docId ) : array | ||
$docId | integer | Document id to get status for |
리턴 | 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 |
리턴 | 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" |
리턴 | 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 |
리턴 | 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 |
리턴 | array | [doc_id, access_key, [secret_password]] |