random User

RandomUser

getUser

Get Random Users

.


/api/

Usage and SDK Samples

curl -X GET -H "apieco-key: [[apiKey]]" "https://api.apieco.ir/randomuser/api/?results=&gender=&passwords=&seeds=&format="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.RandomUserApi;

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

public class RandomUserApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: apieco-key
        ApiKeyAuth apieco-key = (ApiKeyAuth) defaultClient.getAuthentication("apieco-key");
        apieco-key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //apieco-key.setApiKeyPrefix("Token");

        RandomUserApi apiInstance = new RandomUserApi();
        BigDecimal apiecoKey = 8.14; // BigDecimal | 
        String results = results_example; // String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
        String gender = gender_example; // String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
        String passwords = passwords_example; // String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
        String seeds = seeds_example; // String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
        String format = format_example; // String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.
        try {
            user result = apiInstance.getUser(apiecoKey, results, gender, passwords, seeds, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RandomUserApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.RandomUserApi;

public class RandomUserApiExample {

    public static void main(String[] args) {
        RandomUserApi apiInstance = new RandomUserApi();
        BigDecimal apiecoKey = 8.14; // BigDecimal | 
        String results = results_example; // String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
        String gender = gender_example; // String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
        String passwords = passwords_example; // String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
        String seeds = seeds_example; // String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
        String format = format_example; // String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.
        try {
            user result = apiInstance.getUser(apiecoKey, results, gender, passwords, seeds, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RandomUserApi#getUser");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: apieco-key)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"apieco-key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"apieco-key"];

BigDecimal *apiecoKey = 8.14; // 
String *results = results_example; // Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter. (optional)
String *gender = gender_example; // You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users. (optional)
String *passwords = passwords_example; // RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option. (optional)
String *seeds = seeds_example; // Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters. (optional)
String *format = format_example; // SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter. (optional)

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

// Get Random Users
[apiInstance getUserWith:apiecoKey
    results:results
    gender:gender
    passwords:passwords
    seeds:seeds
    format:format
              completionHandler: ^(user output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var RadnomUser = require('radnom_user');
var defaultClient = RadnomUser.ApiClient.instance;

// Configure API key authorization: apieco-key
var apieco-key = defaultClient.authentications['apieco-key'];
apieco-key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apieco-key.apiKeyPrefix['apieco-key'] = "Token"

var api = new RadnomUser.RandomUserApi()

var apiecoKey = 8.14; // {BigDecimal} 

var opts = { 
  'results': results_example, // {String} Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
  'gender': gender_example, // {String} You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
  'passwords': passwords_example, // {String} RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
  'seeds': seeds_example, // {String} Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
  'format': format_example // {String} SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(apiecoKey, opts, 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()
        {
            
            // Configure API key authorization: apieco-key
            Configuration.Default.ApiKey.Add("apieco-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("apieco-key", "Bearer");

            var apiInstance = new RandomUserApi();
            var apiecoKey = 8.14;  // BigDecimal | 
            var results = results_example;  // String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter. (optional) 
            var gender = gender_example;  // String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users. (optional) 
            var passwords = passwords_example;  // String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option. (optional) 
            var seeds = seeds_example;  // String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters. (optional) 
            var format = format_example;  // String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter. (optional) 

            try
            {
                // Get Random Users
                user result = apiInstance.getUser(apiecoKey, results, gender, passwords, seeds, format);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling RandomUserApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: apieco-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('apieco-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apieco-key', 'Bearer');

$api_instance = new Swagger\Client\Api\RandomUserApi();
$apiecoKey = 8.14; // BigDecimal | 
$results = results_example; // String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
$gender = gender_example; // String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
$passwords = passwords_example; // String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
$seeds = seeds_example; // String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
$format = format_example; // String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.

try {
    $result = $api_instance->getUser($apiecoKey, $results, $gender, $passwords, $seeds, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RandomUserApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::RandomUserApi;

# Configure API key authorization: apieco-key
$WWW::SwaggerClient::Configuration::api_key->{'apieco-key'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'apieco-key'} = "Bearer";

my $api_instance = WWW::SwaggerClient::RandomUserApi->new();
my $apiecoKey = 8.14; # BigDecimal | 
my $results = results_example; # String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
my $gender = gender_example; # String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
my $passwords = passwords_example; # String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
my $seeds = seeds_example; # String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
my $format = format_example; # String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.

eval { 
    my $result = $api_instance->getUser(apiecoKey => $apiecoKey, results => $results, gender => $gender, passwords => $passwords, seeds => $seeds, format => $format);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RandomUserApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: apieco-key
swagger_client.configuration.api_key['apieco-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['apieco-key'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.RandomUserApi()
apiecoKey = 8.14 # BigDecimal | 
results = results_example # String | Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter. (optional)
gender = gender_example # String | You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users. (optional)
passwords = passwords_example # String | RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option. (optional)
seeds = seeds_example # String | Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters. (optional)
format = format_example # String | SWe currently offer the following data formats:
JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter. (optional)

try: 
    # Get Random Users
    api_response = api_instance.get_user(apiecoKey, results=results, gender=gender, passwords=passwords, seeds=seeds, format=format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RandomUserApi->getUser: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
BigDecimal
Required
Query parameters
Name Description
results
String
Random User Generator allows you to fetch up to 5,000 generated users in one request using the results parameter.
gender
String
You can specify whether you would like to have only male or only female users generated by adding the gender parameter to your request. Valid values for the gender parameter are male or female, or you may leave the parameter blank. Any other value will cause the service to return both male and female users.
passwords
String
RBy default, passwords are chosen randomly from a list of ~10k top used passwords. Starting with version 1.1, you can have more control over how passwords are generated using the password option.
seeds
String
Seeds allow you to always generate the same set of users. For example, the seed foobar will always return results for Becky Sims (for version 1.0). Seeds can be any string or sequence of characters.
format
String
SWe currently offer the following data formats: JSON (default) PrettyJSON or pretty CSV YAML XML Just specify the format you would like returned by using the format parameter.

Responses

Status: 200 - Succesfull

Status: 401 - wrong code

Status: 405 - Invalid input