createMonster
Create a monster
Create a monster from a combination of a head, torso, legs, and a name.
/monster
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://monster-factory.online/monster"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MonsterApi;
import java.io.File;
import java.util.*;
public class MonsterApiExample {
public static void main(String[] args) {
MonsterApi apiInstance = new MonsterApi();
MonsterRequest body = ; // MonsterRequest |
try {
Monster result = apiInstance.createMonster(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MonsterApi#createMonster");
e.printStackTrace();
}
}
}
import io.swagger.client.api.MonsterApi;
public class MonsterApiExample {
public static void main(String[] args) {
MonsterApi apiInstance = new MonsterApi();
MonsterRequest body = ; // MonsterRequest |
try {
Monster result = apiInstance.createMonster(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MonsterApi#createMonster");
e.printStackTrace();
}
}
}
MonsterRequest *body = ; //
MonsterApi *apiInstance = [[MonsterApi alloc] init];
// Create a monster
[apiInstance createMonsterWith:body
completionHandler: ^(Monster output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var MonsterFactory = require('monster_factory');
var api = new MonsterFactory.MonsterApi()
var body = ; // {{MonsterRequest}}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createMonster(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createMonsterExample
{
public void main()
{
var apiInstance = new MonsterApi();
var body = new MonsterRequest(); // MonsterRequest |
try
{
// Create a monster
Monster result = apiInstance.createMonster(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling MonsterApi.createMonster: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiMonsterApi();
$body = ; // MonsterRequest |
try {
$result = $api_instance->createMonster($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MonsterApi->createMonster: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MonsterApi;
my $api_instance = WWW::SwaggerClient::MonsterApi->new();
my $body = WWW::SwaggerClient::Object::MonsterRequest->new(); # MonsterRequest |
eval {
my $result = $api_instance->createMonster(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling MonsterApi->createMonster: $@\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.MonsterApi()
body = # MonsterRequest |
try:
# Create a monster
api_response = api_instance.create_monster(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling MonsterApi->createMonster: %s\n" % e)
Parameters
Body parameters
Name | Description |
---|---|
body * |