الفرق بين المراجعتين لصفحة «تصميم:دواسوا/API»
ط (←remove_listing: wikilink) |
(نقل قسم data structures إلى صفحة ../data) |
||
| سطر 5: | سطر 5: | ||
<code>( <var>name</var>: string, <var>count</var>: int, <var>index</var>: int ): listings-enumeration</code> | <code>( <var>name</var>: string, <var>count</var>: int, <var>index</var>: int ): listings-enumeration</code> | ||
| − | Returns <var>count</var> number of listings having <var>name</var> as the name, starting with <var>index</var>. Each listing item is comprised of basic [[#package-info|package information]] sans [[#contact-info|contact information]] processed properly. | + | Returns <var>count</var> number of listings having <var>name</var> as the name, starting with <var>index</var>. Each listing item is comprised of basic [[../data#package-info|package information]] sans [[../data#contact-info|contact information]] processed properly. |
This is a GET request via the URL <code>/lookup?<var>name</var>=&<var>count</var>=&<var>index</var>=</code> | This is a GET request via the URL <code>/lookup?<var>name</var>=&<var>count</var>=&<var>index</var>=</code> | ||
| سطر 13: | سطر 13: | ||
<code>( <var>id</var>: string(id) ): item-info</code> | <code>( <var>id</var>: string(id) ): item-info</code> | ||
| − | Returns details information on a specific listing item; comprised of the [[#package-info|package information]] and the [[#contact-info|contact information]]. | + | Returns details information on a specific listing item; comprised of the [[../data#package-info|package information]] and the [[../data#contact-info|contact information]]. |
This is a GET request via the URL <code>/item/<var>id</var></code> | This is a GET request via the URL <code>/item/<var>id</var></code> | ||
| سطر 19: | سطر 19: | ||
== <code>request_insertion</code> == | == <code>request_insertion</code> == | ||
| − | <code>( <var>package-info</var>: [[#package-info|package-info]], <var>contact-info:</var> [[#contact-info|contact-info]], <var>accept-terms</var>: boolean )</code> | + | <code>( <var>package-info</var>: [[../data#package-info|package-info]], <var>contact-info:</var> [[../data#contact-info|contact-info]], <var>accept-terms</var>: boolean )</code> |
Initiates an [[../workflow#insertion request|insertion request]]. Where: | Initiates an [[../workflow#insertion request|insertion request]]. Where: | ||
| − | * [[#package-info|package-info]] : package information record | + | * [[../data#package-info|package-info]] : package information record |
| − | * [[#contact-info|contact-info]] : contact information record | + | * [[../data#contact-info|contact-info]] : contact information record |
* accept-terms : a boolean flag indicating the acceptance of the terms of service. | * accept-terms : a boolean flag indicating the acceptance of the terms of service. | ||
This request is a POST request | This request is a POST request | ||
| سطر 47: | سطر 47: | ||
<code>( <var>token</var>: string([[/cryptographic token|cryptographic token]]) )</code> | <code>( <var>token</var>: string([[/cryptographic token|cryptographic token]]) )</code> | ||
| − | Initiates the [[../workflow#Listing removal|removal of a listing]] from the public listings into the [[../data | + | 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>. |
== <code>get_user_listings</code> == | == <code>get_user_listings</code> == | ||
| سطر 54: | سطر 54: | ||
Initiates a [[../workflow#Listings retrieval|listings retrieval]] procedure | Initiates a [[../workflow#Listings retrieval|listings retrieval]] procedure | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
</div> | </div> | ||
مراجعة 15:07، 1 يناير 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_listing
( token: string(cryptographic token) )
Instates a listing via user action.
This is a GET request via the URL /instate-listing/cryptographic-token
request_removal
( id: string(id) )
Initiates a listing deletion request
This is a GET request via the URL /delete-request/cryptographic-token
remove_listing
( token: string(cryptographic 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.
get_user_listings
( email-address )
Initiates a listings retrieval procedure