Service/SlideShare.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 [email protected] so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
SlideShare  
Version
$Id$  

\Zend_Service_SlideShare

Package: 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
\Zend_Service_SlideShare_Exception

Constants

>VConstant  SERVICE_ERROR_BAD_APIKEY = 1
Web service result code mapping
>VConstant  SERVICE_ERROR_BAD_AUTH = 2
>VConstant  SERVICE_ERROR_MISSING_TITLE = 3
>VConstant  SERVICE_ERROR_MISSING_FILE = 4
>VConstant  SERVICE_ERROR_EMPTY_TITLE = 5
>VConstant  SERVICE_ERROR_NOT_SOURCEOBJ = 6
>VConstant  SERVICE_ERROR_INVALID_EXT = 7
>VConstant  SERVICE_ERROR_FILE_TOO_BIG = 8
>VConstant  SERVICE_ERROR_SHOW_NOT_FOUND = 9
>VConstant  SERVICE_ERROR_USER_NOT_FOUND = 10
>VConstant  SERVICE_ERROR_GROUP_NOT_FOUND = 11
>VConstant  SERVICE_ERROR_MISSING_TAG = 12
>VConstant  SERVICE_ERROR_DAILY_LIMIT = 99
>VConstant  SERVICE_ERROR_ACCOUNT_BLOCKED = 100
>VConstant  SERVICE_UPLOAD_URI = 'https://www.slideshare.net/api/2/upload_slideshow'
Slide share Web service communication URIs
>VConstant  SERVICE_GET_SHOW_URI = 'https://www.slideshare.net/api/2/get_slideshow'
>VConstant  SERVICE_GET_SHOW_BY_USER_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_user'
>VConstant  SERVICE_GET_SHOW_BY_TAG_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_tag'
>VConstant  SERVICE_GET_SHOW_BY_GROUP_URI = 'https://www.slideshare.net/api/2/get_slideshows_by_group'
>VConstant  POWERPOINT_MIME_TYPE = "application/vnd.ms-powerpoint"
The MIME type of Slideshow files

Properties

>VPropertyprotectedstring $_apiKey
The API key to use in requests
Details
Type
string
>VPropertyprotected\Zend_Cache_Core $_cacheobject
The Cache object to use to perform caching
Details
Type
\Zend_Cache_Core
>VPropertyprotected\Zend_Http_Client $_httpclient
The HTTP Client object to use to perform requests
>VPropertyprotectedstring $_password
The password to use in requests
Details
Type
string
>VPropertyprotectedstring $_sharedSecret
The shared secret to use in requests
Details
Type
string
>VPropertyprotectedstring $_username
The username to use in requests
Details
Type
string

Methods

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

The Constructor

Parameters
NameTypeDescription
$apikeystring

The API key

$sharedSecretstring

The shared secret

$usernamestring

The username

$passwordstring

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
NameTypeDescription
$keystring

The type of slide show object to retrieve

$valuestring

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

$offsetint

The offset of the list to start retrieving from

$limitint

The maximum number of slide shows to retrieve

Returns
TypeDescription
arrayAn array of Zend_Service_SlideShare_SlideShow objects
Throws
ExceptionDescription
\Zend_Service_SlideShare_Exception
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
NameTypeDescription
$node\SimpleXMLElement

The input XML from the slideshare.net service

Returns
TypeDescription
\Zend_Service_SlideShare_SlideShowThe resulting object
Throws
ExceptionDescription
\Zend_Service_SlideShare_Exception
methodpublicgetApiKey() : string

Gets the API key to be used in making API calls

Returns
TypeDescription
stringthe 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
TypeDescription
\Zend_Cache_CoreThe 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
TypeDescription
\Zend_Http_ClientThe HTTP client which will be used
methodpublicgetPassword() : string

Gets the password to use in API calls

Returns
TypeDescription
stringthe password to use in API calls
methodpublicgetSharedSecret() : string

Gets the shared secret used in making API calls

Returns
TypeDescription
stringthe Shared secret
methodpublicgetSlideShow(int $ss_id) : \Zend_Service_SlideShare_SlideShow

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

Parameters
NameTypeDescription
$ss_idint

The slide show ID

Returns
TypeDescription
\Zend_Service_SlideShare_SlideShowthe Slideshow object
Throws
ExceptionDescription
\Zend_Service_SlideShare_Exception
methodpublicgetSlideShowsByGroup(string $group, int $offset = null, int $limit = null) : array

Retrieves an array of slide shows based on group name

Parameters
NameTypeDescription
$groupstring

The group name to retrieve slide shows for

$offsetint

The offset of the list to start retrieving from

$limitint

The maximum number of slide shows to retrieve

Returns
TypeDescription
arrayAn 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
NameTypeDescription
$tagstring

The tag to retrieve slide shows with

$offsetint

The offset of the list to start retrieving from

$limitint

The maximum number of slide shows to retrieve

Returns
TypeDescription
arrayAn 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
NameTypeDescription
$usernamestring

The username to retrieve slide shows from

$offsetint

The offset of the list to start retrieving from

$limitint

The maximum number of slide shows to retrieve

Returns
TypeDescription
arrayAn array of Zend_Service_SlideShare_SlideShow objects
methodpublicgetUserName() : string

Returns the user name used for API calls

Returns
TypeDescription
stringThe username
methodpublicsetApiKey(string $key) : \Zend_Service_SlideShare

Sets the API key to be used in making API calls

Parameters
NameTypeDescription
$keystring

The API key to use

Returns
TypeDescription
\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
NameTypeDescription
$cacheobject\Zend_Cache_Core

The Zend_Cache object used

Returns
TypeDescription
\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
NameTypeDescription
$client\Zend_Http_Client

The HTTP client instance to use

Returns
TypeDescription
\Zend_Service_SlideShare
methodpublicsetPassword(string $pw) : \Zend_Service_SlideShare

Sets the password to use in API calls

Parameters
NameTypeDescription
$pwstring

The password to use

Returns
TypeDescription
\Zend_Service_SlideShare
methodpublicsetSharedSecret(string $secret) : \Zend_Service_SlideShare

Sets the shared secret used in making API calls

Parameters
NameTypeDescription
$secretstring

the shared secret

Returns
TypeDescription
\Zend_Service_SlideShare
methodpublicsetUserName(string $un) : \Zend_Service_SlideShare

Sets the user name to use for API calls

Parameters
NameTypeDescription
$unstring

The username to use

Returns
TypeDescription
\Zend_Service_SlideShare
methodpublicuploadSlideShow(\Zend_Service_SlideShare_SlideShow $ss, boolean $makeSrcPublic = true) : \Zend_Service_SlideShare_SlideShow

Uploads the specified Slide show the the server

Parameters
NameTypeDescription
$ss\Zend_Service_SlideShare_SlideShow

The slide show object representing the slide show to upload

$makeSrcPublicboolean

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

Returns
TypeDescription
\Zend_Service_SlideShare_SlideShowThe passed Slide show object, with the new assigned ID provided
Throws
ExceptionDescription
\Zend_Service_SlideShare_Exception
Documentation was generated by phpDocumentor 2.2.0 .