Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sharetribe/flex-integration-sdk-js
Sharetribe Flex Integration API SDK for JavaScript
https://github.com/sharetribe/flex-integration-sdk-js
Last synced: 8 days ago
JSON representation
Sharetribe Flex Integration API SDK for JavaScript
- Host: GitHub
- URL: https://github.com/sharetribe/flex-integration-sdk-js
- Owner: sharetribe
- License: apache-2.0
- Created: 2019-11-25T14:02:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-12T12:43:24.000Z (9 months ago)
- Last Synced: 2024-04-26T19:47:07.282Z (7 months ago)
- Language: JavaScript
- Homepage: https://sharetribe.github.io/flex-integration-sdk-js/
- Size: 12.9 MB
- Stars: 5
- Watchers: 11
- Forks: 7
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Sharetribe Integration SDK for JavaScript
Use Sharetribe Integration API with ease.
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/sharetribe/flex-integration-sdk-js/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/sharetribe/flex-integration-sdk-js/tree/master)
## Table of Contents
* [What is it?](#what-is-it)
* [Installation](#installation)
* [Usage](#usage)
* [Examples](#examples)
* [Documentation](#documentation)
* [License](#license)## What is it?
The SDK is the **easiest** way to interact with Sharetribe Integration API.
It handles **groundwork** such as authentication, renewing authentication tokens
and serializing and deserializing data to and from JavaScript data structures.This lets you to **concentrate on building your integration** instead
of setting up the necessary boilerplate to communicate with the API.## Installation
Yarn:
```sh
yarn add sharetribe-flex-integration-sdk
```## Usage
```js
const sharetribeIntegrationSdk = require('sharetribe-flex-integration-sdk');// Create new SDK instance
const integrationSdk = sharetribeIntegrationSdk.createInstance({
clientId: '',
clientSecret: ''
});// Query first 5 listings
integrationSdk.listings
.query({ perPage: 5 })
.then(res => {
// Print listing titles
res.data.data.forEach(listing => {
console.log(`Listing: ${listing.attributes.title}`)
});
})
.catch(res => {
// An error occurred
console.log(`Request failed with status: ${res.status} ${res.statusText}`);
});
```Client ID and client secret are required to create a new SDK instance.
See [this article](https://www.sharetribe.com/docs/introduction/getting-started-with-integration-api/#create-integration-api-application-in-sharetribe-console)
to learn how to get them.## Examples
See the
[integration-api-examples](https://github.com/sharetribe/integration-api-examples)
repository on GitHub.## Documentation
[Documentation can be found
here](https://sharetribe.github.io/flex-integration-sdk-js/).## Changelog
See
[CHANGELOG.md](https://github.com/sharetribe/flex-integration-sdk-js/blob/master/CHANGELOG.md).## License
Distributed under [The Apache License, Version
2.0](https://github.com/sharetribe/flex-integration-sdk-js/tree/master/LICENSE)