Monster Factory

Monster

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 *

Responses

Status: 200 - Successful operation

Status: 400 - Invalid Monster Request


Part

getAllMonsterParts

Query monster parts

Query all monster heads, toroso, and legs.


/part

Usage and SDK Samples

curl -X GET\
-H "Accept: application/json"\
"https://monster-factory.online/part?segment=&category=&creature="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PartApi;

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

public class PartApiExample {

    public static void main(String[] args) {
        
        PartApi apiInstance = new PartApi();
        String segment = segment_example; // String | Which segment to filter by [HEAD, TORSO, LEGS]
        String category = category_example; // String | Which category to filter by [OCCUPATION, MONSTER]
        String creature = creature_example; // String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]
        try {
            PartArray result = apiInstance.getAllMonsterParts(segment, category, creature);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartApi#getAllMonsterParts");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PartApi;

public class PartApiExample {

    public static void main(String[] args) {
        PartApi apiInstance = new PartApi();
        String segment = segment_example; // String | Which segment to filter by [HEAD, TORSO, LEGS]
        String category = category_example; // String | Which category to filter by [OCCUPATION, MONSTER]
        String creature = creature_example; // String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]
        try {
            PartArray result = apiInstance.getAllMonsterParts(segment, category, creature);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PartApi#getAllMonsterParts");
            e.printStackTrace();
        }
    }
}
String *segment = segment_example; // Which segment to filter by [HEAD, TORSO, LEGS] (optional)
String *category = category_example; // Which category to filter by [OCCUPATION, MONSTER] (optional)
String *creature = creature_example; // Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST] (optional)

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

// Query monster parts
[apiInstance getAllMonsterPartsWith:segment
    category:category
    creature:creature
              completionHandler: ^(PartArray output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var MonsterFactory = require('monster_factory');

var api = new MonsterFactory.PartApi()
var opts = { 
  'segment': segment_example, // {{String}} Which segment to filter by [HEAD, TORSO, LEGS]
  'category': category_example, // {{String}} Which category to filter by [OCCUPATION, MONSTER]
  'creature': creature_example // {{String}} Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAllMonsterParts(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new PartApi();
            var segment = segment_example;  // String | Which segment to filter by [HEAD, TORSO, LEGS] (optional) 
            var category = category_example;  // String | Which category to filter by [OCCUPATION, MONSTER] (optional) 
            var creature = creature_example;  // String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST] (optional) 

            try
            {
                // Query monster parts
                PartArray result = apiInstance.getAllMonsterParts(segment, category, creature);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PartApi.getAllMonsterParts: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPartApi();
$segment = segment_example; // String | Which segment to filter by [HEAD, TORSO, LEGS]
$category = category_example; // String | Which category to filter by [OCCUPATION, MONSTER]
$creature = creature_example; // String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]

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

my $api_instance = WWW::SwaggerClient::PartApi->new();
my $segment = segment_example; # String | Which segment to filter by [HEAD, TORSO, LEGS]
my $category = category_example; # String | Which category to filter by [OCCUPATION, MONSTER]
my $creature = creature_example; # String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]

eval { 
    my $result = $api_instance->getAllMonsterParts(segment => $segment, category => $category, creature => $creature);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PartApi->getAllMonsterParts: $@\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.PartApi()
segment = segment_example # String | Which segment to filter by [HEAD, TORSO, LEGS] (optional)
category = category_example # String | Which category to filter by [OCCUPATION, MONSTER] (optional)
creature = creature_example # String | Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST] (optional)

try: 
    # Query monster parts
    api_response = api_instance.get_all_monster_parts(segment=segment, category=category, creature=creature)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PartApi->getAllMonsterParts: %s\n" % e)

Parameters

Query parameters
Name Description
segment
String
Which segment to filter by [HEAD, TORSO, LEGS]
category
String
Which category to filter by [OCCUPATION, MONSTER]
creature
String
Which creature to filter by [ZOMBIE, VAMPIRE, GHOST, WEREWOLF, WITCH, ASTRONAUT, TEACHER, PLUMBER, PROGRAMMER, ARTIST]

Responses

Status: 200 - Successful operation