Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bounty0xapi-contrib

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bounty0xapi-contrib

A package to interact with the API of bounty0x.io

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

API Client for Bounty0x.io

Usage

The client, once initialized, holds session data.

Example of usage:

const client = new require("bounty0xapi-contrib");
client.login("jdoe", "letmein!").then(d => {
  console.log(d.username);
  client.submit(164, "whatever.test/screenshot.png", "website stops responding if you press all buttons at once").then(r => console.log(r.submissionID));
});

Client (opts)

Opts might contain:

  • url: the root url for the API. Defaults to https://api.bounty0x.io/v1
  • credentials: object with credentials
Client.login (username, password)

Logs in using username and password. Returns a object with login data. Once the login is done, the session token is stored for future requests.

Client.listBounties ()

Returns list of bounties.

Client.listSubmissions (id)

Returns a array of all submissions to a specific bounty made by the user that is logged in.

Client.bountyInfo (id)

Returns information about a bounty.

Client.listAllSubmissions ()

Returns a array with all submissions made by user that is logged in.

Makes a submission, to bounty with id id, where the submission link is link and the comment is comment. Returns information about submission.

Edits the submission wtih submission id id to have link link and comment comment. Returns information about submission.

Client.deleteSubmission (id)

Deletes submission with submission id id

Client.logout ()

Removes current session.

Client.credentials

Holds the credentials used to authenticate with server. This might be a empty object for a logged out user, or for a logged in user will contain:

  • jwt: the JSON Web Token used to authenticate
  • username: the username

Client.opts

Options supplied when initializing.

Keywords

FAQs

Package last updated on 11 Nov 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc