API Documentation

Service/SlideShare.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service  
subpackage
SlideShare  
version
$Id: SlideShare.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Service_SlideShare

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  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service  
subpackage
SlideShare  
\Zend_Service_SlideShare_Exception

Constants

Constant  SERVICE_ERROR_BAD_APIKEY = '1'

Web service result code mapping

Constant  SERVICE_ERROR_BAD_AUTH = '2'
Constant  SERVICE_ERROR_MISSING_TITLE = '3'
Constant  SERVICE_ERROR_MISSING_FILE = '4'
Constant  SERVICE_ERROR_EMPTY_TITLE = '5'
Constant  SERVICE_ERROR_NOT_SOURCEOBJ = '6'
Constant  SERVICE_ERROR_INVALID_EXT = '7'
Constant  SERVICE_ERROR_FILE_TOO_BIG = '8'
Constant  SERVICE_ERROR_SHOW_NOT_FOUND = '9'
Constant  SERVICE_ERROR_USER_NOT_FOUND = '10'
Constant  SERVICE_ERROR_GROUP_NOT_FOUND = '11'
Constant  SERVICE_ERROR_MISSING_TAG = '12'
Constant  SERVICE_ERROR_DAILY_LIMIT = '99'
Constant  SERVICE_ERROR_ACCOUNT_BLOCKED = '100'
Constant  SERVICE_UPLOAD_URI = 'http://www.slideshare.net/api/1/upload_slideshow'

Slide share Web service communication URIs

Constant  SERVICE_GET_SHOW_URI = 'http://www.slideshare.net/api/1/get_slideshow'
Constant  SERVICE_GET_SHOW_BY_USER_URI = 'http://www.slideshare.net/api/1/get_slideshow_by_user'
Constant  SERVICE_GET_SHOW_BY_TAG_URI = 'http://www.slideshare.net/api/1/get_slideshow_by_tag'
Constant  SERVICE_GET_SHOW_BY_GROUP_URI = 'http://www.slideshare.net/api/1/get_slideshows_from_group'
Constant  POWERPOINT_MIME_TYPE = 'application/vnd.ms-powerpoint'

The MIME type of Slideshow files

Properties

Propertyprotectedstring  $_apiKey= ''

The API key to use in requests

The API key
Details
Type
string
Propertyprotected\Zend_Cache_Core  $_cacheobject= ''

The Cache object to use to perform caching

Details
Type
\Zend_Cache_Core
Propertyprotected\Zend_Http_Client  $_httpclient= ''

The HTTP Client object to use to perform requests

Details
Type
\Zend_Http_Client
Propertyprotectedstring  $_password= ''

The password to use in requests

the password
Details
Type
string
Propertyprotectedstring  $_sharedSecret= ''

The shared secret to use in requests

the Shared secret
Details
Type
string
Propertyprotectedstring  $_username= ''

The username to use in requests

the username
Details
Type
string

Methods

methodpublic__construct( string $apikey, string $sharedSecret, string $username = null, string $password = null ) : void

The Constructor

Parameters
Name Type Description
$apikey string The API key
$sharedSecret string The shared secret
$username string The username
$password string The password
methodprotected_getSlideShowsByType( string $key, string $value, int $offset = null, int $limit = null ) : array

Retrieves Zend_Service_SlideShare_SlideShow object arrays based on the type of list desired

Parameters
Name Type Description
$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 int The offset of the list to start retrieving from
$limit int The maximum number of slide shows to retrieve
Returns
Type Description
array An array of Zend_Service_SlideShare_SlideShow objects
methodprotected_slideShowNodeToObject( \SimpleXMLElement $node ) : \Zend_Service_SlideShare_SlideShow

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

Parameters
Name Type Description
$node \SimpleXMLElement The input XML from the slideshare.net service
Returns
Type Description
\Zend_Service_SlideShare_SlideShow The resulting object
methodpublicgetApiKey( ) : string

Gets the API key to be used in making API calls

Returns
Type Description
string the API Key
methodpublicgetCacheObject( ) : \Zend_Cache_Core

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)

