Travelogue

version v1           https://travelogue.online/api/v1

/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

ParameterTypeRequiredDescription
keystringYesAPI Key
secretstringYesAPI Secret
trip_idstringYestrip id
sizestringYessize of picture in byte
latstringlatitude of picture taken
lngstringlongitude of picture taken
picture_timestampstringYesTimestamp of picture taken. YYYY MM DD HH:ii:ss
aperturestringAperture of picture taken.
shutter_speedstringShutter Speed of picture taken.
isostringISO of picture taken.
focal_lengthstringFocal Length of picture taken.
modelstringModel of phone that picture taken.
makestringMake of phone that picture taken.
typestringYes"video" or "image".

Code Samples

JavaScript PHP Rails
var 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": ""

}

 

400:

Missing or invalid properties

 

401:

Invalid API Key & Password