Skip to content

This project demonstrates the communication between book shop server, bank server and client using REST API

Notifications You must be signed in to change notification settings

dulstack/book-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book shop


The simple project for simulating the book selling/purchasing with REST API


Bank API

Bank API has the following function scripts:

  • (POST)/api/create_account -- variables: email, pwd
  • (POST)/api/log_in -- variables: email, pwd
  • (POST)/api/auth -- cookies: id, hash
  • -- response: id, email
  • (POST)/api/deposit -- cookies: id, hash; variables: ammount
  • (POST)/api/transfer -- cookies: id, hash, variables: id, ammount
  • (GET)/api/get_balance -- variables: id

Shop API

  • (POST)/api/create_account -- variables: email, pwd
  • (POST)/api/log_in -- variables: email, pwd
  • (POST)/api/auth -- cookies: id, hash
  • -- response: id, email
  • (POST)/api/add_book -- cookies: id, hash; variables: title, bank_id, price
  • (POST)/api/buy_book -- cookies: id, hash; variables: book_id, bank_id, bank_pwd
  • (GET)/api/list_books -- response: array of books(id, seller_id, seller_bank_id, price, title)
  • (GET)/api/list_owned_books -- cookies: id, hash; response: array of books(id, seller_id, seller_bank_id, price, title)
  • (GET)/api/book_info/:id -- response: seller_id, seller_bank_id, price, title

About

This project demonstrates the communication between book shop server, bank server and client using REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published