Services_Scribd
[ class tree: Services_Scribd ] [ index: Services_Scribd ] [ all elements ]

Class: Services_Scribd_Collections

Source Location: /Services_Scribd-0.2.0/Services/Scribd/Collections.php

Class Overview

Services_Scribd
   |
   --Services_Scribd_Common
      |
      --Services_Scribd_Collections

The interface for the "collections" API endpoints. Provides all interaction that is associated with a collection of documents, such as creating and deleting collections as well as adding and removing documents to those collections.


Author(s):

Copyright:

  • 2013 Rich Schumacher <rich.schu@gmail.com>

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Scribd_Common

Services_Scribd_Common::__construct()
Prevents calls from bubbling up to Serices_Scribd::_construct()
Services_Scribd_Common::call()
Builds, sends, and returns the response for an API request
Services_Scribd_Common::getAvailableEndpoints()
Returns an array of endpoints for this driver
Services_Scribd_Common::sendRequest()
Sends the request to the Scribd API
Services_Scribd_Common::setRequestAdapter()
Sets the request adapter to use for this request
Services_Scribd_Common::__call()
Traps any requests to endpoints that are not defined

Class: Services_Scribd

Services_Scribd::__construct()
Sets the API key and optional API secret
Services_Scribd::getAccount()
Returns the current account instance
Services_Scribd::setAccount()
Sets the Scribd account to use
Services_Scribd::__get()
Loads individual endpoint drivers

Class Details

[line 37]
The interface for the "collections" API endpoints. Provides all interaction that is associated with a collection of documents, such as creating and deleting collections as well as adding and removing documents to those collections.


[ Top ]


Class Variables

$validEndpoints = array(
        'addDoc',
        'create',
        'delete',
        'getList',
        'listDocs',
        'removeDoc',
        'update'
    )

[line 44]

Array of API endpoints that are supported
  • Access: protected

Type:   array


[ Top ]



Method Detail

addDoc   [line 63]

boolean addDoc( integer $docId, integer $collectionId)

Adds a document to an existing collection.

Parameters:

integer   $docId     ID of the document to add
integer   $collectionId     ID of the collection to add to

[ Top ]

create   [line 83]

integer create( string $name, [string $description = null], [string $privacyType = 'public'])

Creates a new collection.

Parameters:

string   $name     Name of the collection
string   $description     Description of the collection
string   $privacyType     Privacy setting, either 'public' or 'private'

[ Top ]

delete   [line 102]

boolean delete( integer $collectionId)

Deletes a collection.

Parameters:

integer   $collectionId     ID of the colleciton to update

[ Top ]

getList   [line 120]

SimpleXMLElement getList( [string $privacyType = null])

Retrieves a list of collections for a given user.

Parameters:

string   $privacyType     Privacy sope, either 'public' or 'private'. If omitted, all document collections are returned.

[ Top ]

listDocs   [line 139]

SimpleXMLElement listDocs( integer $collectionId, [integer $limit = null], [integer $offset = null])

Retrieves a list of documents in a given collection.

Parameters:

integer   $collectionId     ID of the collection to add to
integer   $limit     Max number of documents to return
integer   $offset     Offset into the list of documents

[ Top ]

removeDoc   [line 159]

boolean removeDoc( integer $docId, integer $collectionId)

Removes a document to an existing collection.

Parameters:

integer   $docId     ID of the document to add
integer   $collectionId     ID of the collection to add to

[ Top ]

update   [line 180]

boolean update( integer $collectionId, [string $name = null], [string $description = null], [string $privacyType = null])

Updates a new collection's name, description or privacy_type.

Parameters:

integer   $collectionId     ID of the colleciton to update
string   $name     Name of the collection
string   $description     Description of the collection
string   $privacyType     Privacy setting, either 'public' or 'private'

[ Top ]


Documentation generated on Sat, 06 Apr 2013 14:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.