getColorLists
Get available color name lists
Returns a list of available color name lists with descriptions and URLs to the color list endpoints. If a specific list key is provided via the 'list' query parameter, only the description for that list will be returned.
/lists/
Usage and SDK Samples
curl -X GET \
-H "Accept: application/json" \
"https://api.color.pizza/v1/lists/?list="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
// Create an instance of the API class
DefaultApi apiInstance = new DefaultApi();
PossibleLists list = ; // PossibleLists | The name of a specific color name list to retrieve details for
try {
ColorListsResponse result = apiInstance.getColorLists(list);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getColorLists");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
PossibleLists list = ; // PossibleLists | The name of a specific color name list to retrieve details for
try {
ColorListsResponse result = apiInstance.getColorLists(list);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#getColorLists");
e.printStackTrace();
}
}
}
// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
PossibleLists *list = ; // The name of a specific color name list to retrieve details for (optional) (default to null)
// Get available color name lists
[apiInstance getColorListsWith:list
completionHandler: ^(ColorListsResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ColorNameApi = require('color_name_api');
// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var opts = {
'list': // {PossibleLists} The name of a specific color name list to retrieve details for
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getColorLists(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class getColorListsExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new DefaultApi();
var list = new PossibleLists(); // PossibleLists | The name of a specific color name list to retrieve details for (optional) (default to null)
try {
// Get available color name lists
ColorListsResponse result = apiInstance.getColorLists(list);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling DefaultApi.getColorLists: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$list = ; // PossibleLists | The name of a specific color name list to retrieve details for
try {
$result = $api_instance->getColorLists($list);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getColorLists: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $list = ; # PossibleLists | The name of a specific color name list to retrieve details for
eval {
my $result = $api_instance->getColorLists(list => $list);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->getColorLists: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
list = # PossibleLists | The name of a specific color name list to retrieve details for (optional) (default to null)
try:
# Get available color name lists
api_response = api_instance.get_color_lists(list=list)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->getColorLists: %s\n" % e)
extern crate DefaultApi;
pub fn main() {
let list = ; // PossibleLists
let mut context = DefaultApi::Context::default();
let result = client.getColorLists(list, &context).wait();
println!("{:?}", result);
}
Scopes
Parameters
Name | Description |
---|---|
list |
PossibleLists
The name of a specific color name list to retrieve details for
|