Skip to content

Commit

Permalink
Add api routes (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhinodavid authored and cashpw committed Oct 20, 2016
1 parent 44356bd commit 6b7b1f6
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
1. [Roadmap](#roadmap)
1. [Team](#team)
1. [Contributing](#contributing)
1. [API](#API)

<!--
## Usage
Expand Down Expand Up @@ -49,3 +50,73 @@ View the [project backlog](https://github.com/manatee-matinee/piddle/issues).

See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

## API

### POST /api/bill

>Creates a new bill.
#### Resource Information

Response format: JSON
Requires authentication: Yes

#### Parameters

- description (string)
- tax (number)
- tip (number)
- items (Array of item(object))
- item.description (string)
- item.price (number)
- payer (userId)


#### Response

- error (object):
- null
or
- message (string): description of the error

- data (object):
- id (string): 4-char id of the bill

### GET /api/bill/:id

>Retrieves a bill.
#### Resource Information

Response format: JSON
Requires authentication: Yes

#### Parameters

- id (string): 4-char id of the bill

#### Response

- error (object):
- null
or
- message (string): description of the error

- data (object):
- id (string)
- description(string)
- tax (number)
- tip (number)
- items(Array of item(object))
- item.id (string)
- item.description (string)
- item.price (number)
- item.paid (boolean)
- item.debtor (object)
- debtor.id (string)
- debtor.displayName (string)
- debtor.profilePictureUrl (string)
- payer (object)
- payer.id (string)
- payer.displayName (string)
- payer.profilePictureUrl (string)

0 comments on commit 6b7b1f6

Please sign in to comment.