Talk:Sugar Network/API

From Sugar Labs
Revision as of 06:20, 4 July 2013 by Alsroot (talk | contribs) (Alsroot moved page Talk:Platform Team/Sugar Network/API to Talk:Sugar Network/API)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Some basic examples for beginning the implementation of basic client

Browsing a list of contexts

Get the list:


Default order is by modification time.

This would output an array of dictionaries:

[[{key: value}], total]

For example:

[[{'title':'Actividad Navegar',
   'description':'La actividad navegar...',
  {'title':'Actividad Escribir',
   'description':'La actividad escribir...',
   'guid':'SOMEOTHERHASH'}], 10]

Browsing questions associated with resources



In this example there's only one question associated with this context:

[[{'title':'Se puede añadir un buscador?',
   'content':'Otros navegadores incluyen un buscador...',
   'rating': 0,
   'guid' : 'OTHERHASH',
   'vote': False}], 1]

Modifying a property



With sending a dictionary. For instance for voting: {vote: True} (Voting consists only of a boolean, as in +1, or Star)