0.0.12 • Published 1 year ago

@bruinenco/bruinen-sdk v0.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

View full documentation at https://docs.bruinen.xyz

The Bruinen SDK makes it easy for developers to access the API without having to interact with server code directly. The SDK is currently only available in Javascript (written 100% in Typescript). It is available as both a browser script or as a backend SDK. All endpoints will be strongly types with Typescript. Use in the backend with Node.js npm install @bruinen/bruinen-sdk yarn add @bruinen/bruinen-sdk Once the SDK is installed you can instantiate it wherever you need with: const Bruinen = new Bruinen({ type: "apiKey" apiKey: "YOUR_API_KEY" }); Use in the browser This section is under construction

Available functions

Sources Pulling data using the SDK is super easy. All sources available in the API reference are also available by name in the SDK. To reach a specific source, for example Github: // In your actual code you will need to pass authentication options const bruinen = new Bruinen({});

// This object will have any github source methods available const github = bruinen.github(accountId);

const profile = await github.getProfile(); All endpoints available on the sources are available via the SDK with get prepended to the path name. For example /tweets => .getTweets() and /profile => .getProfile()

0.0.12

1 year ago