Byte-API
A simple API Wrapper around the Byte.co app, utilizing node-fetch as the http client w\ proxy support.
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 = ; const Client = "YourAuthorizationToken"; Client // Sets the user's profile color Client // Changes your BIO.
Example of a follow + like + subscribe bot:
const Byte = ; const Client = "YourAuthorizationToken"; let items = "Nice!" "cool" "welcome" "awesome" "^~^" let i = 0;; { let posts = await Client for let post of posts i++; await postauthor console; console; await post await console ;};
There are some exceptions though, they're accessed in a different way.
const Byte = ; ByteIsolated // Checks a usernames avability without the need for authorization.
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.
- Add more endpoints.
- Add paging through feed.
- 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!