You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.1 KiB

7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Breakups
  2. Creating a payment chain for bill splitting needs
  3. api domain: `https:\\breakups.herokuapp.com\`
  4. ## API Call Documentations
  5. | Type | Call | Request | Response |
  6. |:-----|:-----|:--------|:---------|
  7. | `GET` | `help` | - | URL to github repository |
  8. | `POST` | `total` | [standard format](#standard-format) | `{ "total": 200 }` |
  9. | `POST` | `perPerson` | [standard format](#standard-format) | `{ "perPerson": 30 }` |
  10. | `POST` | `oweChart` | [standard format](#standard-format) | [standard format](#standard-format) |
  11. | `POST` | `sortedOweChart` | [standard format](#standard-format) | [standard format](#standard-format) |
  12. | `POST` | `paymentChain` | [standard format](#standard-format) | [chain format](#chain-format) |
  13. ## Expected Request / Response
  14. ### standard format
  15. ```JSON
  16. {
  17. "users": [
  18. {
  19. "name": "Person1",
  20. "amount": 100
  21. },
  22. {
  23. "name": "Person2",
  24. "amount": 50
  25. },
  26. {
  27. "name": "Person3",
  28. "amount": 30
  29. }
  30. ]
  31. }
  32. ```
  33. ### chain format
  34. ```JSON
  35. [
  36. {
  37. "from": "Person2",
  38. "to": "Person3",
  39. "amount": 10
  40. },
  41. {
  42. "from": "Person3",
  43. "to": "Person1",
  44. "amount": 40
  45. }
  46. ]
  47. ```