1.2.5 • Published 3 years ago
swingbot-pro-sdk v1.2.5
Swingbot Pro SDK
This is the client for interacting with the Swingbot Pro API. This is for subscribers to the Swingbot Pro Platform.
Installation
npm install swingbot-pro-sdk
or
yarn add swingbot-pro-sdk
Methods
init
Initialize the client object
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
login
Login a user.
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
client.login(email, password)
.then(results => {
// do something
}).catch(e => {
// handle error
});
uploadVideo
Upload a video to Swingbot Pro for processing. Include the file to upload, the email of the user this file belongs to, and the id of the lesson program from the dashboard.
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
client.uploadVideo(file, email, lessonProgramId)
.then(uploadResults => {
// do stuff here!
})
.catch(e => {
// handle the error
});
getAnalysisById
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
client.getAnalysisById(analysisId)
.then(analysisResults => {
// do stuff here!
})
.catch(e => {
// handle the error
});
getVideosByUserId
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
client.getVideosByUserId(userId)
.then(videos => {
// do stuff here!
})
.catch(e => {
// handle the error
});
getWebsiteConfig
const SwingbotProSDK = require('swingbot-pro-sdk');
const client = SwingbotProSDK.init(API_KEY);
client.getWebsiteConfig()
.then(websiteConfig => {
// do stuff here!
})
.catch(e => {
// handle the error
});
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.1
4 years ago
1.1.2
4 years ago
1.1.0
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.11
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.9
4 years ago
1.0.10
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago