User Tools

Site Tools


api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
api [2020/08/16 17:00]
A User Not Logged in old revision restored (2019/12/02 01:03)
api [2020/08/17 09:12] (current)
A User Not Logged in old revision restored (2020/08/16 17:00)
Line 3: Line 3:
 The official website and add-ons store have a public API currently offering read-only access to resources using REST and JSON. The official website and add-ons store have a public API currently offering read-only access to resources using REST and JSON.
  
-https://www.litecart.net/api/releases +Make a HTTP GET request for the following URLs: 
-https://www.litecart.net/api/addons + 
-https://www.litecart.net/api/addons/{id}+^ Endpoint                                   ^ Pagination  ^ Search Filter ^ 
 +https://www.litecart.net/api/releases      | Yes         | - | 
 +| https://www.litecart.net/api/releases/{version} | -           | -   | 
 +https://www.litecart.net/api/addons        | Yes         | Yes | 
 +https://www.litecart.net/api/addons/{id}   | -           | -   | 
 + 
 +===== Pagination ===== 
 + 
 +Endpoints supporting pagination will return a header like the following: 
 + 
 +    Link: <https://...?page=1>; rel=first, <https://...?page=1>; rel=prev, <https://...?page=2>; rel=next,<https://...?page=2>; rel=last 
 + 
 +You can extract a pagination link using regular expressions: 
 + 
 +    if (preg_match('#<(.*?)>; rel="?next"?#m', $headers, $matches)) { 
 +      $next_link = $matches[1]; 
 +    } 
 + 
 +===== Search Filter ===== 
 + 
 +Endpoints supporting search filter uses a HTTP GET query parameter like the following: 
 + 
 +    https://...?query=my+search+string
  
api.txt · Last modified: 2020/08/17 09:12 by A User Not Logged in