Confirmed users
920
edits
LesOrchard (talk | contribs) No edit summary |
LesOrchard (talk | contribs) No edit summary |
||
| Line 103: | Line 103: | ||
==== /api/sharing/ ==== | ==== /api/sharing/ ==== | ||
This is the main entry point URL for the API. Concrete examples of this URL | This [[#Service Document|service document]] is the main entry point URL for the | ||
might look something like the following: | API. Polling it periodically, with proper attention to Last-Modified and | ||
If-Modified-Since headers, should offer a relatively efficient way to track | |||
collection subscriptions and what subscriptions are writable. | |||
The [[#Service Document|service document]] given as a response to a GET | |||
request to the resource will supply URLs leading into the rest of the API. | |||
Concrete examples of this URL might look something like the following: | |||
http://localhost/~lorchard/addons/api.php?action=service_doc | http://localhost/~lorchard/addons/api.php?action=service_doc | ||
| Line 110: | Line 117: | ||
https://preview.addons.mozilla.org/en-US/firefox/api/1.3/sharing | https://preview.addons.mozilla.org/en-US/firefox/api/1.3/sharing | ||
https://addons.mozilla.org/en-US/firefox/api/1.3/sharing | https://addons.mozilla.org/en-US/firefox/api/1.3/sharing | ||
===== GET - Fetch the service document ===== | ===== GET - Fetch the service document ===== | ||
| Line 123: | Line 127: | ||
==== /api/sharing/collections/ ==== | ==== /api/sharing/collections/ ==== | ||
This resource represents the set of all shared collections. | This resource represents the set of all shared collections. | ||
A concrete URL for this resource can be acquired from the [[#Service Document]]. | |||
===== POST - Create a new collection ===== | ===== POST - Create a new collection ===== | ||
| Line 142: | Line 147: | ||
This resource represents a single collection of shared addons. | This resource represents a single collection of shared addons. | ||
A concrete URL for this kind of resource can be acquired from the [[#Service Document]]. | |||
===== GET - Fetch contents of a collection ===== | ===== GET - Fetch contents of a collection ===== | ||
| Line 174: | Line 180: | ||
This resource represents a single addon shared in a collection. | This resource represents a single addon shared in a collection. | ||
A concrete URL for this kind of resource can be acquired from an [[#Addon Collection]]. | |||
===== GET - Fetch details on an addon in a collection ===== | ===== GET - Fetch details on an addon in a collection ===== | ||
| Line 190: | Line 197: | ||
This resource offers a general-purpose interface to notification | This resource offers a general-purpose interface to notification | ||
functionality for sharing addons via email messages. | functionality for sharing addons via email messages. | ||
A concrete URL for this of resource can be acquired from the [[#Service Document]]. | |||
===== POST - Request an email sharing notification ===== | ===== POST - Request an email sharing notification ===== | ||