Api

Titel

OldNew
11Api

Permalink

OldNew
11api

Inhalt

OldNew
1# LiteCart Public API
12
3The official website and add-ons store have a public API currently
4offering read-only access to resources using REST and JSON.
5
6Make a HTTP request to the following URLs:
7
8\^ Method \^ Endpoint \^ Pagination \^ Search Filter \^ Limit \^ | GET
9| | Yes | - | Yes | | GET
10| | - | - | -
11| | GET | | Yes | Yes | Yes
12| | GET | | - | -
13| - |
14
15## Search Filter
16
17Endpoints supporting search filter uses a HTTP GET query parameter like
18the following:
19
20 [https://](https://)...?query=my+search+string
21
22## Limit Results
23
24Results can be limited to a desired number.
25
26 [https://](https://)...?limit=10
27
28## Pagination
29
30Endpoints supporting pagination will return a header like the following:
31
32 Link: ; rel=first, ; rel=prev, ; rel=next,; rel=last
33
34You can extract a pagination link using regular expressions:
35
36 if (preg_match('#; rel="?next"?#m', $headers, $matches)) {
37 $next_link = $matches[1];
38 }

Bearbeitet von %benutzer am %datum um %zeit