Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions api_calls/reference/photos/create-request.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"photos": [
{
"photo": "livingroom.jpg",
"description": {
"en": "Wonderful living room"
},
"remote_photo_url": "http://www.gstatic.com/webp/gallery/1.jpg",
"description_en": "Wonderful living room",
"description_fr": "Superbe salon",
"kind": "livingroom",
"position": 1
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"id": 1,
"description": {
"en": "Wonderful living room"
"en": "Wonderful living room",
"fr": "Superbe salon"
},
"kind": "livingroom",
"micro_url": "http://bs-eu.s3.amazonaws.com/app/production/photo/photo/1/micro_1c4a6fb74004bb654fbb7972e4c78625.jpg",
Expand Down
7 changes: 3 additions & 4 deletions api_calls/reference/photos/update-request.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"photos": [
{
"photo": "livingroom.jpg",
"description": {
"en": "Wonderful living room"
},
"remote_photo_url": "http://www.gstatic.com/webp/gallery/2.jpg",
"description_en": "Wonderful living room",
"description_fr": "Superbe salon",
"kind": "livingroom",
"position": 1
}
Expand Down
4 changes: 4 additions & 0 deletions content/reference/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2016-08-08

* [doc fix] Fix documentation about `photos` creation and update.

## 2016-07-30

* [doc fix] `bathrooms` details `bath`, `shower` and `wc` are suffixed with `_count`.
Expand Down
20 changes: 17 additions & 3 deletions content/reference/endpoints/photos.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ kind | String | Read/Write | Photo's kind, list of kinds describe
large_url | String | Read | Photo's large size url.
medium_url | String | Read | Photo's medium size url.
micro_url | String | Read | Photo's micro size url.
photo | File | Write | **Required**. Photo's image.
photo | File | Write | **Required**. Photo's image. (`remote_photo_url` can be used instead)
position | Integer | Read/Write | Photo's position on the rental list.
remote_photo_url | String | Write | Photo's remote url.
remote_photo_url | String | Write | **Required**. Photo's remote url. (`photo` can be used instead)
small_url | String | Read | Photo's small size url.
thumb_url | String | Read | Photo's thumb size url.
-------------------|---------|------------|------------
Expand Down Expand Up @@ -78,7 +78,14 @@ GET /photos/:photo_id

## Create a new photo

Creates a photo for given rental.
<div class="callout callout-info">
<h4>Translated attributes</h4>
<p>Please note that translated attributes are updated differenly than you read them.<br>
To set the English description, locale <code>en</code>, you need to use the <code>description_en</code> attribute.</p>
<p>List of locales described in <a href="/reference/enums#locales">enums section</a>.</p>
</div>

Returns a newly created photo for given rental.

~~~~
POST /rentals/:rental_id/photos
Expand All @@ -89,6 +96,13 @@ POST /rentals/:rental_id/photos

## Update a photo

<div class="callout callout-info">
<h4>Translated attributes</h4>
<p>Please note that translated attributes are updated differenly than you read them.<br>
To set the English description, locale <code>en</code>, you need to use the <code>description_en</code> attribute.</p>
<p>List of locales described in <a href="/reference/enums#locales">enums section</a>.</p>
</div>

Returns an updated photo identified by ID.

~~~
Expand Down