From e4669eaf9700ecc503bee3305315256968bd05e5 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Wed, 18 Aug 2021 13:45:18 -0500 Subject: Compiled existing api docs to ./apidoc/ --- apidoc/api_data.json | 705 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 705 insertions(+) create mode 100644 apidoc/api_data.json (limited to 'apidoc/api_data.json') diff --git a/apidoc/api_data.json b/apidoc/api_data.json new file mode 100644 index 00000000..180cbe16 --- /dev/null +++ b/apidoc/api_data.json @@ -0,0 +1,705 @@ +[ + { + "type": "get", + "url": "/accounts", + "title": "Retrieve list of accounts", + "name": "accounts", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of accounts

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"accounts\" : [\n { \"user\": 'Adam', \"account_id\": '123', balance: 500 ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/deposits", + "title": "Retrieve summary of deposits", + "name": "deposits", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of deposits

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"deposits\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/users", + "title": "Retrieve user list", + "name": "getUsers", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "Object", + "optional": false, + "field": "users", + "description": "

List of users

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'John Doe', \"email\": 'johndoe@gmail.com', ...},\n { \"username\": 'Jane Doe', \"email\": 'janedoe@gmail.com', ...}\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/invoices", + "title": "Retrieve summary of invoices", + "name": "invoices", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of invoices

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"invoices\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/orders", + "title": "Retrieve summary of orders", + "name": "orders", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of orders

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"orders\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/payments", + "title": "Retrieve summary of payments", + "name": "payments", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of payments

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"payments\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/referrals", + "title": "Retrieve list of referral tokens", + "name": "referrals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of referral tokens

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/referrals", + "title": "Retrieve list of referral tokens", + "name": "referrals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of referral tokens

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"referrals\" : [\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername1', expiry: null },\n { \"token\": '***', \"status\": 'pending', sponsor: 'Adam', user: 'newUsername2', expiry: null },\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/user_kyc", + "title": "Retrieve user kyc details", + "name": "user_kyc", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of kyc details for each user

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"users\" : [\n { \"username\": 'Adam', \"email\": 'adam@gmail.com', ... kyc_data... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/transactions", + "title": "Retrieve summary of user transactions", + "name": "user_transactions", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of invoices, payments, orders for users

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"transactions\" : [\n { \"username\": 'Adam', \"email\": 'adam@gmail.com', invoices: 1, orders: 0, payments: 2 },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "get", + "url": "/withdrawals", + "title": "Retrieve summary of withdrawals", + "name": "withdrawals", + "group": "Admin", + "permission": [ + { + "name": "admin" + } + ], + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "returns", + "description": "

list of withdrawals

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"withdrawals\" : [\n { \"seller\": 'Adam', \"buyer\": 'bob' ... },\n ...\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/admin.js", + "groupTitle": "Admin" + }, + { + "type": "post", + "url": "/grant", + "title": "Grant Referral code", + "name": "Grant", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "

of member generating referral code.

" + }, + { + "group": "Parameter", + "type": "expiry", + "optional": false, + "field": "optional", + "description": "

expiry date for token.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "token", + "description": "

referral token

" + }, + { + "group": "Success 200", + "type": "Date", + "optional": false, + "field": "expiry", + "description": "

optional expiry

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/grant", + "title": "Grant Referral code (variation using get)", + "name": "Grant", + "group": "Referrals", + "permission": [ + { + "name": "member" + }, + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "

of member generating referral code.

" + }, + { + "group": "Parameter", + "type": "expiry", + "optional": false, + "field": "optional", + "description": "

expiry date for token.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "type": "String", + "optional": false, + "field": "token", + "description": "

referral token

" + }, + { + "group": "Success 200", + "type": "Status", + "optional": false, + "field": "status", + "description": "

referral status

" + }, + { + "group": "Success 200", + "type": "Date", + "optional": false, + "field": "expiry", + "description": "

optional expiry

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"token\": \"*********\", \n \"status\": \"available\", \n \"expiry\": null\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/checkTokens/:sponsor_id", + "title": "Retrieve list of referral tokens generated by this user", + "name": "checkTokens", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "sponsor_id", + "optional": false, + "field": "user_id", + "description": "

of member generating referral code.

" + }, + { + "group": "Parameter", + "type": "status", + "optional": false, + "field": "optional", + "description": "

token status.

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "tokens", + "description": "

array of token objects

" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"tokens\": [\n {\"token\": \"*********\", \"status\": \"available\", \"expiry\": null}\n ]\n}", + "type": "json" + } + ] + }, + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/isReferred/:user_id", + "title": "Check if user is referred", + "name": "isReferred", + "group": "Referrals", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "user_id", + "optional": false, + "field": "user", + "description": "

id

" + } + ] + } + }, + "success": { + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n true\n}", + "type": "json" + } + ] + }, + "description": "

returns boolean indicating if user is referred or not

", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "post", + "url": "/joinQueue", + "title": "Join waiting list (track email & phone)", + "name": "joinQueue", + "group": "Referrals", + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "email", + "optional": false, + "field": "email", + "description": "

address

" + }, + { + "group": "Parameter", + "type": "phone", + "optional": false, + "field": "phone", + "description": "

number

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "verified", + "defaultValue": "true", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"success\": true\n \"message\": 'Added to waiting list'\n}", + "type": "json" + } + ] + }, + "description": "

referral token is updated with existing user_id

", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + }, + { + "type": "get", + "url": "/verify/:user_id", + "title": "Verify token and apply to existing user", + "name": "verify", + "group": "Referrals", + "permission": [ + { + "name": "member" + } + ], + "parameter": { + "fields": { + "Parameter": [ + { + "group": "Parameter", + "type": "user_id", + "optional": false, + "field": "Current", + "description": "

user

" + }, + { + "group": "Parameter", + "type": "token", + "optional": false, + "field": "Token", + "description": "

to validate

" + } + ] + } + }, + "success": { + "fields": { + "Success 200": [ + { + "group": "Success 200", + "optional": false, + "field": "verified", + "defaultValue": "true", + "description": "" + } + ] + }, + "examples": [ + { + "title": "Success-Response:", + "content": "HTTP/1.1 200 OK\n{\n \"verified\": true\n}", + "type": "json" + } + ] + }, + "description": "

referral token is updated with existing user_id

", + "version": "0.0.0", + "filename": "routes/referrals.js", + "groupTitle": "Referrals" + } +] -- cgit v1.2.3