|
| 1 | +# LivingRooms |
| 2 | + |
| 3 | +1. TOC |
| 4 | +{:toc} |
| 5 | + |
| 6 | +### Parameters |
| 7 | +<ul class="nav nav-pills" role="tablist"> |
| 8 | + <li class="disabled"><a>OAuth Scopes:</a></li> |
| 9 | + <li class="active"><a href="#public" role="tab" data-toggle="pill">public</a></li> |
| 10 | + <li><a href="#rentals_write" role="tab" data-toggle="pill">rentals_write</a></li> |
| 11 | +</ul> |
| 12 | +<div class="tab-content" markdown="1"> |
| 13 | + <div class="tab-pane active" id="public" markdown="1"> |
| 14 | +Name | Type | Read/Write | Description |
| 15 | +--------------------|---------|------------|------------ |
| 16 | +id | Integer | Read | LivingRoom's id. |
| 17 | +--------------------|---------|------------|------------ |
| 18 | +bunk_beds_count | Integer | Read | LivingRoom's number of bunk beds. |
| 19 | +double_beds_count | Integer | Read | LivingRoom's number of double beds. |
| 20 | +kingsize_beds_count | Integer | Read | LivingRoom's number of kingsize beds. |
| 21 | +queensize_beds_count| Integer | Read | LivingRoom's number of queensize beds. |
| 22 | +single_beds_count | Integer | Read | LivingRoom's number of single beds. |
| 23 | +sofa_beds_count | Integer | Read | LivingRoom's number of sofa beds. |
| 24 | +--------------------|---------|------------|------------ |
| 25 | +created_at | [Time](/reference/enums#formats) | Read | LivingRoom's create time. |
| 26 | +updated_at | [Time](/reference/enums#formats) | Read | LivingRoom's update time. |
| 27 | +{: class="table table-bordered"} |
| 28 | + </div> |
| 29 | + <div class="tab-pane" id="rentals_write" markdown="1"> |
| 30 | +Name | Type | Read/Write | Description |
| 31 | +--------------------|---------|------------|------------ |
| 32 | +id | Integer | Read | LivingRoom's id. |
| 33 | +--------------------|---------|------------|------------ |
| 34 | +bunk_beds_count | Integer | Read/Write | LivingRoom's number of bunk beds. |
| 35 | +double_beds_count | Integer | Read/Write | LivingRoom's number of double beds. |
| 36 | +kingsize_beds_count | Integer | Read/Write | LivingRoom's number of kingsize beds. |
| 37 | +queensize_beds_count| Integer | Read/Write | LivingRoom's number of queensize beds. |
| 38 | +single_beds_count | Integer | Read/Write | LivingRoom's number of single beds. |
| 39 | +sofa_beds_count | Integer | Read/Write | LivingRoom's number of sofa beds. |
| 40 | +--------------------|---------|------------|------------ |
| 41 | +created_at | [Time](/reference/enums#formats) | Read | LivingRoom's create time. |
| 42 | +updated_at | [Time](/reference/enums#formats) | Read | LivingRoom's update time. |
| 43 | +{: class="table table-bordered"} |
| 44 | + </div> |
| 45 | +</div> |
| 46 | + |
| 47 | +## List living_rooms |
| 48 | + |
| 49 | +List all living_rooms for given account. |
| 50 | + |
| 51 | +~~~ |
| 52 | +GET /living_rooms |
| 53 | +~~~ |
| 54 | + |
| 55 | +<%= render 'json_response', endpoint: "living_rooms", |
| 56 | + scopes: [{ public: "public-rentals_write" }] %> |
| 57 | + |
| 58 | +## Get a single living_room |
| 59 | + |
| 60 | +Returns a single living_room identified by ID. |
| 61 | + |
| 62 | +~~~ |
| 63 | +GET /living_rooms/:living_room_id |
| 64 | +~~~ |
| 65 | + |
| 66 | +<%= render 'json_response', endpoint: "living_rooms", |
| 67 | + scopes: [{ public: "public-rentals_write" }] %> |
| 68 | + |
| 69 | +## Create a new living_room |
| 70 | + |
| 71 | +Creates a living_room for given rental. |
| 72 | + |
| 73 | +~~~ |
| 74 | +POST /rentals/:rental_id/living_rooms |
| 75 | +~~~ |
| 76 | + |
| 77 | +<%= render 'json_response', endpoint: "living_rooms", request: "create", |
| 78 | + scopes: [{ rentals_write: "public-rentals_write" }] %> |
| 79 | + |
| 80 | +## Update a living_room |
| 81 | + |
| 82 | +Returns an updated living_room identified by ID. |
| 83 | + |
| 84 | +~~~ |
| 85 | +PUT /living_rooms/:living_room_id |
| 86 | +~~~ |
| 87 | + |
| 88 | +<%= render 'json_response', endpoint: "living_rooms", request: "update", |
| 89 | + scopes: [{ rentals_write: "public-rentals_write" }] %> |
| 90 | + |
| 91 | +## Destroy a living_room |
| 92 | + |
| 93 | +Required OAuth scope: `:rentals_write` |
| 94 | + |
| 95 | +Returns an empty response with '204 No Content' status code on success. |
| 96 | + |
| 97 | +~~~~~~ |
| 98 | +DELETE /living_rooms/:living_room_id |
| 99 | +~~~~~~ |
0 commit comments