@martinprobu/clique-sdk
v1.2.21
Published
Clique SDK provides a typescript library to access Clique functionalities.
Downloads
1
Readme
clique-sdk
Clique SDK provides a typescript library to access Clique functionalities.
Setup
Request your apiKey, apiSecret from Clique
Setup your GitHub personal access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Create .npmrc file and replace ${{github.authToken}} with the token you applied in step 2
//npm.pkg.github.com/:_authToken=${{github.authToken}}
@cliqueofficial:registry=https://npm.pkg.github.com/
- Usage examples
import { CliqueClient } from '@cliqueofficial/clique-sdk';
const apiKey = 'YOUR API KEY';
const apiSecret = 'YOUR API SECRET';
const client = new CliqueClient({
apiKey,
apiSecret,
});
client.twitter
.getOAuth2Link({
client_id: '',
redirect_uri: '',
})
.then((data) => {
console.log(data);
});
client.campaign
.getStatistics({
walletAddress: '',
twitterAccessToken: '',
})
.then((data) => {
console.log(data);
});