Mercatorio API

Default

buildingInfo

Get the building information


/buildings/{buildingID}

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/buildings/{buildingID}"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String buildingID = buildingID_example; // String | 

        try {
            Building result = apiInstance.buildingInfo(buildingID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#buildingInfo");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String buildingID = new String(); // String | 

try {
    final result = await api_instance.buildingInfo(buildingID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->buildingInfo: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String buildingID = buildingID_example; // String | 

        try {
            Building result = apiInstance.buildingInfo(buildingID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#buildingInfo");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *buildingID = buildingID_example; //  (default to null)

// Get the building information
[apiInstance buildingInfoWith:buildingID
              completionHandler: ^(Building output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var buildingID = buildingID_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.buildingInfo(buildingID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class buildingInfoExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var buildingID = buildingID_example;  // String |  (default to null)

            try {
                // Get the building information
                Building result = apiInstance.buildingInfo(buildingID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.buildingInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$buildingID = buildingID_example; // String | 

try {
    $result = $api_instance->buildingInfo($buildingID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->buildingInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $buildingID = buildingID_example; # String | 

eval {
    my $result = $api_instance->buildingInfo(buildingID => $buildingID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->buildingInfo: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
buildingID = buildingID_example # String |  (default to null)

try:
    # Get the building information
    api_response = api_instance.building_info(buildingID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->buildingInfo: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let buildingID = buildingID_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.buildingInfo(buildingID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
buildingID*
String
Required

Responses


businessInfo

Get the business information


/businesses/{businessID}

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/businesses/{businessID}"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String businessID = businessID_example; // String | 

        try {
            Business result = apiInstance.businessInfo(businessID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#businessInfo");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String businessID = new String(); // String | 

try {
    final result = await api_instance.businessInfo(businessID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->businessInfo: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String businessID = businessID_example; // String | 

        try {
            Business result = apiInstance.businessInfo(businessID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#businessInfo");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *businessID = businessID_example; //  (default to null)

// Get the business information
[apiInstance businessInfoWith:businessID
              completionHandler: ^(Business output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var businessID = businessID_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.businessInfo(businessID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class businessInfoExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var businessID = businessID_example;  // String |  (default to null)

            try {
                // Get the business information
                Business result = apiInstance.businessInfo(businessID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.businessInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$businessID = businessID_example; // String | 

try {
    $result = $api_instance->businessInfo($businessID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->businessInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $businessID = businessID_example; # String | 

eval {
    my $result = $api_instance->businessInfo(businessID => $businessID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->businessInfo: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
businessID = businessID_example # String |  (default to null)

try:
    # Get the business information
    api_response = api_instance.business_info(businessID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->businessInfo: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let businessID = businessID_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.businessInfo(businessID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
businessID*
String
Required

Responses


mapRegions

Get the list of all regions on the map, with their corresponding information


/map/regions

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/map/regions"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            array[MapRegion] result = apiInstance.mapRegions();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#mapRegions");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.mapRegions();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->mapRegions: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            array[MapRegion] result = apiInstance.mapRegions();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#mapRegions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get the list of all regions on the map, with their corresponding information
[apiInstance mapRegionsWithCompletionHandler: 
              ^(array[MapRegion] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.mapRegions(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class mapRegionsExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Get the list of all regions on the map, with their corresponding information
                array[MapRegion] result = apiInstance.mapRegions();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.mapRegions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

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

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->mapRegions();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->mapRegions: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Get the list of all regions on the map, with their corresponding information
    api_response = api_instance.map_regions()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->mapRegions: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.mapRegions(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


playerInfo

Get the player information


/player

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/player"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            Player result = apiInstance.playerInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#playerInfo");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.playerInfo();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->playerInfo: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            Player result = apiInstance.playerInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#playerInfo");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get the player information
[apiInstance playerInfoWithCompletionHandler: 
              ^(Player output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.playerInfo(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class playerInfoExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Get the player information
                Player result = apiInstance.playerInfo();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.playerInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

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

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->playerInfo();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->playerInfo: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Get the player information
    api_response = api_instance.player_info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->playerInfo: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.playerInfo(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


townInfo

Get the information for a specific town


/towns/{townID}

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/towns/{townID}"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String townID = townID_example; // String | 

        try {
            Town result = apiInstance.townInfo(townID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#townInfo");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String townID = new String(); // String | 

try {
    final result = await api_instance.townInfo(townID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->townInfo: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String townID = townID_example; // String | 

        try {
            Town result = apiInstance.townInfo(townID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#townInfo");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *townID = townID_example; //  (default to null)

// Get the information for a specific town
[apiInstance townInfoWith:townID
              completionHandler: ^(Town output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var townID = townID_example; // {String} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.townInfo(townID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class townInfoExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var townID = townID_example;  // String |  (default to null)

            try {
                // Get the information for a specific town
                Town result = apiInstance.townInfo(townID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.townInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$townID = townID_example; // String | 

try {
    $result = $api_instance->townInfo($townID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->townInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $townID = townID_example; # String | 

eval {
    my $result = $api_instance->townInfo(townID => $townID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->townInfo: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
townID = townID_example # String |  (default to null)

try:
    # Get the information for a specific town
    api_response = api_instance.town_info(townID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->townInfo: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let townID = townID_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.townInfo(townID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
townID*
String
Required

Responses


towns

Get the list of all towns on the map, with their corresponding information


/towns

Usage and SDK Samples

curl -X GET \
-H "X-Merc-User: [[apiKey]]" \
-H "Token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://play.mercatorio.io/api/towns"
import org.mercatorio_tools.mercatorio_java.*;
import org.mercatorio_tools.mercatorio_java.auth.*;
import org.mercatorio_tools.mercatorio_java.model.*;
import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

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

public class DefaultApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: Merc_User
        ApiKeyAuth Merc_User = (ApiKeyAuth) defaultClient.getAuthentication("Merc_User");
        Merc_User.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Merc_User.setApiKeyPrefix("Token");

        // Configure API key authorization: Bearer_Token
        ApiKeyAuth Bearer_Token = (ApiKeyAuth) defaultClient.getAuthentication("Bearer_Token");
        Bearer_Token.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Bearer_Token.setApiKeyPrefix("Token");

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            array[TownSimple] result = apiInstance.towns();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#towns");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.towns();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->towns: $e\n');
}

import org.mercatorio_tools.mercatorio_java.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            array[TownSimple] result = apiInstance.towns();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#towns");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Merc_User)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Merc-User"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Merc-User"];

// Configure API key authorization: (authentication scheme: Bearer_Token)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Token"];


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get the list of all towns on the map, with their corresponding information
[apiInstance townsWithCompletionHandler: 
              ^(array[TownSimple] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MercatorioApi = require('mercatorio.js');
var defaultClient = MercatorioApi.ApiClient.instance;

// Configure API key authorization: Merc_User
var Merc_User = defaultClient.authentications['Merc_User'];
Merc_User.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Merc_User.apiKeyPrefix['X-Merc-User'] = "Token";

// Configure API key authorization: Bearer_Token
var Bearer_Token = defaultClient.authentications['Bearer_Token'];
Bearer_Token.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer_Token.apiKeyPrefix['Token'] = "Token";

// Create an instance of the API class
var api = new MercatorioApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.towns(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using org.mercatorio_tools.mercatorio_java;
using Org.OpenAPITools.Model;

namespace Example
{
    public class townsExample
    {
        public void main()
        {
            // Configure API key authorization: Merc_User
            Configuration.Default.ApiKey.Add("X-Merc-User", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Merc-User", "Bearer");
            // Configure API key authorization: Bearer_Token
            Configuration.Default.ApiKey.Add("Token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Get the list of all towns on the map, with their corresponding information
                array[TownSimple] result = apiInstance.towns();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.towns: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Merc_User
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Merc-User', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Merc-User', 'Bearer');

// Configure API key authorization: Bearer_Token
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

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

# Configure API key authorization: Merc_User
$WWW::OPenAPIClient::Configuration::api_key->{'X-Merc-User'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'X-Merc-User'} = "Bearer";

# Configure API key authorization: Bearer_Token
$WWW::OPenAPIClient::Configuration::api_key->{'Token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'Token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->towns();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->towns: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Merc_User
openapi_client.configuration.api_key['X-Merc-User'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['X-Merc-User'] = 'Bearer'

# Configure API key authorization: Bearer_Token
openapi_client.configuration.api_key['Token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['Token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Get the list of all towns on the map, with their corresponding information
    api_response = api_instance.towns()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->towns: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.towns(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses