The Zend_Service_SlideShare component is used to interface with the slideshare.net web server to retrieve slide shows hosted on the web site for display or other processing.

category Zend
package Zend_Service
subpackage SlideShare
\Zend_Service_SlideShare_Exception
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

The Constructor

__construct(string $apikey, string $sharedSecret, string $username = null, string $password = null

Parameters

$apikey

string

The API key

$sharedSecret

string

The shared secret

$username

string

The username

$password

string

The password

Gets the API key to be used in making API calls

getApiKey() : string

Returns

stringthe API Key

Gets the Zend_Cache object which will be used to cache API queries. If no cache object was previously set the the default will be used (Filesystem caching in /tmp with a life time of 43200 seconds)

getCacheObject() : \Zend_Cache_Core

Returns

\Zend_Cache_CoreThe object used in caching

Returns the instance of the Zend_Http_Client which will be used. Creates an instance of Zend_Http_Client if no previous client was set.

getHttpClient() : \Zend_Http_Client

Returns

\Zend_Http_ClientThe HTTP client which will be used

Gets the password to use in API calls

getPassword() : string

Returns

stringthe password to use in API calls

Gets the shared secret used in making API calls

getSharedSecret() : string

Returns

stringthe Shared secret

Retrieves a slide show's information based on slide show ID

getSlideShow(integer $ssId) : \Zend_Service_SlideShare_SlideShow

Parameters

$ssId

integer

The slide show ID

Exceptions

\Zend_Service_SlideShare_Exception

Returns

\Zend_Service_SlideShare_SlideShowthe Slideshow object

Retrieves an array of slide shows based on group name

getSlideShowsByGroup(string $group, integer $offset = null, integer $limit = null) : array

Parameters

$group

string

The group name to retrieve slide shows for

$offset

integer

The offset of the list to start retrieving from

$limit

integer

The maximum number of slide shows to retrieve

Returns

arrayAn array of Zend_Service_SlideShare_SlideShow objects

Retrieves an array of slide shows based on tag

getSlideShowsByTag(string $tag, integer $offset = null, integer $limit = null) : array

Parameters

$tag

string

The tag to retrieve slide shows with

$offset

integer

The offset of the list to start retrieving from

$limit

integer

The maximum number of slide shows to retrieve

Returns

arrayAn array of Zend_Service_SlideShare_SlideShow objects

Retrieves an array of slide shows for a given username

getSlideShowsByUsername(string $username, integer $offset = null, integer $limit = null) : array

Parameters

$username

string

The username to retrieve slide shows from

$offset

integer

The offset of the list to start retrieving from

$limit

integer

The maximum number of slide shows to retrieve

Returns

arrayAn array of Zend_Service_SlideShare_SlideShow objects

Returns the user name used for API calls

getUserName() : string

Returns

stringThe username

Sets the API key to be used in making API calls

setApiKey(string $key) : \Zend_Service_SlideShare

Parameters

$key

string

The API key to use

Returns

\Zend_Service_SlideShare

Sets the Zend_Cache object to use to cache the results of API queries

setCacheObject(\Zend_Cache_Core $cacheobject) : \Zend_Service_SlideShare

Parameters

$cacheobject

\Zend_Cache_Core

The Zend_Cache object used

Returns

\Zend_Service_SlideShare

Sets the Zend_Http_Client object to use in requests. If not provided a default will be used.

setHttpClient(\Zend_Http_Client $client) : \Zend_Service_SlideShare

Parameters

$client

\Zend_Http_Client

The HTTP client instance to use

Returns

\Zend_Service_SlideShare

Sets the password to use in API calls

setPassword(string $pw) : \Zend_Service_SlideShare

Parameters

$pw

string

The password to use

Returns

\Zend_Service_SlideShare

Sets the shared secret used in making API calls

setSharedSecret(string $secret) : \Zend_Service_SlideShare

Parameters

$secret

string

the shared secret

Returns

\Zend_Service_SlideShare

Sets the user name to use for API calls

setUserName(string $un) : \Zend_Service_SlideShare

Parameters

$un

string

The username to use

Returns

\Zend_Service_SlideShare

Uploads the specified Slide show the the server

uploadSlideShow(\Zend_Service_SlideShare_SlideShow $ss, boolean $makeSrcPublic = true) : \Zend_Service_SlideShare_SlideShow

Parameters

$ss

\Zend_Service_SlideShare_SlideShow

The slide show object representing the slide show to upload

$makeSrcPublic

boolean

Determines if the slide show's source file is public or not upon upload

Exceptions

\Zend_Service_SlideShare_Exception

Returns

\Zend_Service_SlideShare_SlideShowThe passed Slide show object, with the new assigned ID provided

Retrieves Zend_Service_SlideShare_SlideShow object arrays based on the type of list desired

_getSlideShowsByType(string $key, string $value, integer $offset = null, integer $limit = null) : array

Parameters

$key

string

The type of slide show object to retrieve

$value

string

The specific search query for the slide show type to look up

$offset

integer

The offset of the list to start retrieving from

$limit

integer

The maximum number of slide shows to retrieve

Exceptions

\Zend_Service_SlideShare_Exception

Returns

arrayAn array of Zend_Service_SlideShare_SlideShow objects

Converts a SimpleXMLElement object representing a response from the service into a Zend_Service_SlideShare_SlideShow object

_slideShowNodeToObject(\SimpleXMLElement $node) : \Zend_Service_SlideShare_SlideShow
see

Parameters

$node

\SimpleXMLElement

The input XML from the slideshare.net service

Exceptions

\Zend_Service_SlideShare_Exception

Returns

\Zend_Service_SlideShare_SlideShowThe resulting object

 Properties

 

The API key to use in requests

$_apiKey : string

Default

 

The Cache object to use to perform caching

$_cacheobject : \Zend_Cache_Core

Default

 

The HTTP Client object to use to perform requests

$_httpclient : \Zend_Http_Client

Default

 

The password to use in requests

$_password : string

Default

 

The shared secret to use in requests

$_sharedSecret : string

Default

 

The username to use in requests

$_username : string

Default

 Constants

 

The MIME type of Slideshow files

POWERPOINT_MIME_TYPE = "application/vnd.ms-powerpoint" 
   

Web service result code mapping

SERVICE_ERROR_BAD_APIKEY = 1 
 

SERVICE_ERROR_BAD_AUTH

SERVICE_ERROR_BAD_AUTH = 2 
 

SERVICE_ERROR_DAILY_LIMIT

SERVICE_ERROR_DAILY_LIMIT = 99 
 

SERVICE_ERROR_EMPTY_TITLE

SERVICE_ERROR_EMPTY_TITLE = 5 
 

SERVICE_ERROR_FILE_TOO_BIG

SERVICE_ERROR_FILE_TOO_BIG = 8 
 

SERVICE_ERROR_GROUP_NOT_FOUND

SERVICE_ERROR_GROUP_NOT_FOUND = 11 
 

SERVICE_ERROR_INVALID_EXT

SERVICE_ERROR_INVALID_EXT = 7 
 

SERVICE_ERROR_MISSING_FILE

SERVICE_ERROR_MISSING_FILE = 4 
 

SERVICE_ERROR_MISSING_TAG

SERVICE_ERROR_MISSING_TAG = 12 
 

SERVICE_ERROR_MISSING_TITLE

SERVICE_ERROR_MISSING_TITLE = 3 
 

SERVICE_ERROR_NOT_SOURCEOBJ

SERVICE_ERROR_NOT_SOURCEOBJ = 6 
 

SERVICE_ERROR_SHOW_NOT_FOUND

SERVICE_ERROR_SHOW_NOT_FOUND = 9 
 

SERVICE_ERROR_USER_NOT_FOUND

SERVICE_ERROR_USER_NOT_FOUND = 10 
 

SERVICE_GET_SHOW_BY_GROUP_URI

SERVICE_GET_SHOW_BY_GROUP_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_group' 
 

SERVICE_GET_SHOW_BY_TAG_URI

SERVICE_GET_SHOW_BY_TAG_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_tag' 
 

SERVICE_GET_SHOW_BY_USER_URI

SERVICE_GET_SHOW_BY_USER_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_user' 
 

SERVICE_GET_SHOW_URI

SERVICE_GET_SHOW_URI = 'https://www.slideshare.net/api/2/get_slideshow' 
 

Slide share Web service communication URIs

SERVICE_UPLOAD_URI = 'https://www.slideshare.net/api/2/upload_slideshow'