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
Name | Description |
---|---|
body * |