0.2.7 • Published 4 years ago

rebox-client v0.2.7

Weekly downloads
30
License
MIT
Repository
github
Last release
4 years ago

REBOX

Re.box is an api that tracks resuable and manages food containers as they traverse the hands of driver, consumers, and restaurant

React set-up

This is the react integration for the Rebox API. We provide you with the react component to embed in your checkout page in order to contact the backend.

If you are not using react, use the backend API below. Otherwise, this package will handle it all for you. npm i rebox-client

ReboxUserForm component

<ReboxUserForm onChange={(value) => this.setState({ your_state_var: value })} userId={your_user_id}>

value will be an object that looks like:

{
  optIn: boolean
}

sendReboxUserFormData(user : number, numItems : number, driverId : number, restaurantId: number)

This function will submit the data to our API and store it to the database. This function should only be called if the onChange value in the above component was set to true. It will return '200' or an error based on whether or not the request was successful.

Non-React Setup

Backend Docs

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago