REST api for habit tracker

Ability

addAbility

Add a new ability


/abilities

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/abilities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbilityApi;

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

public class AbilityApiExample {

    public static void main(String[] args) {
        
        AbilityApi apiInstance = new AbilityApi();
        Ability body = ; // Ability | Ability to be placed to abilities list
        try {
            apiInstance.addAbility(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#addAbility");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AbilityApi;

public class AbilityApiExample {

    public static void main(String[] args) {
        AbilityApi apiInstance = new AbilityApi();
        Ability body = ; // Ability | Ability to be placed to abilities list
        try {
            apiInstance.addAbility(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#addAbility");
            e.printStackTrace();
        }
    }
}
Ability *body = ; // Ability to be placed to abilities list

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

// Add a new ability
[apiInstance addAbilityWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.AbilityApi()
var body = ; // {{Ability}} Ability to be placed to abilities list

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

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

            var apiInstance = new AbilityApi();
            var body = new Ability(); // Ability | Ability to be placed to abilities list

            try
            {
                // Add a new ability
                apiInstance.addAbility(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AbilityApi.addAbility: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAbilityApi();
$body = ; // Ability | Ability to be placed to abilities list

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

my $api_instance = WWW::SwaggerClient::AbilityApi->new();
my $body = WWW::SwaggerClient::Object::Ability->new(); # Ability | Ability to be placed to abilities list

eval { 
    $api_instance->addAbility(body => $body);
};
if ($@) {
    warn "Exception when calling AbilityApi->addAbility: $@\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.AbilityApi()
body =  # Ability | Ability to be placed to abilities list

try: 
    # Add a new ability
    api_instance.add_ability(body)
except ApiException as e:
    print("Exception when calling AbilityApi->addAbility: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


deleteAbility

Delete ability so it cannot be learned


/abilities/{abilityId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/abilities/{abilityId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbilityApi;

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

public class AbilityApiExample {

    public static void main(String[] args) {
        
        AbilityApi apiInstance = new AbilityApi();
        Long abilityId = 789; // Long | Ability to delete by id
        try {
            apiInstance.deleteAbility(abilityId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#deleteAbility");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AbilityApi;

public class AbilityApiExample {

    public static void main(String[] args) {
        AbilityApi apiInstance = new AbilityApi();
        Long abilityId = 789; // Long | Ability to delete by id
        try {
            apiInstance.deleteAbility(abilityId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#deleteAbility");
            e.printStackTrace();
        }
    }
}
Long *abilityId = 789; // Ability to delete by id

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

// Delete ability so it cannot be learned
[apiInstance deleteAbilityWith:abilityId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.AbilityApi()
var abilityId = 789; // {{Long}} Ability to delete by id

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

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

            var apiInstance = new AbilityApi();
            var abilityId = 789;  // Long | Ability to delete by id

            try
            {
                // Delete ability so it cannot be learned
                apiInstance.deleteAbility(abilityId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AbilityApi.deleteAbility: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAbilityApi();
$abilityId = 789; // Long | Ability to delete by id

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

my $api_instance = WWW::SwaggerClient::AbilityApi->new();
my $abilityId = 789; # Long | Ability to delete by id

eval { 
    $api_instance->deleteAbility(abilityId => $abilityId);
};
if ($@) {
    warn "Exception when calling AbilityApi->deleteAbility: $@\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.AbilityApi()
abilityId = 789 # Long | Ability to delete by id

try: 
    # Delete ability so it cannot be learned
    api_instance.delete_ability(abilityId)
except ApiException as e:
    print("Exception when calling AbilityApi->deleteAbility: %s\n" % e)

Parameters

Path parameters
Name Description
abilityId*
Long (int64)
Ability to delete by id
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Ability not found


getAbilities

Show all abilities

Returns list of all abilities


/abilities

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/abilities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbilityApi;

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

public class AbilityApiExample {

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

public class AbilityApiExample {

    public static void main(String[] args) {
        AbilityApi apiInstance = new AbilityApi();
        try {
            array[Ability] result = apiInstance.getAbilities();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#getAbilities");
            e.printStackTrace();
        }
    }
}

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

// Show all abilities
[apiInstance getAbilitiesWithCompletionHandler: 
              ^(array[Ability] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.AbilityApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAbilities(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new AbilityApi();

            try
            {
                // Show all abilities
                array[Ability] result = apiInstance.getAbilities();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AbilityApi.getAbilities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->getAbilities();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AbilityApi->getAbilities: $@\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.AbilityApi()

try: 
    # Show all abilities
    api_response = api_instance.get_abilities()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AbilityApi->getAbilities: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


getAbility

Access to ability fuul information


/abilities/{abilityId}

Usage and SDK Samples

curl -X GET\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/abilities/{abilityId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AbilityApi;

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

public class AbilityApiExample {

    public static void main(String[] args) {
        
        AbilityApi apiInstance = new AbilityApi();
        Long abilityId = 789; // Long | Ability to get by id
        try {
            apiInstance.getAbility(abilityId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#getAbility");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AbilityApi;

public class AbilityApiExample {

    public static void main(String[] args) {
        AbilityApi apiInstance = new AbilityApi();
        Long abilityId = 789; // Long | Ability to get by id
        try {
            apiInstance.getAbility(abilityId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AbilityApi#getAbility");
            e.printStackTrace();
        }
    }
}
Long *abilityId = 789; // Ability to get by id

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

// Access to ability fuul information
[apiInstance getAbilityWith:abilityId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.AbilityApi()
var abilityId = 789; // {{Long}} Ability to get by id

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

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

            var apiInstance = new AbilityApi();
            var abilityId = 789;  // Long | Ability to get by id

            try
            {
                // Access to ability fuul information
                apiInstance.getAbility(abilityId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AbilityApi.getAbility: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAbilityApi();
$abilityId = 789; // Long | Ability to get by id

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

my $api_instance = WWW::SwaggerClient::AbilityApi->new();
my $abilityId = 789; # Long | Ability to get by id

eval { 
    $api_instance->getAbility(abilityId => $abilityId);
};
if ($@) {
    warn "Exception when calling AbilityApi->getAbility: $@\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.AbilityApi()
abilityId = 789 # Long | Ability to get by id

try: 
    # Access to ability fuul information
    api_instance.get_ability(abilityId)
except ApiException as e:
    print("Exception when calling AbilityApi->getAbility: %s\n" % e)

Parameters

Path parameters
Name Description
abilityId*
Long (int64)
Ability to get by id
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Ability not found


Challenge

addChallenge

Add a new challenge


/challenges

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/challenges"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChallengeApi;

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

public class ChallengeApiExample {

    public static void main(String[] args) {
        
        ChallengeApi apiInstance = new ChallengeApi();
        Challenge body = ; // Challenge | Challenge to be placed to challenges list
        try {
            apiInstance.addChallenge(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChallengeApi#addChallenge");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ChallengeApi;

public class ChallengeApiExample {

    public static void main(String[] args) {
        ChallengeApi apiInstance = new ChallengeApi();
        Challenge body = ; // Challenge | Challenge to be placed to challenges list
        try {
            apiInstance.addChallenge(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChallengeApi#addChallenge");
            e.printStackTrace();
        }
    }
}
Challenge *body = ; // Challenge to be placed to challenges list

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

// Add a new challenge
[apiInstance addChallengeWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ChallengeApi()
var body = ; // {{Challenge}} Challenge to be placed to challenges list

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

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

            var apiInstance = new ChallengeApi();
            var body = new Challenge(); // Challenge | Challenge to be placed to challenges list

            try
            {
                // Add a new challenge
                apiInstance.addChallenge(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChallengeApi.addChallenge: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiChallengeApi();
$body = ; // Challenge | Challenge to be placed to challenges list

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

my $api_instance = WWW::SwaggerClient::ChallengeApi->new();
my $body = WWW::SwaggerClient::Object::Challenge->new(); # Challenge | Challenge to be placed to challenges list

eval { 
    $api_instance->addChallenge(body => $body);
};
if ($@) {
    warn "Exception when calling ChallengeApi->addChallenge: $@\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.ChallengeApi()
body =  # Challenge | Challenge to be placed to challenges list

try: 
    # Add a new challenge
    api_instance.add_challenge(body)
except ApiException as e:
    print("Exception when calling ChallengeApi->addChallenge: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


getChallenges

Show all challenges

Returns list of all challenges


/challenges

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/challenges"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ChallengeApi;

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

public class ChallengeApiExample {

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

public class ChallengeApiExample {

    public static void main(String[] args) {
        ChallengeApi apiInstance = new ChallengeApi();
        try {
            array[Challenge] result = apiInstance.getChallenges();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ChallengeApi#getChallenges");
            e.printStackTrace();
        }
    }
}

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

// Show all challenges
[apiInstance getChallengesWithCompletionHandler: 
              ^(array[Challenge] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ChallengeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getChallenges(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ChallengeApi();

            try
            {
                // Show all challenges
                array[Challenge] result = apiInstance.getChallenges();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ChallengeApi.getChallenges: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->getChallenges();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ChallengeApi->getChallenges: $@\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.ChallengeApi()

try: 
    # Show all challenges
    api_response = api_instance.get_challenges()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ChallengeApi->getChallenges: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


Character

addBuff

Add buff to the character buff list


/character/{characterId}/buffs

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/buffs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Buff body = ; // Buff | Buff to be placed to character buff list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addBuff(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addBuff");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Buff body = ; // Buff | Buff to be placed to character buff list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addBuff(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addBuff");
            e.printStackTrace();
        }
    }
}
Buff *body = ; // Buff to be placed to character buff list
Long *characterId = 789; // ID to find character by

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

// Add buff to the character buff list
[apiInstance addBuffWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Buff}} Buff to be placed to character buff list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Buff(); // Buff | Buff to be placed to character buff list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add buff to the character buff list
                apiInstance.addBuff(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addBuff: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Buff | Buff to be placed to character buff list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Buff->new(); # Buff | Buff to be placed to character buff list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addBuff(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addBuff: $@\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.CharacterApi()
body =  # Buff | Buff to be placed to character buff list
characterId = 789 # Long | ID to find character by

try: 
    # Add buff to the character buff list
    api_instance.add_buff(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addBuff: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


addCharacter

Create a new character


/character

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Character body = ; // Character | Character object that needs to be added
        try {
            apiInstance.addCharacter(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addCharacter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Character body = ; // Character | Character object that needs to be added
        try {
            apiInstance.addCharacter(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addCharacter");
            e.printStackTrace();
        }
    }
}
Character *body = ; // Character object that needs to be added (optional)

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

// Create a new character
[apiInstance addCharacterWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var opts = { 
  'body':  // {{Character}} Character object that needs to be added
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addCharacter(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new CharacterApi();
            var body = new Character(); // Character | Character object that needs to be added (optional) 

            try
            {
                // Create a new character
                apiInstance.addCharacter(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addCharacter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Character | Character object that needs to be added

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Character->new(); # Character | Character object that needs to be added

eval { 
    $api_instance->addCharacter(body => $body);
};
if ($@) {
    warn "Exception when calling CharacterApi->addCharacter: $@\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.CharacterApi()
body =  # Character | Character object that needs to be added (optional)

try: 
    # Create a new character
    api_instance.add_character(body=body)
except ApiException as e:
    print("Exception when calling CharacterApi->addCharacter: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 405 - Invalid input

Status: default - Successful operation


addDaily

Add new daily


/character/{characterId}/dailies

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/dailies"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Daily to be placed to daily list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addDaily(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addDaily");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Daily to be placed to daily list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addDaily(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addDaily");
            e.printStackTrace();
        }
    }
}
Task *body = ; // Daily to be placed to daily list
Long *characterId = 789; // ID to find character by

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

// Add new daily
[apiInstance addDailyWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Task}} Daily to be placed to daily list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Task(); // Task | Daily to be placed to daily list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add new daily
                apiInstance.addDaily(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addDaily: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Task | Daily to be placed to daily list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Task->new(); # Task | Daily to be placed to daily list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addDaily(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addDaily: $@\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.CharacterApi()
body =  # Task | Daily to be placed to daily list
characterId = 789 # Long | ID to find character by

try: 
    # Add new daily
    api_instance.add_daily(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addDaily: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


addHabit

Add new habbit


/character/{characterId}/habits

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/habits"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Habit to be placed to habits list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addHabit(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addHabit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Habit to be placed to habits list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addHabit(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addHabit");
            e.printStackTrace();
        }
    }
}
Task *body = ; // Habit to be placed to habits list
Long *characterId = 789; // ID to find character by

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

// Add new habbit
[apiInstance addHabitWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Task}} Habit to be placed to habits list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Task(); // Task | Habit to be placed to habits list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add new habbit
                apiInstance.addHabit(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addHabit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Task | Habit to be placed to habits list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Task->new(); # Task | Habit to be placed to habits list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addHabit(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addHabit: $@\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.CharacterApi()
body =  # Task | Habit to be placed to habits list
characterId = 789 # Long | ID to find character by

try: 
    # Add new habbit
    api_instance.add_habit(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addHabit: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


addItemToinventory

Add item to inventory


/character/{characterId}/inventory

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/inventory"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Item body = ; // Item | Item to be placed to inventory
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addItemToinventory(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addItemToinventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Item body = ; // Item | Item to be placed to inventory
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addItemToinventory(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addItemToinventory");
            e.printStackTrace();
        }
    }
}
Item *body = ; // Item to be placed to inventory
Long *characterId = 789; // ID to find character by

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

// Add item to inventory
[apiInstance addItemToinventoryWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Item}} Item to be placed to inventory
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Item(); // Item | Item to be placed to inventory
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add item to inventory
                apiInstance.addItemToinventory(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addItemToinventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Item | Item to be placed to inventory
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Item->new(); # Item | Item to be placed to inventory
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addItemToinventory(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addItemToinventory: $@\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.CharacterApi()
body =  # Item | Item to be placed to inventory
characterId = 789 # Long | ID to find character by

try: 
    # Add item to inventory
    api_instance.add_item_toinventory(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addItemToinventory: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


addQuest

Add new quest


/character/{characterId}/quests

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/quests"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Quest to be placed to quest list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addQuest(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addQuest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Quest to be placed to quest list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addQuest(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addQuest");
            e.printStackTrace();
        }
    }
}
Task *body = ; // Quest to be placed to quest list
Long *characterId = 789; // ID to find character by

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

// Add new quest
[apiInstance addQuestWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Task}} Quest to be placed to quest list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Task(); // Task | Quest to be placed to quest list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add new quest
                apiInstance.addQuest(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addQuest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Task | Quest to be placed to quest list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Task->new(); # Task | Quest to be placed to quest list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addQuest(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addQuest: $@\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.CharacterApi()
body =  # Task | Quest to be placed to quest list
characterId = 789 # Long | ID to find character by

try: 
    # Add new quest
    api_instance.add_quest(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addQuest: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


addTodo

Add new todo


/character/{characterId}/todo

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/todo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Todo to be placed to todo list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addTodo(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addTodo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Task body = ; // Task | Todo to be placed to todo list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.addTodo(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#addTodo");
            e.printStackTrace();
        }
    }
}
Task *body = ; // Todo to be placed to todo list
Long *characterId = 789; // ID to find character by

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

// Add new todo
[apiInstance addTodoWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Task}} Todo to be placed to todo list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Task(); // Task | Todo to be placed to todo list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add new todo
                apiInstance.addTodo(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.addTodo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Task | Todo to be placed to todo list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Task->new(); # Task | Todo to be placed to todo list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->addTodo(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->addTodo: $@\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.CharacterApi()
body =  # Task | Todo to be placed to todo list
characterId = 789 # Long | ID to find character by

try: 
    # Add new todo
    api_instance.add_todo(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->addTodo: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


deleteCharacter

Delete a character data


/character/{characterId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to delete character by
        try {
            apiInstance.deleteCharacter(characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#deleteCharacter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to delete character by
        try {
            apiInstance.deleteCharacter(characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#deleteCharacter");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to delete character by

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

// Delete a character data
[apiInstance deleteCharacterWith:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to delete character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to delete character by

            try
            {
                // Delete a character data
                apiInstance.deleteCharacter(characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.deleteCharacter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to delete character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to delete character by

eval { 
    $api_instance->deleteCharacter(characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->deleteCharacter: $@\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.CharacterApi()
characterId = 789 # Long | ID to delete character by

try: 
    # Delete a character data
    api_instance.delete_character(characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->deleteCharacter: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to delete character by
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getAllCharacters

Show all characters

Returns list of all character


/character

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

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

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        try {
            array[Character] result = apiInstance.getAllCharacters();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getAllCharacters");
            e.printStackTrace();
        }
    }
}

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

// Show all characters
[apiInstance getAllCharactersWithCompletionHandler: 
              ^(array[Character] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllCharacters(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new CharacterApi();

            try
            {
                // Show all characters
                array[Character] result = apiInstance.getAllCharacters();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getAllCharacters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->getAllCharacters();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getAllCharacters: $@\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.CharacterApi()

try: 
    # Show all characters
    api_response = api_instance.get_all_characters()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getAllCharacters: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


getCharacter

Get character by ID


/character/{characterId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            Character result = apiInstance.getCharacter(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            Character result = apiInstance.getCharacter(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacter");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Get character by ID
[apiInstance getCharacterWith:characterId
              completionHandler: ^(Character output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Get character by ID
                Character result = apiInstance.getCharacter(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getCharacter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getCharacter(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getCharacter: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Get character by ID
    api_response = api_instance.get_character(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getCharacter: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getCharacterAbilities

Access to a list of abilities that already learned


/character/{characterId}/abilities

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/abilities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Ability] result = apiInstance.getCharacterAbilities(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacterAbilities");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Ability] result = apiInstance.getCharacterAbilities(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacterAbilities");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access to a list of abilities that already learned
[apiInstance getCharacterAbilitiesWith:characterId
              completionHandler: ^(array[Ability] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access to a list of abilities that already learned
                array[Ability] result = apiInstance.getCharacterAbilities(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getCharacterAbilities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getCharacterAbilities(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getCharacterAbilities: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access to a list of abilities that already learned
    api_response = api_instance.get_character_abilities(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getCharacterAbilities: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getCharacterBuffs

Access characters active buffs


/character/{characterId}/buffs

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/buffs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Buff] result = apiInstance.getCharacterBuffs(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacterBuffs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Buff] result = apiInstance.getCharacterBuffs(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getCharacterBuffs");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access characters active buffs
[apiInstance getCharacterBuffsWith:characterId
              completionHandler: ^(array[Buff] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access characters active buffs
                array[Buff] result = apiInstance.getCharacterBuffs(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getCharacterBuffs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getCharacterBuffs(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getCharacterBuffs: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access characters active buffs
    api_response = api_instance.get_character_buffs(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getCharacterBuffs: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getDailies

Access to dailies list


/character/{characterId}/dailies

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/dailies"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getDailies(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getDailies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getDailies(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getDailies");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access to dailies list
[apiInstance getDailiesWith:characterId
              completionHandler: ^(array[Task] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access to dailies list
                array[Task] result = apiInstance.getDailies(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getDailies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getDailies(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getDailies: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access to dailies list
    api_response = api_instance.get_dailies(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getDailies: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getHabits

Access to habits list


/character/{characterId}/habits

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/habits"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getHabits(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getHabits");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getHabits(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getHabits");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access to habits list
[apiInstance getHabitsWith:characterId
              completionHandler: ^(array[Task] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access to habits list
                array[Task] result = apiInstance.getHabits(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getHabits: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getHabits(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getHabits: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access to habits list
    api_response = api_instance.get_habits(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getHabits: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getInventory

Get character's inventory


/character/{characterId}/inventory

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/inventory"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Item] result = apiInstance.getInventory(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getInventory");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Item] result = apiInstance.getInventory(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getInventory");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Get character's inventory
[apiInstance getInventoryWith:characterId
              completionHandler: ^(array[Item] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Get character's inventory
                array[Item] result = apiInstance.getInventory(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getInventory: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getInventory(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getInventory: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Get character's inventory
    api_response = api_instance.get_inventory(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getInventory: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getQuests

Access to quests list


/character/{characterId}/quests

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/quests"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getQuests(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getQuests");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getQuests(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getQuests");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access to quests list
[apiInstance getQuestsWith:characterId
              completionHandler: ^(array[Task] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access to quests list
                array[Task] result = apiInstance.getQuests(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getQuests: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getQuests(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getQuests: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access to quests list
    api_response = api_instance.get_quests(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getQuests: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


getTodos

Access to todo list


/character/{characterId}/todo

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/todo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getTodos(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getTodos");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID to find character by
        try {
            array[Task] result = apiInstance.getTodos(characterId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#getTodos");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID to find character by

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

// Access to todo list
[apiInstance getTodosWith:characterId
              completionHandler: ^(array[Task] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Access to todo list
                array[Task] result = apiInstance.getTodos(characterId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.getTodos: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID to find character by

eval { 
    my $result = $api_instance->getTodos(characterId => $characterId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CharacterApi->getTodos: $@\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.CharacterApi()
characterId = 789 # Long | ID to find character by

try: 
    # Access to todo list
    api_response = api_instance.get_todos(characterId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CharacterApi->getTodos: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


learnAbility

Add new ability


/character/{characterId}/abilities

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/abilities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Ability body = ; // Ability | Ability to be placed to todo list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.learnAbility(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#learnAbility");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Ability body = ; // Ability | Ability to be placed to todo list
        Long characterId = 789; // Long | ID to find character by
        try {
            apiInstance.learnAbility(body, characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#learnAbility");
            e.printStackTrace();
        }
    }
}
Ability *body = ; // Ability to be placed to todo list
Long *characterId = 789; // ID to find character by

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

// Add new ability
[apiInstance learnAbilityWith:body
    characterId:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var body = ; // {{Ability}} Ability to be placed to todo list
var characterId = 789; // {{Long}} ID to find character by

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

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

            var apiInstance = new CharacterApi();
            var body = new Ability(); // Ability | Ability to be placed to todo list
            var characterId = 789;  // Long | ID to find character by

            try
            {
                // Add new ability
                apiInstance.learnAbility(body, characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.learnAbility: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$body = ; // Ability | Ability to be placed to todo list
$characterId = 789; // Long | ID to find character by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $body = WWW::SwaggerClient::Object::Ability->new(); # Ability | Ability to be placed to todo list
my $characterId = 789; # Long | ID to find character by

eval { 
    $api_instance->learnAbility(body => $body, characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->learnAbility: $@\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.CharacterApi()
body =  # Ability | Ability to be placed to todo list
characterId = 789 # Long | ID to find character by

try: 
    # Add new ability
    api_instance.learn_ability(body, characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->learnAbility: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID to find character by
Required
Body parameters
Name Description
body *

Responses

Status: 201 - Successfully added

Status: 405 - Invalid input


removeBuff

Remove buff from the buff list


/character/{characterId}/buff/{buffName}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/buff/{buffName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String buffName = buffName_example; // String | Buff ID to delete by
        try {
            apiInstance.removeBuff(characterId, buffName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeBuff");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String buffName = buffName_example; // String | Buff ID to delete by
        try {
            apiInstance.removeBuff(characterId, buffName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeBuff");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
String *buffName = buffName_example; // Buff ID to delete by

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

// Remove buff from the buff list
[apiInstance removeBuffWith:characterId
    buffName:buffName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var buffName = buffName_example; // {{String}} Buff ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var buffName = buffName_example;  // String | Buff ID to delete by

            try
            {
                // Remove buff from the buff list
                apiInstance.removeBuff(characterId, buffName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeBuff: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$buffName = buffName_example; // String | Buff ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $buffName = buffName_example; # String | Buff ID to delete by

eval { 
    $api_instance->removeBuff(characterId => $characterId, buffName => $buffName);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeBuff: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
buffName = buffName_example # String | Buff ID to delete by

try: 
    # Remove buff from the buff list
    api_instance.remove_buff(characterId, buffName)
except ApiException as e:
    print("Exception when calling CharacterApi->removeBuff: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
buffName*
String
Buff ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


removeDaily

Remove daily from the daily list


/character/{characterId}/dailies/{dailyName}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/dailies/{dailyName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String dailyName = dailyName_example; // String | daily ID to delete by
        try {
            apiInstance.removeDaily(characterId, dailyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeDaily");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String dailyName = dailyName_example; // String | daily ID to delete by
        try {
            apiInstance.removeDaily(characterId, dailyName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeDaily");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
String *dailyName = dailyName_example; // daily ID to delete by

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

// Remove daily from the daily list
[apiInstance removeDailyWith:characterId
    dailyName:dailyName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var dailyName = dailyName_example; // {{String}} daily ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var dailyName = dailyName_example;  // String | daily ID to delete by

            try
            {
                // Remove daily from the daily list
                apiInstance.removeDaily(characterId, dailyName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeDaily: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$dailyName = dailyName_example; // String | daily ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $dailyName = dailyName_example; # String | daily ID to delete by

eval { 
    $api_instance->removeDaily(characterId => $characterId, dailyName => $dailyName);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeDaily: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
dailyName = dailyName_example # String | daily ID to delete by

try: 
    # Remove daily from the daily list
    api_instance.remove_daily(characterId, dailyName)
except ApiException as e:
    print("Exception when calling CharacterApi->removeDaily: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
dailyName*
String
daily ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


removeHabit

Remove habit from the habit list


/character/{characterId}/habits/{habitName}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/habits/{habitName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String habitName = habitName_example; // String | habit ID to delete by
        try {
            apiInstance.removeHabit(characterId, habitName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeHabit");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String habitName = habitName_example; // String | habit ID to delete by
        try {
            apiInstance.removeHabit(characterId, habitName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeHabit");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
String *habitName = habitName_example; // habit ID to delete by

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

// Remove habit from the habit list
[apiInstance removeHabitWith:characterId
    habitName:habitName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var habitName = habitName_example; // {{String}} habit ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var habitName = habitName_example;  // String | habit ID to delete by

            try
            {
                // Remove habit from the habit list
                apiInstance.removeHabit(characterId, habitName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeHabit: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$habitName = habitName_example; // String | habit ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $habitName = habitName_example; # String | habit ID to delete by

eval { 
    $api_instance->removeHabit(characterId => $characterId, habitName => $habitName);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeHabit: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
habitName = habitName_example # String | habit ID to delete by

try: 
    # Remove habit from the habit list
    api_instance.remove_habit(characterId, habitName)
except ApiException as e:
    print("Exception when calling CharacterApi->removeHabit: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
habitName*
String
habit ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


removeItem

Remove item from the inventory


/character/{characterId}/inventory/{itemId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/inventory/{itemId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        Long itemId = 789; // Long | Item ID to delete by
        try {
            apiInstance.removeItem(characterId, itemId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeItem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        Long itemId = 789; // Long | Item ID to delete by
        try {
            apiInstance.removeItem(characterId, itemId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeItem");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
Long *itemId = 789; // Item ID to delete by

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

// Remove item from the inventory
[apiInstance removeItemWith:characterId
    itemId:itemId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var itemId = 789; // {{Long}} Item ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var itemId = 789;  // Long | Item ID to delete by

            try
            {
                // Remove item from the inventory
                apiInstance.removeItem(characterId, itemId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeItem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$itemId = 789; // Long | Item ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $itemId = 789; # Long | Item ID to delete by

eval { 
    $api_instance->removeItem(characterId => $characterId, itemId => $itemId);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeItem: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
itemId = 789 # Long | Item ID to delete by

try: 
    # Remove item from the inventory
    api_instance.remove_item(characterId, itemId)
except ApiException as e:
    print("Exception when calling CharacterApi->removeItem: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
itemId*
Long (int64)
Item ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


removeQuest

Remove quest from the quest list


/character/{characterId}/quests/{questName}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/quests/{questName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String questName = questName_example; // String | Quest ID to delete by
        try {
            apiInstance.removeQuest(characterId, questName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeQuest");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String questName = questName_example; // String | Quest ID to delete by
        try {
            apiInstance.removeQuest(characterId, questName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeQuest");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
String *questName = questName_example; // Quest ID to delete by

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

// Remove quest from the quest list
[apiInstance removeQuestWith:characterId
    questName:questName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var questName = questName_example; // {{String}} Quest ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var questName = questName_example;  // String | Quest ID to delete by

            try
            {
                // Remove quest from the quest list
                apiInstance.removeQuest(characterId, questName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeQuest: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$questName = questName_example; // String | Quest ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $questName = questName_example; # String | Quest ID to delete by

eval { 
    $api_instance->removeQuest(characterId => $characterId, questName => $questName);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeQuest: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
questName = questName_example # String | Quest ID to delete by

try: 
    # Remove quest from the quest list
    api_instance.remove_quest(characterId, questName)
except ApiException as e:
    print("Exception when calling CharacterApi->removeQuest: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
questName*
String
Quest ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


removeTodo

Remove todo from the todo list


/character/{characterId}/todo/{todoName}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}/todo/{todoName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String todoName = todoName_example; // String | todo ID to delete by
        try {
            apiInstance.removeTodo(characterId, todoName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeTodo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | Character ID to find by
        String todoName = todoName_example; // String | todo ID to delete by
        try {
            apiInstance.removeTodo(characterId, todoName);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#removeTodo");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // Character ID to find by
String *todoName = todoName_example; // todo ID to delete by

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

// Remove todo from the todo list
[apiInstance removeTodoWith:characterId
    todoName:todoName
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} Character ID to find by
var todoName = todoName_example; // {{String}} todo ID to delete by

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | Character ID to find by
            var todoName = todoName_example;  // String | todo ID to delete by

            try
            {
                // Remove todo from the todo list
                apiInstance.removeTodo(characterId, todoName);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.removeTodo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | Character ID to find by
$todoName = todoName_example; // String | todo ID to delete by

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | Character ID to find by
my $todoName = todoName_example; # String | todo ID to delete by

eval { 
    $api_instance->removeTodo(characterId => $characterId, todoName => $todoName);
};
if ($@) {
    warn "Exception when calling CharacterApi->removeTodo: $@\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.CharacterApi()
characterId = 789 # Long | Character ID to find by
todoName = todoName_example # String | todo ID to delete by

try: 
    # Remove todo from the todo list
    api_instance.remove_todo(characterId, todoName)
except ApiException as e:
    print("Exception when calling CharacterApi->removeTodo: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
Character ID to find by
Required
todoName*
String
todo ID to delete by
Required

Responses

Status: 200 - Deleted successfully

Status: 400 - Invalid ID supplied

Status: 404 - Character not found


updateCharacter

Update character data


/character/{characterId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/character/{characterId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CharacterApi;

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

public class CharacterApiExample {

    public static void main(String[] args) {
        
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID of character that needs to be updated
        try {
            apiInstance.updateCharacter(characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#updateCharacter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CharacterApi;

public class CharacterApiExample {

    public static void main(String[] args) {
        CharacterApi apiInstance = new CharacterApi();
        Long characterId = 789; // Long | ID of character that needs to be updated
        try {
            apiInstance.updateCharacter(characterId);
        } catch (ApiException e) {
            System.err.println("Exception when calling CharacterApi#updateCharacter");
            e.printStackTrace();
        }
    }
}
Long *characterId = 789; // ID of character that needs to be updated

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

// Update character data
[apiInstance updateCharacterWith:characterId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.CharacterApi()
var characterId = 789; // {{Long}} ID of character that needs to be updated

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

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

            var apiInstance = new CharacterApi();
            var characterId = 789;  // Long | ID of character that needs to be updated

            try
            {
                // Update character data
                apiInstance.updateCharacter(characterId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CharacterApi.updateCharacter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiCharacterApi();
$characterId = 789; // Long | ID of character that needs to be updated

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

my $api_instance = WWW::SwaggerClient::CharacterApi->new();
my $characterId = 789; # Long | ID of character that needs to be updated

eval { 
    $api_instance->updateCharacter(characterId => $characterId);
};
if ($@) {
    warn "Exception when calling CharacterApi->updateCharacter: $@\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.CharacterApi()
characterId = 789 # Long | ID of character that needs to be updated

try: 
    # Update character data
    api_instance.update_character(characterId)
except ApiException as e:
    print("Exception when calling CharacterApi->updateCharacter: %s\n" % e)

Parameters

Path parameters
Name Description
characterId*
Long (int64)
ID of character that needs to be updated
Required

Responses

Status: 202 - Input has been accepted

Status: 405 - Invalid input


Shop

addItemToSell

Add new sellable item


/shop

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/shop"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShopApi;

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

public class ShopApiExample {

    public static void main(String[] args) {
        
        ShopApi apiInstance = new ShopApi();
        Item body = ; // Item | Item to be placed to the shop
        try {
            apiInstance.addItemToSell(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#addItemToSell");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ShopApi;

public class ShopApiExample {

    public static void main(String[] args) {
        ShopApi apiInstance = new ShopApi();
        Item body = ; // Item | Item to be placed to the shop
        try {
            apiInstance.addItemToSell(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#addItemToSell");
            e.printStackTrace();
        }
    }
}
Item *body = ; // Item to be placed to the shop

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

// Add new sellable item
[apiInstance addItemToSellWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ShopApi()
var body = ; // {{Item}} Item to be placed to the shop

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

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

            var apiInstance = new ShopApi();
            var body = new Item(); // Item | Item to be placed to the shop

            try
            {
                // Add new sellable item
                apiInstance.addItemToSell(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShopApi.addItemToSell: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiShopApi();
$body = ; // Item | Item to be placed to the shop

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

my $api_instance = WWW::SwaggerClient::ShopApi->new();
my $body = WWW::SwaggerClient::Object::Item->new(); # Item | Item to be placed to the shop

eval { 
    $api_instance->addItemToSell(body => $body);
};
if ($@) {
    warn "Exception when calling ShopApi->addItemToSell: $@\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.ShopApi()
body =  # Item | Item to be placed to the shop

try: 
    # Add new sellable item
    api_instance.add_item_to_sell(body)
except ApiException as e:
    print("Exception when calling ShopApi->addItemToSell: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 405 - Invalid input

Status: default - Successful operation


getItemAtShop

Access to certain item at shop


/shop/{itemId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/shop/{itemId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShopApi;

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

public class ShopApiExample {

    public static void main(String[] args) {
        
        ShopApi apiInstance = new ShopApi();
        Long itemId = 789; // Long | Item ID to find by
        try {
            Item result = apiInstance.getItemAtShop(itemId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#getItemAtShop");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ShopApi;

public class ShopApiExample {

    public static void main(String[] args) {
        ShopApi apiInstance = new ShopApi();
        Long itemId = 789; // Long | Item ID to find by
        try {
            Item result = apiInstance.getItemAtShop(itemId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#getItemAtShop");
            e.printStackTrace();
        }
    }
}
Long *itemId = 789; // Item ID to find by

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

// Access to certain item at shop
[apiInstance getItemAtShopWith:itemId
              completionHandler: ^(Item output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ShopApi()
var itemId = 789; // {{Long}} Item ID to find by

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

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

            var apiInstance = new ShopApi();
            var itemId = 789;  // Long | Item ID to find by

            try
            {
                // Access to certain item at shop
                Item result = apiInstance.getItemAtShop(itemId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShopApi.getItemAtShop: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiShopApi();
$itemId = 789; // Long | Item ID to find by

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

my $api_instance = WWW::SwaggerClient::ShopApi->new();
my $itemId = 789; # Long | Item ID to find by

eval { 
    my $result = $api_instance->getItemAtShop(itemId => $itemId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ShopApi->getItemAtShop: $@\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.ShopApi()
itemId = 789 # Long | Item ID to find by

try: 
    # Access to certain item at shop
    api_response = api_instance.get_item_at_shop(itemId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ShopApi->getItemAtShop: %s\n" % e)

Parameters

Path parameters
Name Description
itemId*
Long (int64)
Item ID to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - Item not found


getItemsToBuy

Show all items that possible to buy


/shop

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/shop"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShopApi;

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

public class ShopApiExample {

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

public class ShopApiExample {

    public static void main(String[] args) {
        ShopApi apiInstance = new ShopApi();
        try {
            array[Item] result = apiInstance.getItemsToBuy();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#getItemsToBuy");
            e.printStackTrace();
        }
    }
}

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

// Show all items that possible to buy
[apiInstance getItemsToBuyWithCompletionHandler: 
              ^(array[Item] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ShopApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getItemsToBuy(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ShopApi();

            try
            {
                // Show all items that possible to buy
                array[Item] result = apiInstance.getItemsToBuy();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShopApi.getItemsToBuy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->getItemsToBuy();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ShopApi->getItemsToBuy: $@\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.ShopApi()

try: 
    # Show all items that possible to buy
    api_response = api_instance.get_items_to_buy()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ShopApi->getItemsToBuy: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


updateItem

Update item data


/shop/{itemId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/shop/{itemId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ShopApi;

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

public class ShopApiExample {

    public static void main(String[] args) {
        
        ShopApi apiInstance = new ShopApi();
        Long itemId = 789; // Long | ID of item that needs to be updated
        try {
            apiInstance.updateItem(itemId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#updateItem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ShopApi;

public class ShopApiExample {

    public static void main(String[] args) {
        ShopApi apiInstance = new ShopApi();
        Long itemId = 789; // Long | ID of item that needs to be updated
        try {
            apiInstance.updateItem(itemId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ShopApi#updateItem");
            e.printStackTrace();
        }
    }
}
Long *itemId = 789; // ID of item that needs to be updated

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

// Update item data
[apiInstance updateItemWith:itemId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.ShopApi()
var itemId = 789; // {{Long}} ID of item that needs to be updated

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

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

            var apiInstance = new ShopApi();
            var itemId = 789;  // Long | ID of item that needs to be updated

            try
            {
                // Update item data
                apiInstance.updateItem(itemId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShopApi.updateItem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiShopApi();
$itemId = 789; // Long | ID of item that needs to be updated

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

my $api_instance = WWW::SwaggerClient::ShopApi->new();
my $itemId = 789; # Long | ID of item that needs to be updated

eval { 
    $api_instance->updateItem(itemId => $itemId);
};
if ($@) {
    warn "Exception when calling ShopApi->updateItem: $@\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.ShopApi()
itemId = 789 # Long | ID of item that needs to be updated

try: 
    # Update item data
    api_instance.update_item(itemId)
except ApiException as e:
    print("Exception when calling ShopApi->updateItem: %s\n" % e)

Parameters

Path parameters
Name Description
itemId*
Long (int64)
ID of item that needs to be updated
Required

Responses

Status: 202 - Input has been accepted

Status: 405 - Invalid input


User

addUser

Add new user


/user

Usage and SDK Samples

curl -X POST\
-H "Content-Type: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        User body = ; // User | User object that needs to be added
        try {
            apiInstance.addUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#addUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        User body = ; // User | User object that needs to be added
        try {
            apiInstance.addUser(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#addUser");
            e.printStackTrace();
        }
    }
}
User *body = ; // User object that needs to be added (optional)

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

// Add new user
[apiInstance addUserWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.UserApi()
var opts = { 
  'body':  // {{User}} User object that needs to be added
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.addUser(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new UserApi();
            var body = new User(); // User | User object that needs to be added (optional) 

            try
            {
                // Add new user
                apiInstance.addUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.addUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUserApi();
$body = ; // User | User object that needs to be added

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

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | User object that needs to be added

eval { 
    $api_instance->addUser(body => $body);
};
if ($@) {
    warn "Exception when calling UserApi->addUser: $@\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.UserApi()
body =  # User | User object that needs to be added (optional)

try: 
    # Add new user
    api_instance.add_user(body=body)
except ApiException as e:
    print("Exception when calling UserApi->addUser: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 405 - Invalid input

Status: default - Successful operation


getUser

Access to user data


/user/{userId}

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json,application/xml"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/user/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | User ID to find by
        try {
            User result = apiInstance.getUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | User ID to find by
        try {
            User result = apiInstance.getUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUser");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // User ID to find by

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

// Access to user data
[apiInstance getUserWith:userId
              completionHandler: ^(User output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.UserApi()
var userId = 789; // {{Long}} User ID to find by

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

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

            var apiInstance = new UserApi();
            var userId = 789;  // Long | User ID to find by

            try
            {
                // Access to user data
                User result = apiInstance.getUser(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUserApi();
$userId = 789; // Long | User ID to find by

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

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $userId = 789; # Long | User ID to find by

eval { 
    my $result = $api_instance->getUser(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->getUser: $@\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.UserApi()
userId = 789 # Long | User ID to find by

try: 
    # Access to user data
    api_response = api_instance.get_user(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->getUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Long (int64)
User ID to find by
Required

Responses

Status: 200 - Successful operation

Status: 400 - Invalid ID supplied

Status: 404 - User not found


getUsers

Show all users

Get list of users


/user

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

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

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        try {
            array[User] result = apiInstance.getUsers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#getUsers");
            e.printStackTrace();
        }
    }
}

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

// Show all users
[apiInstance getUsersWithCompletionHandler: 
              ^(array[User] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.UserApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUsers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new UserApi();

            try
            {
                // Show all users
                array[User] result = apiInstance.getUsers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.getUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

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

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

eval { 
    my $result = $api_instance->getUsers();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserApi->getUsers: $@\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.UserApi()

try: 
    # Show all users
    api_response = api_instance.get_users()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->getUsers: %s\n" % e)

Parameters

Responses

Status: 200 - Successful operation


removeUser

Delete a user


/user/{userId}

Usage and SDK Samples

curl -X DELETE\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/user/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | ID of user that needs to be deleted
        try {
            apiInstance.removeUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#removeUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | ID of user that needs to be deleted
        try {
            apiInstance.removeUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#removeUser");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // ID of user that needs to be deleted

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

// Delete a user
[apiInstance removeUserWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.UserApi()
var userId = 789; // {{Long}} ID of user that needs to be deleted

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

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

            var apiInstance = new UserApi();
            var userId = 789;  // Long | ID of user that needs to be deleted

            try
            {
                // Delete a user
                apiInstance.removeUser(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.removeUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUserApi();
$userId = 789; // Long | ID of user that needs to be deleted

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

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $userId = 789; # Long | ID of user that needs to be deleted

eval { 
    $api_instance->removeUser(userId => $userId);
};
if ($@) {
    warn "Exception when calling UserApi->removeUser: $@\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.UserApi()
userId = 789 # Long | ID of user that needs to be deleted

try: 
    # Delete a user
    api_instance.remove_user(userId)
except ApiException as e:
    print("Exception when calling UserApi->removeUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Long (int64)
ID of user that needs to be deleted
Required

Responses

Status: 400 - Invalid ID supplied

Status: 404 - Student not found


updateUser

Update user data


/user/{userId}

Usage and SDK Samples

curl -X PUT\
"https://virtserver.swaggerhub.com/mementomorri/REST_api_for_habit_tracker/1.0.0/user/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UserApi;

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

public class UserApiExample {

    public static void main(String[] args) {
        
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | ID of user that needs to be updated
        try {
            apiInstance.updateUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UserApi;

public class UserApiExample {

    public static void main(String[] args) {
        UserApi apiInstance = new UserApi();
        Long userId = 789; // Long | ID of user that needs to be updated
        try {
            apiInstance.updateUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserApi#updateUser");
            e.printStackTrace();
        }
    }
}
Long *userId = 789; // ID of user that needs to be updated

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

// Update user data
[apiInstance updateUserWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RestApiForHabitTracker = require('rest_api_for_habit_tracker');

var api = new RestApiForHabitTracker.UserApi()
var userId = 789; // {{Long}} ID of user that needs to be updated

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

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

            var apiInstance = new UserApi();
            var userId = 789;  // Long | ID of user that needs to be updated

            try
            {
                // Update user data
                apiInstance.updateUser(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.updateUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiUserApi();
$userId = 789; // Long | ID of user that needs to be updated

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

my $api_instance = WWW::SwaggerClient::UserApi->new();
my $userId = 789; # Long | ID of user that needs to be updated

eval { 
    $api_instance->updateUser(userId => $userId);
};
if ($@) {
    warn "Exception when calling UserApi->updateUser: $@\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.UserApi()
userId = 789 # Long | ID of user that needs to be updated

try: 
    # Update user data
    api_instance.update_user(userId)
except ApiException as e:
    print("Exception when calling UserApi->updateUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
Long (int64)
ID of user that needs to be updated
Required

Responses

Status: 202 - Input has been accepted

Status: 405 - Invalid input