createUser
/users
Usage and SDK Samples
curl -X POST "https://api.apieco.ir/reqres/api/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CreateUserApi;
import java.io.File;
import java.util.*;
public class CreateUserApiExample {
public static void main(String[] args) {
CreateUserApi apiInstance = new CreateUserApi();
String apiecoKey = apiecoKey_example; // String |
Body body = ; // Body |
try {
inline_response_200_1 result = apiInstance.createUser(apiecoKey, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateUserApi#createUser");
e.printStackTrace();
}
}
}
import io.swagger.client.api.CreateUserApi;
public class CreateUserApiExample {
public static void main(String[] args) {
CreateUserApi apiInstance = new CreateUserApi();
String apiecoKey = apiecoKey_example; // String |
Body body = ; // Body |
try {
inline_response_200_1 result = apiInstance.createUser(apiecoKey, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CreateUserApi#createUser");
e.printStackTrace();
}
}
}
String *apiecoKey = apiecoKey_example; //
Body *body = ; //
CreateUserApi *apiInstance = [[CreateUserApi alloc] init];
[apiInstance createUserWith:apiecoKey
body:body
completionHandler: ^(inline_response_200_1 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ReqResApi = require('req__res_api');
var api = new ReqResApi.CreateUserApi()
var apiecoKey = apiecoKey_example; // {String}
var body = ; // {Body}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createUser(apiecoKey, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createUserExample
{
public void main()
{
var apiInstance = new CreateUserApi();
var apiecoKey = apiecoKey_example; // String |
var body = new Body(); // Body |
try
{
inline_response_200_1 result = apiInstance.createUser(apiecoKey, body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CreateUserApi.createUser: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\CreateUserApi();
$apiecoKey = apiecoKey_example; // String |
$body = ; // Body |
try {
$result = $api_instance->createUser($apiecoKey, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CreateUserApi->createUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CreateUserApi;
my $api_instance = WWW::SwaggerClient::CreateUserApi->new();
my $apiecoKey = apiecoKey_example; # String |
my $body = WWW::SwaggerClient::Object::Body->new(); # Body |
eval {
my $result = $api_instance->createUser(apiecoKey => $apiecoKey, body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CreateUserApi->createUser: $@\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.CreateUserApi()
apiecoKey = apiecoKey_example # String |
body = # Body |
try:
api_response = api_instance.create_user(apiecoKey, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling CreateUserApi->createUser: %s\n" % e)
Parameters
Header parameters
Name | Description |
---|---|
apieco-key* |
String
Required
|
Body parameters
Name | Description |
---|---|
body * |