linxo-client-api

1.0.8 • Public • Published

Linxo Javascript SDK

An sdk allowing you to use the Linxo v2 API with ease. Details of API endpoints and parameters are available at https://api.linxo.com/v2/documentation

Getting started

Installing

You have to install the sdk in your project. Using node with npm:

npm install linxo-client-api --save

Using Bower

bower install linxo-client-api --save

From a CDN :

<script src="path/to/lib/linxo.min.js"></script>

How to use ?

Include sdk using nodeJs :

const Linxo = require('linxo')

Include sdk in html

<script src="path/to/dist/linxo.min.js"></script>

Instanciate client :

var linxoClient = new Linxo({
      token: token,
      domain: 'https://kong-api-linxo.dev.linxo.com/v2'
    })

Then, just make a query in one endpoint :

linxoClient.getProviders({limit: 250})
  .then(response => console.log(response.result))
  .catch(error => console.log(error))

Building your own sdk

The project is generated from the Linxo v2 API swagger specifications using Swagger-js-codegen.

In the build folder you will find a templates folder containing the methods and class. You can adapt it to your needs.

To generate the sdk, simply use the builder provided for this purpose:

npm run build

Examples

You can run our examples to see how it works

git clone repository/linxo-client-api
npm install

Generate a jwt token using our API Reference

Replace token variable

var token = 'NEW TOKEN VALUE'

Open browser example in a browser or launch the nodejs example

node examples/node.js

Readme

Keywords

Package Sidebar

Install

npm i linxo-client-api

Weekly Downloads

0

Version

1.0.8

License

MIT

Unpacked Size

384 kB

Total Files

17

Last publish

Collaborators

  • toninho
  • yciabaud