PHP 클래스 Horde_Service_Scribd, horde

저자: Chuck Hagenbuch ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( $config )

changeSettings() 공개 메소드

Change a document's settings.
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

delete() 공개 메소드

Delete a document.
public delete ( integer $docId ) : true
$docId integer The document to delete
리턴 true

getConversionStatus() 공개 메소드

Get the current conversion status of a document.
public getConversionStatus ( integer $docId ) : string
$docId integer Document id to get status for
리턴 string "DISPLAYABLE", "DONE", "ERROR", or "PROCESSING"

getHttpClient() 공개 정적인 메소드

Gets the HTTP client object.
public static getHttpClient ( ) : Horde_Http_Client
리턴 Horde_Http_Client

getList() 공개 메소드

Return an iterator over the authorized user's documents.
public getList ( ) : Traversable
리턴 Traversable

getSettings() 공개 메소드

Get a document's settings
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]

login() 공개 메소드

Log in as a user
public login ( string $username, string $password ) : array
$username string : username of user to log in
$password string : password of user to log in
리턴 array containing session_key, name, username, and user_id of the user

newRequest() 공개 메소드

Create an API request for $method with $args
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

setHttpClient() 공개 정적인 메소드

Sets the HTTP client object to use for Scribd requests. If none is set, the default Horde_Http_Client will be used.
public static setHttpClient ( Horde_Http_Client $httpClient )
$httpClient Horde_Http_Client

signup() 공개 메소드

Sign up a new user
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
$email string : email address of user
$name string : name of user
리턴 array containing session_key, name, username, and user_id of the user

upload() 공개 메소드

Upload a local file.
public upload ( string $file, $doc_type = null, string $access = null, $revId = null ) : array
$file string Local file
$access string Document visibility. 'public' or 'private', default 'public'
리턴 array [doc_id, access_key, [secret_password]]

uploadFromUrl() 공개 메소드

Upload a document from a publicly accessible URL.
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]]

프로퍼티 상세

$_config 보호되어 있는 프로퍼티

protected array $_config
리턴 array

$_httpClient 보호되어 있는 정적으로 프로퍼티

HTTP client object to use for accessing the Scribd API.
protected static Horde_Http_Client $_httpClient
리턴 Horde_Http_Client