kghalamb / AirStage

0 stars 0 forks source link

Test results Arne Noori #10

Open arnenoori opened 11 months ago

arnenoori commented 11 months ago

Example Workflows:

Example Workflow 1: Performer Booking a Venue

  1. Get Open Venues:

    curl -X 'GET' \
    'https://airstage-api.onrender.com/catalog/venues/' \
    -H 'accept: application/json'

    Response:

    [
    {
    "venue_id": 1,
    "name": "Outside Lands",
    "location": "San Francisco",
    "capacity": 10000,
    "price": 50000,
    "time_available": "2023-10-28T00:00:00+00:00",
    "time_end": "2023-10-28T03:00:00+00:00"
    }
    ]
  2. Create Booking (Performer-side):

    curl -X 'POST' \
    'https://airstage-api.onrender.com/book/create/request_venue/1' \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '{
    "venue_id": 1
    }'

Response:

{
  "success": true
}
  1. Get Performers:
    curl -X 'GET' \
    'https://airstage-api.onrender.com/catalog/performers/' \
    -H 'accept: application/json'

Response:

[
  {
    "performer_id": 1,
    "name": "Iann Dior",
    "capacity_preference": 8000,
    "price": 13000,
    "time_available": "2023-11-06T05:00:00+00:00",
    "time_end": "2023-11-06T07:05:00+00:00"
  }
]
  1. Get booking (Venue-side):
    
    curl -X 'GET' \
    'https://airstage-api.onrender.com/catalog/booking/3' \
    -H 'accept: application/json'
    Response:
    `{
    "success": true
    }`

Responses:

{ "venue_id": 1, "performer_id": 1, "time_start": "2023-11-06T21:00:00+00:00", "time_end": "2023-11-06T23:00:00+00:00" }

New Test Cases:

1. Get User Information:

curl -X 'GET' \ 'https://airstage-api.onrender.com/catalog/user/5' \ -H 'accept: application/json'


Response:
`{}`

_You would benefit from improved error handling to provide more informative responses when a requested resource is not found._

User Sign UP: 

curl -X 'POST' \ 'https://airstage-api.onrender.com/user/signup/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "username": "testusername", "password": "password", "user_type": "admin" }'


Response:

{ "success": false }


User sign in

curl -X 'POST' \ 'https://airstage-api.onrender.com/user/signin/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "username": "testusername", "password": "password", "user_type": "admin" }'


Response:

{ "success": false }

2. Get Booking:
`curl -X 'GET' \
  'http://127.0.0.1:3000/catalog/booking/1' \
  -H 'accept: application/json'`

Responses:
`{
  "venue_id": 1,
  "performer_id": 1,
  "time_start": "2023-10-28T00:00:00+00:00",
  "time_end": "2023-10-28T03:00:00+00:00"
}`

3. Get Performer
`curl -X 'GET' \
  'http://127.0.0.1:3000/catalog/performers/1' \
  -H 'accept: application/json'`

Responses:
`{
  "performer_id": 1,
  "name": "Performer 1",
  "capacity_preference": 5000,
  "price": 25000,
  "time_available": "2023-10-28T00:00:00+00:00",
  "time_end": "2023-10-28T03:00:00+00:00"
}`

Book Venue:

curl -X 'POST' \ 'https://airstage-api.onrender.com/book/create/request_venue/1' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "venue_id": 0, "name": "string", "location": "string", "capacity": 0, "price": 0, "time_available": "string", "time_end": "string" }'


Response:

{ "success": false }