Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lithika-damnod/yvensb1-fiverr

api-work-test
https://github.com/lithika-damnod/yvensb1-fiverr

fiverr rest-api

Last synced: 24 days ago
JSON representation

api-work-test

Awesome Lists containing this project

README

        

# REST FRAMEWORK FOR CAR ADVERTISMENT SERVICE

### API Endpoints

###### SUCCESS EVENTS RETURN `{ success: true } `

- #### API Server Status

`"/api/"`

##### Allowed Methods: [GET]

image

- #### User Options

`"/api/user/"`

##### Allowed Methods: [POST, PUT]

- ##### POST

- can be used to **create** new users
- ###### JSON STRUCTURE

```
{
"first_name": "value",
"last_name": "value",
"age": value,
"address_no": "value",
"address_street": "value",
"address_city": "value",
"address_country": "value"
}
```


- ##### PUT

- for **updating** user details
- user_id is compulsory to be passed in
- pass in field names that needs to be changed along with the updated value
- ###### JSON STRUCTURE

```
{
"user_id": value,
"first_name": "value",
"last_name": "value",
"age": value,
"address_no": "value",
"address_street": "value",
"address_city": "value",
"address_country": "value"
}
```

- #### `"/api/user//"`
- **_ lists down details for a specific user id _**

##### Allowed Methods: [GET]

- ##### Example: `/api/user/1`
image


- #### Car Options

`"/api/car/"`

##### Allowed Methods: [GET, POST, PUT, DELETE]

- ##### GET

- Lists down **all** the available Cars

image

- ##### POST

- for creating **new** car objects
- ###### JSON STRUCTURE

```
{
"model": "value",
"brand": "value",
"number_plate": "value",
"user_id": value
}
```

- ##### PUT

- for updating created **car** objects
- user_id is compulsory to be passed in
- pass in field names that needs to be changed along with the updated value
- ###### JSON STRUCTURE

```
{
"car_id": value,
"model": "value",
"brand": "value",
"number_plate": "value",
"user_id": value
}
```

- ##### DELETE

- for deleting existing **car** records
- pass in only the value of car_id and it'll delete the record
- ###### JSON STRUCTURE

```
{
"car_id": value
}
```

- #### `"/api/car//"`

- **_ lists down details for a specific car id _**

##### Allowed Methods: [GET]

- ##### Example: `/api/car/2`
image

- #### Ad Options

`"/api/ad/"`

##### Allowed Methods: [GET, POST, PUT, DELETE]

- ##### GET

- Lists down **all** the available Ads

image

- ##### POST

- for creating **new** ads
- ###### JSON STRUCTURE

```
{
"title": "value",
"description": "value",
"price": "value",
"user_id": value,
"car_id": value
}
```

- ##### PUT

- for updating **Ad** objects
- ad_id is compulsory to be passed in
- pass in field names that needs to be changed along with the updated value
- ###### JSON STRUCTURE

```
{
"ad_id": value,
"car_id": value,
"model": "value",
"brand": "value",
"number_plate": "value",
"user_id": value
}
```

- ##### DELETE

- for deleting existing **Ad** records
- pass in only the value of **ad_id** and it'll delete the record
- ###### JSON STRUCTURE

```
{
"ad_id": value
}
```

- #### `"/api/ad//"`

- **_ lists down details for a specific Ad id _**

##### Allowed Methods: [GET]

- ##### Example: `/api/ad/1`
image