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

Class: Services_Scribd_Thumbnail

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

Class Overview

Services_Scribd
   |
   --Services_Scribd_Common
      |
      --Services_Scribd_Thumbnail

The interface for the "thumbnail" API endpoint. Allows the user to retrieve a URL to the thumbnail of a document in a given size.


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 35]
The interface for the "thumbnail" API endpoint. Allows the user to retrieve a URL to the thumbnail of a document in a given size.


[ Top ]


Class Variables

$validEndpoints = array(
        'get'
    )

[line 42]

Array of API endpoints that are supported
  • Access: protected

Type:   array


[ Top ]



Method Detail

get   [line 63]

string get( integer $docId, [integer $width = null], [integer $height = null])

Retrieves a URL to the thumbnail of a document, in a given size. Note that docs.getSettings and docs.getList also retrieve thumbnail URLs in default size - this method is really for resizing those.

IMPORTANT - it is possible that at some time in the future, Scribd will redesign its image system, invalidating these URLs. So if you cache them, please have an update strategy in place so that you can update them if neceessary.


Parameters:

integer   $docId     The id of the document
integer   $width     Width in px of the desired image
integer   $height     Height in px of the desired image

[ Top ]


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