Table of Contents

Module: rest yigg/rest.py

Hier sind alle moeglichen Funktionen die die Ausgaben der REST-API (XML) in struktur.*() umwandeln. Zusaetzlich gibt es noch wichtige Funktionen fuer das Benutzen der API (diese Funktionen nehmen einem Arbeit ab...)

Die meisten Funktionen haben (noch) eine englishce Dokumentation. Dies sollte allerdings kein Problem sein, da man in 99,99% der Faelle diese Funktionen nicht direkt aufrufen wird (und deshalb auch nichts ueber sie wissen muss).

Functions   
_call_method
group_to_group
rest_story_to_article
story_to_article
user_profile_to_profile
  _call_method 
_call_method ( method,  params )

Calls a method, and checks if errors occur...

params should be a dictionary with at least one entry: api_key ==> params = {'api_key': e26873fvdpobg359253, 'foobar':56}

Usage: call_method(method, params) Returns: ET.fromstring(string)

Exceptions   
errors.HTTPError
errors.RESTUnknownError
getattr( errors, 'REST' + elem.text + 'Error' )
  group_to_group 
group_to_group ( group )

Makes a struktur.Group() out of an xml-<group>...</group>

  rest_story_to_article 
rest_story_to_article ( story )

Old name of story_to_article(). Do not use any more!

  story_to_article 
story_to_article ( story )

Macht einen Aritkel (Instanz von struktur.Article()) anhand eines Strings. Der String sollte valides XML sein, in der Form wie in die REST-API zurueckgibt.

Aufruf: rest_story_to_article(story) Rueckgabe: struktur.Article()

  user_profile_to_profile 
user_profile_to_profile ( user_profile )

Makes a struktur.Profile() out of a <user_profile>...</user_profile>

Make sure that user_profile is valid XML (and its root elem is <user..>)

Usage: user_profile_to_profile(user_profile) Returns: struktur.Profile()


Table of Contents

This document was automatically generated on Sun Jun 17 20:22:12 2007 by HappyDoc version 2.1