Skip to content

calynnellington/DemoBankAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DemoBankAPI

Simple proof of concept for a Banking API.

This app requires curl. To use this app, visit the following url. You will be prompted to make some accounts. Below are some templates for the curl commands, depending on your system they might be different. This server is not currently running.

//Initial User Creation
curl http://60d0ba9e.ngrok.io/

//Add an account
curl -X POST -H "Content-Type: application/json" -d '{"name": "Main Account"}' http://60d0ba9e.ngrok.io/accounts/new_ac

//Add a transaction. Replace accountid with the account desired. Negatives represent withdrawals.
curl -X POST -H "Content-Type: application/json" -d '{"amount": 10000}' http://60d0ba9e.ngrok.io/accounts/accountid/tx/new
curl -X POST -H "Content-Type: application/json" -d '{"amount": -789}' http://60d0ba9e.ngrok.io/accounts/accountid/tx/new

//JSON Endpoints. Replace txid and accountid with the desired accounts/transactions
Account
curl http://60d0ba9e.ngrok.io/accounts/accountid/JSON

All transactions for a specific account
curl http://60d0ba9e.ngrok.io/accounts/accountid/tx/JSON

Specific transaction information
curl http://60d0ba9e.ngrok.io/accounts/accountid/tx/txid/JSON

//Reset application
curl http://60d0ba9e.ngrok.io/reset

If you follow along with each command below, you will be exposed to the different functionality of the app. Comments welcome!

curl http://60d0ba9e.ngrok.io/
curl -X POST -H "Content-Type: application/json" -d '{"name": "Main Account"}'  http://60d0ba9e.ngrok.io/accounts/new_ac
curl -X POST -H "Content-Type: application/json" -d '{"amount": 10000}'  http://60d0ba9e.ngrok.io/accounts/accountid/tx/new
curl -X POST -H "Content-Type: application/json" -d '{"amount": -789}'  http://60d0ba9e.ngrok.io/accounts/accountid/tx/new
curl http://60d0ba9e.ngrok.io/accounts/accountid/JSON
curl http://60d0ba9e.ngrok.io/accounts/accountid/tx/JSON
curl http://60d0ba9e.ngrok.io/accounts/accountid/tx/txid/JSON
curl http://60d0ba9e.ngrok.io/
curl http://60d0ba9e.ngrok.io/reset```

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages