Skip to content
/ Hexabin Public

A Node.js/Express.js REST API to GET and CONVERT binary, hexadecimal, octal, and decimal formats.

License

Notifications You must be signed in to change notification settings

ANG13T/Hexabin

Repository files navigation

Hexabin

Logo

A Node.js/Express.js REST API to GET and CONVERT binary, hexadecimal, octal, and decimal formats.

Website

Visit https://hexabin.herokuapp.com

API Documentation

Base URL for all endpoints https://hexabin.herokuapp.com/api

Endpoints

Routes Description
GET /api/:format Get a binary, hexadecimal, octal, random, or decimal value.

Path Parameters-

format: format to retreive (only: hex, binary, octal, random, or decimal)

Query Parameters-

?length: length of value

?amount: amount of values

Example Requests-

GET /api/binary

GET /api/decimal

GET /api/random?amount=2

GET /api/hex?amount=4

GET /api/octal?amount=4&length=3

Example Responses-

{"result":["1101"], "error":false}

{"result":["503"], "error":false}

{"result":["41985","#F38599"], "error":false}

{"result":["#651F54","#B2F4DE","#8A64B2","#5233F1"], "error":false}

{"result":["456","141","620","102"], "error":false}

Routes Description
GET /api/:from/:fromValue/convert/:to Convert values of different formats.

Path Parameters-

from: value to convert from (binary, decimal, octal, or hex)

fromValue: the value of the format to convert from

to: value to convert to (binary, decimal, octal, or hex)

Example Requests-

GET /api/binary/1010/convert/decimal

GET /api/decimal/12/convert/octal

GET /api/hex/12/convert/binary

GET /api/octal/7435/convert/hex

Example Responses-

{"result":10, "error":false}

{"result":"14", "error":false}

{"result":"10010", "error":false}

{"result":"F1D", "error":false}

Usage

  • You are retreiving format values for an app or website.
  • You are making a quiz game about binary.
  • You want to convert octal to binary without doing all the hassle yourself.

Authors

Support

Please create a new issue for support and issues.

Issues or Bugs

Please use the BUG_REPORT or FEATURE_REQUEST to submit any issues ot bugs encountered.

Contributing

Please read the CONTRIBUTING for details on contributing to the Hexabin API.

License

This project is licensed under MIT. Please read the LICENSE for details.


Hexabin API is maintained by angelina-tsuboi.

About

A Node.js/Express.js REST API to GET and CONVERT binary, hexadecimal, octal, and decimal formats.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published