
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@encephalon/sdk
Advanced tools
This client is a thin wrapper for the Encephalon API to use in Node.js and the browser.
npm install @encephalon/sdk
encephalon exposes a single function that takes a single options object for configuration and returns the client
options
token stringThe access token. You can find or create one in your dashboard
cache (optional)Allows custom cache implementation, defaults to memory
ttl integer (optional)A cache entry's time to live in ms, defaults to 3600000
maxRetries integer (optional)Number of attempts to retry a request if an error occurs, defaults to 2
timeout integer (optional)How long before the request aborts in ms, defaults to 5000
concurrency integer (optional)Max concurrent requests, defaults to 3
interval integer (optional)Duration of delay between requests to avoid API rate limits, defaults to 16
Example
// require encephalon
import encephalon from '@encephalon/sdk';
// create a client with your access token
const client = encephalon({
token: '{YOUR_ACCESS_TOKEN}',
});
// make requests
await client.get(`experiences/${id}`);
await client.post(`experiences/${id}`)
.send({ name: 'hello' });
await client.delete(`experiences/${id}`);
all, get, post, put, patch, deleteAll requests take a string for the API path and return a thenable superagent object. See the Example section above.
await client.all(`experiences`);
await client.get(`experiences/${id}`);
await client.post(`experiences/${id}`)
.send({ name: 'hello' });
await client.delete(`experiences/${id}`);
cachebustIgnores the cache and cachebusts the URL
await client.get(`experiences/${id}`)
.cachebust();
pageFor pagination, sets the page number
await client.all(`experiences`)
.page(2);
perPageFor pagination, sets quantity per page
await client.all(`experiences`)
.perPage(5);
tokenSets the token with the passed value. Can also be used as a getter.
client.token('{TOKEN}'); // sets token
const tkn = client.token(); // gets token
Documentation is a WIP
To run the test suite:
npm installnpm testPlease see the package.json engines for supported environments
FAQs
javascript sdk for encephalon api
We found that @encephalon/sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.