/trip/picture_upload
POST https://travelogue.online/api/v1/trip/picture_upload
upload picture to /picture_list. The file of upload (picture or video) have to be have name 'file'
Query Parameters
| Parameter | Type | Required | Description |
| key | string | Yes | API Key |
| secret | string | Yes | API Secret |
| trip_id | string | Yes | trip id |
| size | string | Yes | size of picture in byte |
| lat | string | latitude of picture taken | |
| lng | string | longitude of picture taken | |
| picture_timestamp | string | Yes | Timestamp of picture taken. YYYY MM DD HH:ii:ss |
| aperture | string | Aperture of picture taken. | |
| shutter_speed | string | Shutter Speed of picture taken. | |
| iso | string | ISO of picture taken. | |
| focal_length | string | Focal Length of picture taken. | |
| model | string | Model of phone that picture taken. | |
| make | string | Make of phone that picture taken. | |
| type | string | Yes | "video" or "image". |
Code Samples
JavaScript PHP Railsvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", "https://travelogue.online/api/v1/trip/picture_upload", false);
// Make sure you set the appropriate headers
xmlHttp.setRequestHeader("Header Key", "Header Value");
var data = "# body is your JSON/ XML/ Text/ Form Query/ etc"
xmlHttp.send(data);
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://travelogue.online/api/v1/trip/picture_upload");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Make sure you set the nessary headers as a $headers array
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "post")
$body = '';
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
uri = URI.parse("https://travelogue.online/api/v1/trip/picture_upload")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Post.new(uri.request_uri)
# Make sure you set the appropriate headers
request["header"] = "header value"
# body is your JSON/ XML/ Text/ Form Query/ etc
request.set_form_data(body)
response = http.request(request)
Response
200:application/json
{
"status":"200",
"message":"Success",
"result":{
"trip_pictures_id" : "103",
"size": "71819",
"latitude": "37.811274999999995",
"longitude": "-122.41081111111112",
"url": "https://travelogue-us-east.s3.us-east-2.amazonaws.com/5f8af077b550a.jpg",
"aperture": "f/1.8",
"shutter_speed": "1/1567",
"iso": "ISO20",
"focal_length": "3.99 mm",
"model": "iPhone 8 Plus",
"make": "Apple",
"date": "09 Oct 2020",
"time": "12:14",
"timestamp": "2020-10-09 12:14:00",
"description": "",
"type": "image",
"thumbnail": "https://travelogue-us-east.s3.us-east-2.amazonaws.com/5f8af07930485.jpg",
"by": {
"user_id": "7"
"name": "Qing Long",
"picture": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10155600285740205&height=200&ext=1608518367&hash=AeQ1WAXlabglRCgx-GQ"
},
"suggest": "",
"trip_details": ""
}
"status":"200",
"message":"Success",
"result":{
"trip_pictures_id" : "103",
"size": "71819",
"latitude": "37.811274999999995",
"longitude": "-122.41081111111112",
"url": "https://travelogue-us-east.s3.us-east-2.amazonaws.com/5f8af077b550a.jpg",
"aperture": "f/1.8",
"shutter_speed": "1/1567",
"iso": "ISO20",
"focal_length": "3.99 mm",
"model": "iPhone 8 Plus",
"make": "Apple",
"date": "09 Oct 2020",
"time": "12:14",
"timestamp": "2020-10-09 12:14:00",
"description": "",
"type": "image",
"thumbnail": "https://travelogue-us-east.s3.us-east-2.amazonaws.com/5f8af07930485.jpg",
"by": {
"user_id": "7"
"name": "Qing Long",
"picture": "https://platform-lookaside.fbsbx.com/platform/profilepic/?asid=10155600285740205&height=200&ext=1608518367&hash=AeQ1WAXlabglRCgx-GQ"
},
"suggest": "",
"trip_details": ""
}
400:
Missing or invalid properties
401:
Invalid API Key & Password