Skip to content

Service Type Definitions

erictj edited this page Jul 8, 2011 · 7 revisions

In Lockers, Service Type Definitions (or more happily referred to as STDs) describes the formal definition of the data sent for a given service type.

https://github.com/LockerProject/Locker/tree/master/Docs/ServiceTypeDefinitions contains the directory of all service type definitions. There should be one document per service type, including primary and complete service types.

The Components of Service Type Definitions

Service Type Definitions have several parts. In connector definitions the first two are usually merged based on the primary type shared format in addition to any extra fields:

  • Shared format data These are the fields that the primary type implementation (usually a collection) knows how to process in a common way without explicit knowledge of the sending complete type. Usually, these arrive as an event from a connector. They are expected to be the same fields returned in a requested object.

  • Enriched service data These are the extra fields that a collection implementation has generated for a specific object. For example, a Links collection might have the full HTML and a rendered image of the web page available. These are not supplied by the connector at all, but rather are supplied by user or collection level intent.

  • Action Core common actions are create, update, and delete, but the list is not predefined. Other actions can be defined but should be carefully considered to not be overly confusing.

  • Event Data This is the data necessary for action to take place. This data is literally what is in the object field of an event.

    • Create: Full object
    • Update: Only diff elements in object from original
    • Delete: Only UID of object to delete
  • API Data This is the information about what API endpoints are available to be called against this service. Some endpoints are socially contracted to be considered common such as general retrieval of data.

    • getId - specific object by id, possibly takes an array of ids
    • getAll - all objects
    • Maybe a getAllIds - returns just the ids instead of full objects for pagination reasons
    • getSince - start, stop time range

See also

Primary Service Type Definitions

Service Type Service Type Definition Status
contact View Complete
link View Complete
photo In process
message In process
checkin In process
status In process

Complete Service Type Definitions

Contacts

Service Type Service Type Definition Status
contact/google In process
contact/facebook In process
contact/twitter In process
contact/foursquare In process
contact/imap In process

Links

Service Type Service Type Definition Status
link/chrome In process
link/safari In process
link/firefox In process
link/facebook In process

Photos

Service Type Service Type Definition Status
photo/flickr In process
photo/facebook In process
photo/twitpic In process
photo/foursquare In process

Messages

Service Type Service Type Definition Status
message/facebook In process
message/twitter In process
message/imap In process

Checkins

Service Type Service Type Definition Status
checkin/foursquare In process
checkin/facebook In process

Statuses

Service Type Service Type Definition Status
status/twitter In process
status/facebook In process
Clone this wiki locally