Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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()
```