الفرق بين المراجعتين لصفحة «تصميم:دواسوا/API»
ط (أسماء بعض الدوال و المتغيرات) |
(تمرير id مع token في الأفعال المغيّرة حالة البيانات) |
||
| سطر 29: | سطر 29: | ||
== <code>instate_entry</code> == | == <code>instate_entry</code> == | ||
| − | <code>( <var>token</var>: string([[../cryptographic-token|token]]) )</code> | + | <code>( <var>id</var>: string(id), <var>token</var>: string([[../cryptographic-token|token]]) )</code> |
[[../workflow#Listing instatement|Instates a listing]] via user action. | [[../workflow#Listing instatement|Instates a listing]] via user action. | ||
| − | This is a GET request via the URL <code>/instate-listing/<var>token</var></code> | + | This is a GET request via the URL <code>/instate-listing/<var>id</var>/<var>token</var></code> |
| سطر 45: | سطر 45: | ||
== <code>remove_entry</code> == | == <code>remove_entry</code> == | ||
| − | <code>( <var>token</var>: string([[../cryptographic token|token]]) )</code> | + | <code>( <var>id</var>: string(id), <var>token</var>: string([[../cryptographic token|token]]) )</code> |
Initiates the [[../workflow#Listing removal|removal of a listing]] from the public listings into the [[../data#archive|archive]]. Listings removed via this procedure have a status flag <kbd>removed-by-user</kbd>. | Initiates the [[../workflow#Listing removal|removal of a listing]] from the public listings into the [[../data#archive|archive]]. Listings removed via this procedure have a status flag <kbd>removed-by-user</kbd>. | ||
| − | This is a GET request via the URL <code>/remove/<var>token</var></code> | + | This is a GET request via the URL <code>/remove/<var>id</var>/<var>token</var></code> |
== <code>get_user_listings</code> == | == <code>get_user_listings</code> == | ||
مراجعة 22:24، 28 يناير 2017
The API should implement the following verbs:
lookup
( name: string, count: int, index: int ): listings-enumeration
Returns count number of listings having name as the name, starting with index. Each listing item is comprised of basic package information sans contact information processed properly.
This is a GET request via the URL /lookup?name=&count=&index=
get_item_info
( id: string(id) ): item-info
Returns details information on a specific listing item; comprised of the package information and the contact information.
This is a GET request via the URL /item/id
request_insertion
( package-info: package-info, contact-info: contact-info, accept-terms: boolean )
Initiates an insertion request. Where:
- package-info : package information record
- contact-info : contact information record
- accept-terms : a boolean flag indicating the acceptance of the terms of service.
This request is a POST request
instate_entry
( id: string(id), token: string(token) )
Instates a listing via user action.
This is a GET request via the URL /instate-listing/id/token
request_entry_removal
( id: string(id) )
Initiates a listing deletion request
This is a GET request via the URL /removal-request/id
remove_entry
( id: string(id), token: string(token) )
Initiates the removal of a listing from the public listings into the archive. Listings removed via this procedure have a status flag removed-by-user.
This is a GET request via the URL /remove/id/token
get_user_listings
( email_address )
Initiates a listings retrieval procedure