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 2.0 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Breakups
  2. Creating a payment chain for bill splitting needs. [Try it](https://breakups-webapp.herokuapp.com/) out now!
  3. [![Dependency Status](https://gemnasium.com/badges/github.com/binhonglee/Breakups.svg)](https://gemnasium.com/github.com/binhonglee/Breakups)
  4. api domain: `https://breakups.herokuapp.com/`
  5. ## API Call Documentations
  6. | Type | Call | Request | Response |
  7. |:-----|:-----|:--------|:---------|
  8. | `GET` | `/` | - | redirects to [documentation page](https://binhonglee.github.io/Breakups) |
  9. | `GET` | `/help` | - | redirects to github repository |
  10. | `GET` | `/webapp` | - | redirects to the [webapp](https://breakups-webapp.herokuapp.com/) |
  11. | `POST` | `/emailPaymentChain` | [email](#email) | `["Email sent to user1@domain.com", "Email sent to user2@domain.com"]` |
  12. | `POST` | `/total` | [standard](#standard) / [email](#email) | `{ "total": 200 }` |
  13. | `POST` | `/oweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  14. | `POST` | `/paymentChain` | [standard](#standard) / [email](#email) | [chain](#chain) |
  15. | `POST` | `/perPerson` | [standard](#standard) / [email](#email) | `{ "perPerson": 30 }` |
  16. | `POST` | `/sortedOweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  17. ## Expected Request / Response
  18. ### standard
  19. ```JSON
  20. {
  21. "users": [
  22. {
  23. "name": "Person1",
  24. "amount": 100
  25. },
  26. {
  27. "name": "Person2",
  28. "amount": 50
  29. },
  30. {
  31. "name": "Person3",
  32. "amount": 30
  33. }
  34. ]
  35. }
  36. ```
  37. ### chain
  38. ```JSON
  39. [
  40. {
  41. "from": "Person2",
  42. "to": "Person3",
  43. "amount": 10
  44. },
  45. {
  46. "from": "Person3",
  47. "to": "Person1",
  48. "amount": 40
  49. }
  50. ]
  51. ```
  52. ### email
  53. ```JSON
  54. {
  55. "users": [
  56. {
  57. "name": "Person1",
  58. "email": "person1@domain.com",
  59. "amount": 100
  60. },
  61. {
  62. "name": "Person2",
  63. "email": "person2@domain.com",
  64. "amount": 50
  65. },
  66. {
  67. "name": "Person3",
  68. "email": "person3@domain.com",
  69. "amount": 30
  70. }
  71. ],
  72. "mixmax-api": "your-mixmax-api-key"
  73. }
  74. ```