Skip to content

Ticket based raffle draw project where user can buy a or multiple tickets with price. Requirement: shorturl.at/cdiMN

Notifications You must be signed in to change notification settings

saifakib/raffle-draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raffle Draw

Ticket based raffle draw project where user can buy a or multiple tickets with price.

Explain

  • Create a ticket instance object from Ticket Class.
  • Another TicketCollection Class which have crud, search, filtering facilities.
  • From Controller have to write operation using TicketCollection instance.
  • Using one TicketCollection instance in whole system.
  • Data store in db.json file using file system.

API Endpoint

  • GET /api/v1/tickets
  • POST /api/v1/tickets
Content-Type: application/json
{
    "username": "akibsaif",
    "price": 200
}
  • GET /api/v1/tickets/t/{id}
  • PUT /api/v1/tickets/t/{id}
Content-Type: application/json
{
    "username": "akib",
    "price": 200
}
  • DELETE /api/v1/tickets/t/{id}
  • GET /api/v1/tickets/u/{username}
  • PUT /api/v1/tickets/u/{username}
Content-Type: application/json

{
    "username": "Saifs",
    "price": 200
}
  • DELETE http://localhost:8000/api/v1/tickets/u/{username}
  • POST http://localhost:8000/api/v1/tickets/bulk
Content-Type: application/json

{
    "username": "rrr",
    "price": 300,
    "quantity": 3
}
  • GET http://localhost:8000/api/v1/tickets/draw?{wc={number}}

About

Ticket based raffle draw project where user can buy a or multiple tickets with price. Requirement: shorturl.at/cdiMN

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published