Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
voatapi
Advanced tools
Readme
Compatible with Voat Version: 1.0.5638.22054
First make sure you export your voat credentials to environment variable like so:
export VOATURL="https://www.voat.co"
export VOATAPIPATH="/api/v1"
export VOATAPIKEY="<YOUR_API_KEY>"
export VOATUID="<YOUR_VOAT_USER_ID>"
export VOATPWD="<YOUR_VOAT_PASSWD>"
IMPORTANT: NEVER EVER COMMIT YOUR CREDENTIALS TO PUBLIC
A good way to do this is to include the shell script you use to .gitignore
Next, you need to login to acquire the token. You need to do this very infrequently after the first time. Check your token expiration date from your response.
api.login().then( function( result ) {
// do something with token
console.log( result.access_token );
});
Next, all functions within this package return promises. That means that you can organize your code in the followind fashion:
api.loadToken( token ).then( api.getUserPreference ).then( function ( res ) {
console.log( res );
}, function ( err ) {
console.log( err );
});
In most cases, you will need to pass a parameter, so bind the function to correct context:
api.loadToken( token ).then(
api.postUserMessage.bind(this, { body:
{ recipient: "dchem",
subject: "Yo DAWG",
message: "I heard you like voat" } } )
).then( function ( res ) {
console.log( res );
}, function ( err ) {
console.log( err );
});
See LICENSE file.
FAQs
voat API wrapper for Node.js
The npm package voatapi receives a total of 1 weekly downloads. As such, voatapi popularity was classified as not popular.
We found that voatapi 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.