MLS API SDK for JavaScript
Develop and deploy applications, mobile and web, with popular JavaScript Frameworks using MLS API SDK for JavaScript.
Install
yarn add mslapi-js-sdk
npm i mslapi-js-sdk
Example of Usage
import api from 'mslapi-js-sdk'
import axios from 'axios'
const { assists, setAxiosInstance } = api
await api.authentication.login({ username: <username>, password: <password> })
assists.getAll().then(res => {
console.log(res)
})
assists.getByID('xxx').then(res => {
console.log(res)
})
assists.add({
league_name: 'string',
standing: 'string',
player_name: 'string',
team_name: 'string',
assists: 'string',
tag: 'string'
}).then(res => {
console.log(res)
})
assists.updateByID({
id: 'string',
league_name: 'string',
standing: 'string',
player_name: 'string',
team_name: 'string',
assists: 'string',
tag: 'string'
}).then(res => {
console.log(res)
})
assists.deleteByID('xxx').then(res => {
console.log(res)
})
Available Modules
- assists
- authentication
- fixtures
- historicalData
- lasterNews
- offence
- players
- realTimeData
- standings
- teams
- topScorer
Methods
import {setToken, getToken} from 'mslapi-js-sdk';
The MLS API documentation is available here. If you need further assistance, don't hesitate to contact us.
License
This project is licensed under the BSD 3-Clause License.
Copyright
(c) 2022 Moat Systems Limited.