Golem.de API

Golem  alpha

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

Class Golem.Api.Article.Meta - extends Golem.Api

Fetches the meta data of an article via Golem.de web interface

Constructor

Golem.Api.Article.Meta ( idArticle )
Parameters:
idArticle <Integer> - Article identifier

Properties

ERROR_INVALID_IDENTIFER - {Integer}

Indicates a missing or invalid article identifier

ERROR_NO_ARTICLE - {Integer}

Indicates that the article identifier does not point to an article

fetchDone - protected {Boolean}

Marks the article data is populated

idArticle - protected {Integer}

The article identifier

TYPE - protected {String}

The type of access method for the web service

URL - protected {String}

The URL of the used web service

Methods

fetch

void fetch ( obj )
Fetches the article meta data 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

getValue

Mixed getValue ( key )
Returns the value of the meta data.

Available values are:

  • articleid - {Integer} - The article identifier
  • headline - {String} - The article headline
  • subheadline - {String} - The article sub headline
  • abstracttext - {String} - The article abstract
  • date - {Integer} - The article publishing date as unix timestamp
  • url - {String} - The article URL
  • pages - {Integer} - The number of article pages
  • images - {Integer} - the number of associated images
  • leadimg - {Object} - The article headline image
    • url - {String} - the image URL
    • width - {Integer} - the image width
    • height - {Integer} - the image height

If you ask for a keyword, that does not exists, the method returns undefined

Parameters:
key <String> - one of the value names
Returns: Mixed
the value or undefined


Copyright © 2010 Golem.de.