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

byte-api

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

byte-api

A simple API Wrapper around the Byte.co app. Single dependancy, utilizing node-fetch as the http client.

  • 1.1.1
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Byte-API

A simple API Wrapper around the Byte.co app. Single dependancy, utilizing node-fetch as the http client.

setup

if you use npm,

npm install byte-api

if you use yarn,

yarn add byte-api

Code

All methods that interact with your user account (Most that query the api) require you to be authorized or logged in first, as shown below.

const Byte = require("byte-api");

const Client = new Byte.Client("YourAuthorizationToken");

Client.setProfileColor(1) // Sets the user's profile color
.then((res) => {
    console.log(res);
})

Client.setBio("Just a random Bio") // Changes your BIO.
.then((res) => {
    console.log(res);
})

There are some exceptions though, they're accessed in a different way.

const Byte = require("byte-api");

Byte.Isolated.checkName("potato") // Checks a usernames avability without the need for authorization.
.then((res) => console.log(res))

Getting a Token

You can get a token by sniffing the http traffic of the app. in every request, there will be a header saying "Authorization: Token", copy that token and use it to logon. To do this, I used HttpCanary (From the Android App Store) and Nox App Player.

To-Do

  • Abide by x-ratelimit.
  • Find a way to allow login just using Username and Password.
  • Add more endpoints.
  • Add paging through feed.
  • Create classes for posts, users, and all those other things.
  • add a d.ts file

Contributions

I'd love for people to help out!

I have no standards for accepting PRs or issues. Have a neat idea? impliment it and send it over, and if it works well I'll approve. Though I might reformat it to fit the style of the rest of the repository.

If you're better at Javascript then me, feel free to make corrections or tell me how I can do something better!

FAQs

Package last updated on 26 Jan 2020

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