DoROAD API

Default

checkItineraryStatusGet

Check whether the itinerary is ready


/check_itinerary_status

Usage and SDK Samples

curl -X GET\
"https://api.doroad.dev/0.0.1/check_itinerary_status"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.checkItineraryStatusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#checkItineraryStatusGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.checkItineraryStatusGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#checkItineraryStatusGet");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Check whether the itinerary is ready
[apiInstance checkItineraryStatusGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.checkItineraryStatusGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkItineraryStatusGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Check whether the itinerary is ready
                apiInstance.checkItineraryStatusGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.checkItineraryStatusGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $api_instance->checkItineraryStatusGet();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->checkItineraryStatusGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    $api_instance->checkItineraryStatusGet();
};
if ($@) {
    warn "Exception when calling DefaultApi->checkItineraryStatusGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Check whether the itinerary is ready
    api_instance.check_itinerary_status_get()
except ApiException as e:
    print("Exception when calling DefaultApi->checkItineraryStatusGet: %s\n" % e)

Parameters

Responses

Status: 200 - Itinerary status retrieved

Status: 400 - Itinerary status could not be retrieved


generateItineraryPost

Generates a travel itinerary


/generate_itinerary

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://api.doroad.dev/0.0.1/generate_itinerary"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.generateItineraryPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#generateItineraryPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.generateItineraryPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#generateItineraryPost");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Generates a travel itinerary
[apiInstance generateItineraryPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.generateItineraryPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class generateItineraryPostExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Generates a travel itinerary
                apiInstance.generateItineraryPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.generateItineraryPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $api_instance->generateItineraryPost();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->generateItineraryPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    $api_instance->generateItineraryPost();
};
if ($@) {
    warn "Exception when calling DefaultApi->generateItineraryPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Generates a travel itinerary
    api_instance.generate_itinerary_post()
except ApiException as e:
    print("Exception when calling DefaultApi->generateItineraryPost: %s\n" % e)

Parameters

Responses

Status: 200 - Itinerary generated successfully

Status: 400 - Invalid request, required itinerary params missing


getItinerariesGet

Fetch all itineraries for the current user


/get_itineraries

Usage and SDK Samples

curl -X GET\
"https://api.doroad.dev/0.0.1/get_itineraries"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getItinerariesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getItinerariesGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.getItinerariesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getItinerariesGet");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Fetch all itineraries for the current user
[apiInstance getItinerariesGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getItinerariesGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getItinerariesGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Fetch all itineraries for the current user
                apiInstance.getItinerariesGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.getItinerariesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $api_instance->getItinerariesGet();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getItinerariesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    $api_instance->getItinerariesGet();
};
if ($@) {
    warn "Exception when calling DefaultApi->getItinerariesGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Fetch all itineraries for the current user
    api_instance.get_itineraries_get()
except ApiException as e:
    print("Exception when calling DefaultApi->getItinerariesGet: %s\n" % e)

Parameters

Responses

Status: 200 - List of itineraries retrieved

Status: 400 - Itineraries could not be retrieved, User not authenticated


loginPost

Logs in a user


/login

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://api.doroad.dev/0.0.1/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String username = username_example; // String | 
        String password = password_example; // String | 
        try {
            apiInstance.loginPost(username, password);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#loginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String username = username_example; // String | 
        String password = password_example; // String | 
        try {
            apiInstance.loginPost(username, password);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#loginPost");
            e.printStackTrace();
        }
    }
}
String *username = username_example; // 
String *password = password_example; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Logs in a user
[apiInstance loginPostWith:username
    password:password
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var username = username_example; //  
var password = password_example; //  

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.loginPost(usernamepassword, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loginPostExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var username = username_example;  // String | 
            var password = password_example;  // String | 

            try
            {
                // Logs in a user
                apiInstance.loginPost(username, password);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.loginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$username = username_example; // String | 
$password = password_example; // String | 

try {
    $api_instance->loginPost($username, $password);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->loginPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $username = username_example; # String | 
my $password = password_example; # String | 

eval { 
    $api_instance->loginPost(username => $username, password => $password);
};
if ($@) {
    warn "Exception when calling DefaultApi->loginPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
username = username_example # String | 
password = password_example # String | 

try: 
    # Logs in a user
    api_instance.login_post(username, password)
except ApiException as e:
    print("Exception when calling DefaultApi->loginPost: %s\n" % e)

Parameters

Form parameters
Name Description
username*
String
Required
password*
String
Required

Responses

Status: 200 - Login successful

Status: 400 - Invalid login credentials


logoutGet

Logs out a user


/logout

Usage and SDK Samples

curl -X GET\
"https://api.doroad.dev/0.0.1/logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.logoutGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#logoutGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        try {
            apiInstance.logoutGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#logoutGet");
            e.printStackTrace();
        }
    }
}

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Logs out a user
[apiInstance logoutGetWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.logoutGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logoutGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();

            try
            {
                // Logs out a user
                apiInstance.logoutGet();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.logoutGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();

try {
    $api_instance->logoutGet();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->logoutGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();

eval { 
    $api_instance->logoutGet();
};
if ($@) {
    warn "Exception when calling DefaultApi->logoutGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()

try: 
    # Logs out a user
    api_instance.logout_get()
except ApiException as e:
    print("Exception when calling DefaultApi->logoutGet: %s\n" % e)

Parameters

Responses

Status: 200 - Logout successful


registerPost

Registers a new user


/register

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://api.doroad.dev/0.0.1/register"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String firstName = firstName_example; // String | 
        String lastName = lastName_example; // String | 
        String username = username_example; // String | 
        String password = password_example; // String | 
        String confirmPassword = confirmPassword_example; // String | 
        try {
            apiInstance.registerPost(firstName, lastName, username, password, confirmPassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#registerPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String firstName = firstName_example; // String | 
        String lastName = lastName_example; // String | 
        String username = username_example; // String | 
        String password = password_example; // String | 
        String confirmPassword = confirmPassword_example; // String | 
        try {
            apiInstance.registerPost(firstName, lastName, username, password, confirmPassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#registerPost");
            e.printStackTrace();
        }
    }
}
String *firstName = firstName_example; // 
String *lastName = lastName_example; // 
String *username = username_example; // 
String *password = password_example; // 
String *confirmPassword = confirmPassword_example; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Registers a new user
[apiInstance registerPostWith:firstName
    lastName:lastName
    username:username
    password:password
    confirmPassword:confirmPassword
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var firstName = firstName_example; //  
var lastName = lastName_example; //  
var username = username_example; //  
var password = password_example; //  
var confirmPassword = confirmPassword_example; //  

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.registerPost(firstNamelastNameusernamepasswordconfirmPassword, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class registerPostExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var firstName = firstName_example;  // String | 
            var lastName = lastName_example;  // String | 
            var username = username_example;  // String | 
            var password = password_example;  // String | 
            var confirmPassword = confirmPassword_example;  // String | 

            try
            {
                // Registers a new user
                apiInstance.registerPost(firstName, lastName, username, password, confirmPassword);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.registerPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$firstName = firstName_example; // String | 
$lastName = lastName_example; // String | 
$username = username_example; // String | 
$password = password_example; // String | 
$confirmPassword = confirmPassword_example; // String | 

try {
    $api_instance->registerPost($firstName, $lastName, $username, $password, $confirmPassword);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->registerPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $firstName = firstName_example; # String | 
my $lastName = lastName_example; # String | 
my $username = username_example; # String | 
my $password = password_example; # String | 
my $confirmPassword = confirmPassword_example; # String | 

eval { 
    $api_instance->registerPost(firstName => $firstName, lastName => $lastName, username => $username, password => $password, confirmPassword => $confirmPassword);
};
if ($@) {
    warn "Exception when calling DefaultApi->registerPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
firstName = firstName_example # String | 
lastName = lastName_example # String | 
username = username_example # String | 
password = password_example # String | 
confirmPassword = confirmPassword_example # String | 

try: 
    # Registers a new user
    api_instance.register_post(firstName, lastName, username, password, confirmPassword)
except ApiException as e:
    print("Exception when calling DefaultApi->registerPost: %s\n" % e)

Parameters

Form parameters
Name Description
first_name*
String
Required
last_name*
String
Required
username*
String
Required
password*
String
Required
confirm_password*
String
Required

Responses

Status: 200 - Registration successful

Status: 400 - Invalid registration details, username might be taken or the passwords do not match


resetPasswordPost

Reset password


/reset_password

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/x-www-form-urlencoded"\
"https://api.doroad.dev/0.0.1/reset_password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | 
        String newPassword = newPassword_example; // String | 
        String confirmPassword = confirmPassword_example; // String | 
        try {
            apiInstance.resetPasswordPost(token, newPassword, confirmPassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resetPasswordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String token = token_example; // String | 
        String newPassword = newPassword_example; // String | 
        String confirmPassword = confirmPassword_example; // String | 
        try {
            apiInstance.resetPasswordPost(token, newPassword, confirmPassword);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resetPasswordPost");
            e.printStackTrace();
        }
    }
}
String *token = token_example; // 
String *newPassword = newPassword_example; // 
String *confirmPassword = confirmPassword_example; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Reset password
[apiInstance resetPasswordPostWith:token
    newPassword:newPassword
    confirmPassword:confirmPassword
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var token = token_example; //  
var newPassword = newPassword_example; //  
var confirmPassword = confirmPassword_example; //  

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resetPasswordPost(tokennewPasswordconfirmPassword, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resetPasswordPostExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var token = token_example;  // String | 
            var newPassword = newPassword_example;  // String | 
            var confirmPassword = confirmPassword_example;  // String | 

            try
            {
                // Reset password
                apiInstance.resetPasswordPost(token, newPassword, confirmPassword);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.resetPasswordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$token = token_example; // String | 
$newPassword = newPassword_example; // String | 
$confirmPassword = confirmPassword_example; // String | 

try {
    $api_instance->resetPasswordPost($token, $newPassword, $confirmPassword);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->resetPasswordPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $token = token_example; # String | 
my $newPassword = newPassword_example; # String | 
my $confirmPassword = confirmPassword_example; # String | 

eval { 
    $api_instance->resetPasswordPost(token => $token, newPassword => $newPassword, confirmPassword => $confirmPassword);
};
if ($@) {
    warn "Exception when calling DefaultApi->resetPasswordPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
token = token_example # String | 
newPassword = newPassword_example # String | 
confirmPassword = confirmPassword_example # String | 

try: 
    # Reset password
    api_instance.reset_password_post(token, newPassword, confirmPassword)
except ApiException as e:
    print("Exception when calling DefaultApi->resetPasswordPost: %s\n" % e)

Parameters

Form parameters
Name Description
token*
String
Required
new_password*
String
Required
confirm_password*
String
Required

Responses

Status: 200 - Password reset successful

Status: 400 - Invalid request, token might be invalid or expired or passwords do not match


resetRequestGet

Request password reset


/reset_request

Usage and SDK Samples

curl -X GET\
"https://api.doroad.dev/0.0.1/reset_request?email="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | 
        try {
            apiInstance.resetRequestGet(email);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resetRequestGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String email = email_example; // String | 
        try {
            apiInstance.resetRequestGet(email);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#resetRequestGet");
            e.printStackTrace();
        }
    }
}
String *email = email_example; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Request password reset
[apiInstance resetRequestGetWith:email
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var email = email_example; //  

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.resetRequestGet(email, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class resetRequestGetExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var email = email_example;  // String | 

            try
            {
                // Request password reset
                apiInstance.resetRequestGet(email);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.resetRequestGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$email = email_example; // String | 

try {
    $api_instance->resetRequestGet($email);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->resetRequestGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $email = email_example; # String | 

eval { 
    $api_instance->resetRequestGet(email => $email);
};
if ($@) {
    warn "Exception when calling DefaultApi->resetRequestGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
email = email_example # String | 

try: 
    # Request password reset
    api_instance.reset_request_get(email)
except ApiException as e:
    print("Exception when calling DefaultApi->resetRequestGet: %s\n" % e)

Parameters

Query parameters
Name Description
email*
String
Required

Responses

Status: 200 - Password reset link has been sent to your email

Status: 400 - Invalid request, email does not exist


shareItineraryPost

Shares an itinerary


/share_itinerary

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://api.doroad.dev/0.0.1/share_itinerary"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Share_itinerary_body body = ; // Share_itinerary_body | 
        try {
            apiInstance.shareItineraryPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#shareItineraryPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Share_itinerary_body body = ; // Share_itinerary_body | 
        try {
            apiInstance.shareItineraryPost(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#shareItineraryPost");
            e.printStackTrace();
        }
    }
}
Share_itinerary_body *body = ; // 

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Shares an itinerary
[apiInstance shareItineraryPostWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var DoRoadApi = require('do_road_api');

var api = new DoRoadApi.DefaultApi()
var body = ; //  

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.shareItineraryPost(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class shareItineraryPostExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new Share_itinerary_body(); // Share_itinerary_body | 

            try
            {
                // Shares an itinerary
                apiInstance.shareItineraryPost(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.shareItineraryPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // Share_itinerary_body | 

try {
    $api_instance->shareItineraryPost($body);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->shareItineraryPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::Share_itinerary_body->new(); # Share_itinerary_body | 

eval { 
    $api_instance->shareItineraryPost(body => $body);
};
if ($@) {
    warn "Exception when calling DefaultApi->shareItineraryPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # Share_itinerary_body | 

try: 
    # Shares an itinerary
    api_instance.share_itinerary_post(body)
except ApiException as e:
    print("Exception when calling DefaultApi->shareItineraryPost: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Itinerary shared successfully

Status: 400 - Invalid request, itinerary_id might be missing