Class Golem_Api_Video_Latest

Description

Class for accessing the latest videos via web interface.

Located in /Api/Video/Latest.php (line 52)


	
			
Class Constant Summary
 ERROR_LIMIT = 102
 URL = 'http://api.golem.de/api/video/latest/'
Variable Summary
String $key
Integer $maxVideos
Array $videos
Method Summary
Golem_Api_Video_Latest __construct (String $key, [Integer $maxVideos = 10])
Boolean fetch ([Array $curlOptions = array()])
Array getVideos ()
Variables
String $key = null (line 81)

Developer access key

  • access: protected
Integer $maxVideos = 10 (line 69)

Amount of top articles to fetch

  • access: protected
Array $videos = array() (line 75)

Top video data

  • access: protected
Methods
Constructor __construct (line 89)

Creates the Video_Latest object

  • access: public
Golem_Api_Video_Latest __construct (String $key, [Integer $maxVideos = 10])
  • String $key: your developer key
  • Integer $maxVideos: the number of top videoes to fetch
fetch (line 113)

Does the request to get the latest list.

If the request was succesful, true will be returned, else an exception will be thrown.

The possible Exception codes are Golem_Request::DATABASE and Golem_Api_Video_Latest::ERROR_LIMIT.

After a successful request the video list is available from getVideos().

  • return: true, if request was successful
  • access: public
Boolean fetch ([Array $curlOptions = array()])
  • Array $curlOptions: optional options for cUrl
getVideos (line 143)

Returns the list of videos.

In the array, each entry represents a video record. The keys of record array are:

  • videoid - Integer - Video identifier
  • title - String - the video title
  • url - String - the URL to the video page

  • access: public
Array getVideos ()
Class Constants
ERROR_LIMIT = 102 (line 63)

Error code for an invalid limit value

URL = 'http://api.golem.de/api/video/latest/' (line 58)

Base url of the webservice

Documentation generated on Tue, 20 Apr 2010 14:21:07 +0200 by phpDocumentor 1.4.3