Travelogue

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

/trip/index


GET https://travelogue.online/api/v1/trip/index

Query Parameters

ParameterTypeRequiredDescription
keystringYesAPI Key
secretstringYesAPI Secret
user_idstringYesuser_id from login

Code Samples

JavaScript PHP Rails
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://travelogue.online/api/v1/trip/index?key=%key%&secret=%secret%&user_id=%user_id%", false);

// Make sure you set the appropriate headers
xmlHttp.setRequestHeader("Header Key", "Header Value");

xmlHttp.send(null);

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://travelogue.online/api/v1/trip/index?key=%key%&secret=%secret%&user_id=%user_id%");
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);

$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
uri = URI.parse("https://travelogue.online/api/v1/trip/index?key=%key%&secret=%secret%&user_id=%user_id%")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

# Make sure you set the appropriate headers
request["header"] = "header value"

response = http.request(request)

Response

200:

application/json
{
  "status":"200",
  "message":"Success",
  "result": {

  "current": [
    {
      "trip_id": "13",
      "title": "USA",
      "picture": "https://travelogue.online/images/default_background.png",
      "day": "4",
      "from_date": "Wed, 13 Nov 19",
      "to_date": "Sun, 16 Nov 19",
      "friend": [
        {
          "name": "Peter",
          "picture": "https://link"
        }
      ]
    }
  ],
  "upcoming": [
    {
      "trip_id": "14",
      "title": "test",
      "picture": "https://travelogue.online/images/default_background.png",
      "day": "7",
      "from_date": ""Thu, 20 Aug 20",
      "to_date": "Wed, 26 Aug 20",
      "friend": [
        {
          "name": "John",
          "picture": "https://link"
        }
      ]
    }
  ],
  "past": [
    {
      "trip_id": "5",
      "title": "Perth",
      "picture": "https://travelogue.online/images/default_background.png",
      "day": "22",
      "from_date": "Fri, 5 Jul 19",
      "to_date": "Thu, 4 Jul 19",
      "friend": [
        {
          "name": "Dennis",
          "picture": "https://link"
        }
      ]
    }
  ]



}

 

400:

Missing or invalid properties

 

401:

Invalid API Key & Password