API v1‎ > ‎

Service/Place management

A service in 11870 is a business. Services may be accessed either from a search or as part of a user's agenda. The API may be used to manipulate every entry in a user's agenda. By manipulating, we mean creating, updating and deleting. Search results can not be modified.

To manage the entries, the Atom Publishing Protocol is used. The AtomPub service document is located at http://11870.com/api/v1

To get the service document the user will have had to grant permission to the application. That means there is no service document if you try to authenticate using only your API key. If this is still not clear to you, take a look at the Authentication page.

The service document refers a collection named 'Sites' which contains the user's saved places. The mapping between a service/place and an Atom entry is described in the Service/Atom mapping page.

From this point on, no more info should be needed to manage the data (oh, AtomPub advantages all the way). Following, some special characteristics of the API will be described.


Getting a user's places

Accessing a user's saved places is as easy as getting the collection with the name 'Sites'.

You may get other user's agenda by accessing the url http://11870.com/api/v1/sites/user_slug, where user_slug is the slug the user chose when she created her 11870.com account. This may be of help for some applications.


Creating a place

Normal AtomPub considerations apply.

The following attributes MUST appear on the Atom entry being created:

  • oos:useraddress
  • oos:locality
  • oos:country
  • atom:title

The following attributes MAY appear:

  • oos:id
  • oos:url
  • oos:telephone
  • oos:subdependentlocality (will be ignored)
  • oos:dependentlocality (will be ignored)
  • oos:subadministrativearea (will be ignored)
  • oos:administrativearea (will be ignored)

The oos:id attribute is important. If the place being created already exists in 11870.com (you may try to know that from a Search query), the attribute's value MUST be set in order to correctly associate user data with the place. If the place does not exist on 11870.com, the attribute MUST NOT be present.


Updating a place

Once a place has been created, only a subpart of its attributes may be updated. These attributes are:

  • atom:summary
  • atom:content
  • atom:category (tags, lists and privacy)

The modification of any other attribute will be ignored.


Deleting a place

Normal AtomPub considerations apply.

 

Multimedia management

Each service element has an atom:source element associated, within this element an atomPub media collection is showed. This collection represents

Comments