Returns
Type Description
\Zend_Cache_Core The object used in caching
methodpublicgetHttpClient( ) : \Zend_Http_Client

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.

Returns
Type Description
\Zend_Http_Client The HTTP client which will be used
methodpublicgetPassword( ) : string

Gets the password to use in API calls

Returns
Type Description
string the password to use in API calls
methodpublicgetSharedSecret( ) : string

Gets the shared secret used in making API calls

Returns
Type Description
string the Shared secret
methodpublicgetSlideShow( int $ss_id ) : \Zend_Service_SlideShare_SlideShow

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

Parameters
Name Type Description
$ss_id int The slide show ID
Returns
Type Description
\Zend_Service_SlideShare_SlideShow the Slideshow object
methodpublicgetSlideShowsByGroup( string $group, int $offset = null, int $limit = null ) : array

Retrieves an array of slide shows based on group name

Parameters
Name Type Description
$group string The group name to retrieve slide shows for
$offset int The offset of the list to start retrieving from
$limit int The maximum number of slide shows to retrieve
Returns
Type Description
array An array of Zend_Service_SlideShare_SlideShow objects
methodpublicgetSlideShowsByTag( string $tag, int $offset = null, int $limit = null ) : array

Retrieves an array of slide shows based on tag

Parameters
Name Type Description
$tag string The tag to retrieve slide shows with
$offset int The offset of the list to start retrieving from
$limit int The maximum number of slide shows to retrieve
Returns
Type Description
array An array of Zend_Service_SlideShare_SlideShow objects
methodpublicgetSlideShowsByUsername( string $username, int $offset = null, int $limit = null ) : array

Retrieves an array of slide shows for a given username

Parameters
Name Type Description
$username string The username to retrieve slide shows from
$offset int The offset of the list to start retrieving from
$limit int The maximum number of slide shows to retrieve
Returns
Type Description
array An array of Zend_Service_SlideShare_SlideShow objects
methodpublicgetUserName( ) : string

Returns the user name used for API calls

Returns
Type Description
string The username
methodpublicsetApiKey( string $key ) : \Zend_Service_SlideShare

Sets the API key to be used in making API calls

Parameters
Name Type Description
$key string The API key to use
Returns
Type Description
\Zend_Service_SlideShare
methodpublicsetCacheObject( \Zend_Cache_Core $cacheobject ) : \Zend_Service_SlideShare

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

Parameters
Name Type Description
$cacheobject \Zend_Cache_Core The Zend_Cache object used
Returns
Type Description
\Zend_Service_SlideShare
methodpublicsetHttpClient( \Zend_Http_Client $client ) : \Zend_Service_SlideShare

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

Parameters
Name Type Description
$client \Zend_Http_Client The HTTP client instance to use
Returns
Type Description
\Zend_Service_SlideShare
methodpublicsetPassword( string $pw ) : \Zend_Service_SlideShare

Sets the password to use in API calls

Parameters
Name Type Description
$pw string The password to use
Returns
Type Description
\Zend_Service_SlideShare
methodpublicsetSharedSecret( string $secret ) : \Zend_Service_SlideShare

Sets the shared secret used in making API calls

Parameters
Name Type Description
$secret string the shared secret
Returns
Type Description
\Zend_Service_SlideShare
methodpublicsetUserName( string $un ) : \Zend_Service_SlideShare

Sets the user name to use for API calls

Parameters
Name Type Description
$un string The username to use
Returns
Type Description
\Zend_Service_SlideShare
methodpublicuploadSlideShow( \Zend_Service_SlideShare_SlideShow $ss, boolean $make_src_public = true ) : \Zend_Service_SlideShare_SlideShow

Uploads the specified Slide show the the server

Parameters
Name Type Description
$ss \Zend_Service_SlideShare_SlideShow The slide show object representing the slide show to upload
$make_src_public boolean

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

Returns
Type Description
\Zend_Service_SlideShare_SlideShow The passed Slide show object, with the new assigned ID provided
Documentation was generated by DocBlox 0.13.3.