Methods summary
public static
|
#
setHttpClient( Horde_Http_Client $httpClient )
Set the HTTP client instance
Set the HTTP client instance
Sets the HTTP client object to use for Scribd requests. If none is set,
the default Horde_Http_Client will be used.
Parameters
|
public static
Horde_Http_Client
|
#
getHttpClient( )
Gets the HTTP client object.
Gets the HTTP client object.
Returns
Horde_Http_Client
|
public
|
#
__construct( array $config )
Constructor
Parameters
- $config
- <p>parameters:
api_key
api_secret
session_key
my_user_id</p>
Link
|
public
array
|
#
upload( string $file, string $doc_type = null, string $access = null, integer $revId = null )
Upload a local file.
Parameters
- $file
- Local file
- $doc_type
- $docType Document type: PDF, DOC, TXT, PPT, etc.
- $access
- Document visibility. 'public' or 'private', default 'public'
- $revId
- $rev_id The doc_id to save uploaded file as a revision to
Returns
array [doc_id, access_key, [secret_password]]
|
public
array
|
#
uploadFromUrl( string $url, string $doc_type = null, string $access = null, integer $rev_id = null )
Upload a document from a publicly accessible URL.
Upload a document from a publicly accessible URL.
Parameters
- $url
- Document location
- $doc_type
- $docType Document type: PDF, DOC, TXT, PPT, etc.
- $access
- Document visibility. 'public' or 'private', default 'public'
- $rev_id
- The doc_id to save uploaded file as a revision to
Returns
array [doc_id, access_key, [secret_password]]
|
public
Traversable
|
#
getList( )
Return an iterator over the authorized user's documents.
Return an iterator over the authorized user's documents.
Returns
Traversable
|
public
string
|
#
getConversionStatus( integer $docId )
Get the current conversion status of a document.
Get the current conversion status of a document.
Parameters
- $docId
- Document id to get status for
Returns
string "DISPLAYABLE", "DONE", "ERROR", or "PROCESSING"
|
public
array
|
#
getSettings( integer $docId )
Get a document's settings
Get a document's settings
Parameters
- $docId
- Document id to get status for
Returns
array [doc_id, title, description, access, license, tags[], show_ads, access_key, thumbnail_url, secret_password]
|
public
true
|
#
changeSettings( mixed $docIds, array $settings )
Change a document's settings.
Change a document's settings.
Parameters
- $docIds
- One or more document ids to change.
- $settings
- <p>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)</p>
Returns
true
|
public
true
|
#
delete( integer $docId )
Delete a document.
Parameters
- $docId
- The document to delete
Returns
true
|
public
array
|
#
search( string $query, integer $num_results = null, integer $num_start = null, string $scope = null )
Search the Scribd database
Search the Scribd database
Parameters
- $query
- : search query
- $num_results
- : number of results to return (10 default, 1000 max)
- $num_start
- : number to start from
- $scope
- : scope of search, "all" or "user"
Returns
array of results, each of which contain doc_id, secret password, access_key, title, and description
|
public
array
|
#
login( string $username, string $password )
Log in as a user
Parameters
- $username
- : username of user to log in
- $password
- : password of user to log in
Returns
array containing session_key, name, username, and user_id of the user
|
public
array
|
#
signup( string $username, string $password, string $email, string $name = null )
Sign up a new user
Parameters
- $username
- : username of user to create
- $password
- : password of user to create
- $email
- : email address of user
- $name
- : name of user
Returns
array containing session_key, name, username, and user_id of the user
|
public
Horde_Service_Scribd_Request
|
#
newRequest( string $method, string $args = array() )
Create an API request for $method with $args
Create an API request for $method with $args
Parameters
- $method
- The API method to call.
- $args
- Method arguments
Returns
|