25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.8 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Breakups
  2. Creating a payment chain for bill splitting needs
  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` | `help` | - | URL to github repository |
  9. | `POST` | `total` | [standard](#standard) / [email](#email) | `{ "total": 200 }` |
  10. | `POST` | `perPerson` | [standard](#standard) / [email](#email) | `{ "perPerson": 30 }` |
  11. | `POST` | `oweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  12. | `POST` | `sortedOweChart` | [standard](#standard) / [email](#email) | [standard](#standard) / [email](#email) |
  13. | `POST` | `paymentChain` | [standard](#standard) / [email](#email) | [chain](#chain) |
  14. | `POST` | `emailPaymentChain` | [email](#email) | `["Email sent to user1@domain.com", "Email sent to user2@domain.com"]` |
  15. ## Expected Request / Response
  16. ### standard
  17. ```JSON
  18. {
  19. "users": [
  20. {
  21. "name": "Person1",
  22. "amount": 100
  23. },
  24. {
  25. "name": "Person2",
  26. "amount": 50
  27. },
  28. {
  29. "name": "Person3",
  30. "amount": 30
  31. }
  32. ]
  33. }
  34. ```
  35. ### chain
  36. ```JSON
  37. [
  38. {
  39. "from": "Person2",
  40. "to": "Person3",
  41. "amount": 10
  42. },
  43. {
  44. "from": "Person3",
  45. "to": "Person1",
  46. "amount": 40
  47. }
  48. ]
  49. ```
  50. ### email
  51. ```JSON
  52. {
  53. "users": [
  54. {
  55. "name": "Person1",
  56. "email": "person1@domain.com",
  57. "amount": 100
  58. },
  59. {
  60. "name": "Person2",
  61. "email": "person2@domain.com",
  62. "amount": 50
  63. },
  64. {
  65. "name": "Person3",
  66. "email": "person3@domain.com",
  67. "amount": 30
  68. }
  69. ],
  70. "mixmax-api": "your-mixmax-api-key"
  71. }
  72. ```