Golem.de API

Golem  alpha

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

Class Golem.Api.Special.List - extends Golem.Api

Get a list of special categories via Golem web interface

Constructor

Golem.Api.Special.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 special 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 special object with the properties:

  • name - {Integer} - The special category name
  • headline - {String(60)} - The short special category name, also used as identifier
  • url - {String} - The URL to the special 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 special 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.