Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timneutkens/seoshop-api-js
Javascript api client for SEOshop
https://github.com/timneutkens/seoshop-api-js
Last synced: about 1 month ago
JSON representation
Javascript api client for SEOshop
- Host: GitHub
- URL: https://github.com/timneutkens/seoshop-api-js
- Owner: timneutkens
- License: mit
- Created: 2016-02-14T10:45:08.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-24T14:01:07.000Z (over 7 years ago)
- Last Synced: 2024-04-14T23:17:46.573Z (10 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lightspeed eCom isomorphic api client
Lightspeed eCom API implementation for Javascript.
## Usage
`npm install --save lightspeed-ecom`
## Example
```js
const apiClient = require('lightspeed-ecom')const apiKey = ''
const apiSecret = ''
const language = ''
const cluster = 'api.webshopapp.com' // See http://developers.lightspeedhq.com/ecom/introduction/introduction/const fetch = apiClient(apiKey, apiSecret, language, cluster)
async function getProducts() {
const res = await fetch('products') // Can be any resource documented. In this case http://developers.lightspeedhq.com/ecom/endpoints/product/
const json = await res.json()return json
}async function logProducts() {
const products = await getProducts()
console.log(products)
}logProducts()
```