From 11d2a817df5965c192842e4c8f979574cf9c877c Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Sat, 21 Oct 2017 01:09:33 -0500 Subject: [PATCH] Added README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a6ec190 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +# Breakups + +Creating a payment chain for bill splitting needs + +api domain: `https:\\breakups.herokuapp.com\` + +## API Call Documentations + +| Type | Call | Request | Response | +|:-----|:-----|:--------|:---------| +| `GET` | `help` | - | URL to github repository | +| `POST` | `total` | [standard format](#standard-format) | `{ "total": 200 }` | +| `POST` | `perPerson` | [standard format](#standard-format) | `{ "perPerson": 30 }` | +| `POST` | `oweChart` | [standard format](#standard-format) | [standard format](#standard-format) | +| `POST` | `sortedOweChart` | [standard format](#standard-format) | [standard format](#standard-format) | +| `POST` | `paymentChain` | [standard format](#standard-format) | [chain format](#chain-format) | + +## Expected Request / Response + +### standard format + +```JSON +{ + "users": [ + { + "name": "Person1", + "amount": 100 + }, + { + "name": "Person2", + "amount": 50 + }, + { + "name": "Person3", + "amount": 30 + } + ] +} +``` + +### chain format + +```JSON +[ + { + "from": "Person2", + "to": "Person3", + "amount": 10 + }, + { + "from": "Person3", + "to": "Person1", + "amount": 40 + } +] +```