Golem.de API

Golem  alpha

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

Class Golem.Api.Theme.List - extends Golem.Api

Get a list of theme categories via Golem web interface

Constructor

Golem.Api.Theme.List ( )

Properties

TYPE - protected {String}

The type of access method for the web service

URL - protected {String}

The URL of the used web service

Methods

each

void each ( fnCallback , params )
Traverses through the list of theme categories.

After a succesful request you can traverse through the article list. You pass a callback function to the method, and the method is called for each article

The first argument to this callback function is a theme object with the properties:

  • name - {Integer} - The theme category name
  • headline - {String(60)} - The short theme category name, also used as identifier
  • url - {String} - The URL to the theme category homepage
The second argument will be the data provided by params.

Parameters:
fnCallback <Function> - the callback function to call for each article
params <Mixed> - additional data passed to the callback function
Returns: void

fetch

void fetch ( obj )
Fetches the list of theme categories via web service

In case of a successful request, the obj.fnSuccess-callback function will be called. The first argument for the callback method is the result data of the request. The second argument will be the data provided by obj.params.

In case of a failed request, the obj.fnError callback function will be called. The first argument to the callback is the error code, the second ist the error message.

Parameters:
obj <Object> - Object literal specifing the callback methods
Returns: void

fetchEach

void fetchEach ( fnCallback , params )
Shortcut method for traversing the article data

Fetches the articles via fetch() first and then calls fnCallback for every article record like each() does.

There is no way to handle errors with this method!

Parameters:
fnCallback <Function> - Function to call for every article record
params <Mixed> - additional data to pass to the callback function
Returns: void


Copyright © 2010 Golem.de.