Golem.de API

Golem  alpha

Golem.de API > Golem > Golem.Api
Search:
 
Filters

Class Golem.Api

Known Subclasses:
Golem.Api.Special.Article Golem.Api.Article.Latest Golem.Api.Article.Images Golem.Api.Theme.List Golem.Api.Article.Search Golem.Api.Theme.Article Golem.Api.Video.Top Golem.Api.Video.Meta Golem.Api.Video.Latest Golem.Api.Special.List Golem.Api.Article.Meta Golem.Api.Article.Top
Abstract base class for API webinterface operations

Properties

data - protected {Array}

Storage for the video list

errorCode - protected {Integer}

Error code after a failed request

errorMessage - protected {String}

Error message after a failed request

timeout - protected {Object}

Properties for the request timeout

timeout.duration - protected {Integer}

Duration of the timeout in Milliseconds

timeout.fn - protected {Function}

Method to call in case of an timeout

Methods

getData

Mixed getData ( )
Returns the data set retrieved by the request
Returns: Mixed
- the service specific result set

getErrorCode

Integer getErrorCode ( )
Returns the error code after a failed request.
Returns: Integer

getErrorMessage

Integer getErrorMessage ( )
Returns the error message after a failed request.
Returns: Integer

useTimeout

void useTimeout ( timeout , fnTimeout )
Enables the timeout for the request.

Because of the used JSONP technic, it is not possible to determine, when a request failed. So you can provide a timeout and a function to call after the timeout is finished and the request is not finished.

If you call this method without any arguments, the timeout will be disabled. The same effect will be a timeout of 0 milliseconds.

Be careful! If the timeout occurs, the request may be still finish successfully!

Parameters:
timeout <Integer> - the timeout in milliseconds
fnTimeout <Function> - the function to call
Returns: void


Copyright © 2010 Golem.de.