1.2.21 • Published 11 months ago

@martinprobu/clique-sdk v1.2.21

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

clique-sdk

Clique SDK provides a typescript library to access Clique functionalities.

Setup

  1. Request your apiKey, apiSecret from Clique

  2. Setup your GitHub personal access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

  3. 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/
  1. 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);
  });
1.2.21

11 months ago