Open main menu

Sugar Labs β

Sugar Network/Resources

< Sugar Network
Revision as of 02:11, 15 March 2014 by Alsroot (talk | contribs)

The following diagram shows the full list of objects implemented by the Sugar Network API.

Sugar Network objects

Resource.author

A list of authors working on the corresponding resource. List items are dictionaries with the following keys:

  • guid
    Author's guid in the Sugar Network; might be omitted if a particular author is not registered in the Sugar Network;
  • name
    Full author's name;
  • role
    An integer which is a bit-wise ORed value of the following constants:
    • 1, author is registered in the Sugar Network (and guid key is set);
    • 2, author is the original author of the corresponding resource; if it is not set, user is only a maintainer, e.g., an uploader of a book which has its original authors.

Resource.layer

This is a system level property to to track object's condition. It is a list of states set by the system during the object life cycle. Users cannot directly write to this property. Currently supported states are:
  • deleted set after removing objects by users; right after user deletes, the object still remains in the system but becomes inaccessible to user requests;
  • favorite applied only to local Context objects, set if user stared the object;
  • checkin applied only to local Context objects, set if user pinned some of Context releases to keep permanently in the local system.

Context.type

Context types:
  • activity, Sugar activity;
  • book, books in various forms;
  • group, offline discussion groups;
  • package, GNU/Linux package metadata.

Post.type

  • review, Review the Context;
  • object, Object generated by Context application;
  • question, Q&A request;
  • answer, Q&A response;
  • issue, Propblem with the Context;
  • announce, General announcement;
  • notification, Auto-generated Post for updates within the Context;
  • feedback, Review parent Post;
  • post, General purpose dependent Post.