createList
Creates a new list.
Creates a new list.
/lists
Usage and SDK Samples
curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:7257/api/lists"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ListsApi;
import java.io.File;
import java.util.*;
public class ListsApiExample {
public static void main(String[] args) {
ListsApi apiInstance = new ListsApi();
CreateListDto body = ; // CreateListDto | The details of the list to create.
String authorization = authorization_example; // String | Bearer token for authorization.
try {
readListDto result = apiInstance.createList(body, authorization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ListsApi#createList");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ListsApi;
public class ListsApiExample {
public static void main(String[] args) {
ListsApi apiInstance = new ListsApi();
CreateListDto body = ; // CreateListDto | The details of the list to create.
String authorization = authorization_example; // String | Bearer token for authorization.
try {
readListDto result = apiInstance.createList(body, authorization);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ListsApi#createList");
e.printStackTrace();
}
}
}
CreateListDto *body = ; // The details of the list to create.
String *authorization = authorization_example; // Bearer token for authorization.
ListsApi *apiInstance = [[ListsApi alloc] init];
// Creates a new list.
[apiInstance createListWith:body
authorization:authorization
completionHandler: ^(readListDto output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OpenApiDocumentOnAzureFunctions = require('open_api_document_on_azure_functions');
var api = new OpenApiDocumentOnAzureFunctions.ListsApi()
var body = ; // {{CreateListDto}} The details of the list to create.
var authorization = authorization_example; // {{String}} Bearer token for authorization.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createList(bodyauthorization, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createListExample
{
public void main()
{
var apiInstance = new ListsApi();
var body = new CreateListDto(); // CreateListDto | The details of the list to create.
var authorization = authorization_example; // String | Bearer token for authorization.
try
{
// Creates a new list.
readListDto result = apiInstance.createList(body, authorization);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ListsApi.createList: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiListsApi();
$body = ; // CreateListDto | The details of the list to create.
$authorization = authorization_example; // String | Bearer token for authorization.
try {
$result = $api_instance->createList($body, $authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ListsApi->createList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ListsApi;
my $api_instance = WWW::SwaggerClient::ListsApi->new();
my $body = WWW::SwaggerClient::Object::CreateListDto->new(); # CreateListDto | The details of the list to create.
my $authorization = authorization_example; # String | Bearer token for authorization.
eval {
my $result = $api_instance->createList(body => $body, authorization => $authorization);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ListsApi->createList: $@\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.ListsApi()
body = # CreateListDto | The details of the list to create.
authorization = authorization_example # String | Bearer token for authorization.
try:
# Creates a new list.
api_response = api_instance.create_list(body, authorization)
pprint(api_response)
except ApiException as e:
print("Exception when calling ListsApi->createList: %s\n" % e)
Parameters
Name | Description |
---|---|
Authorization* |
Name | Description |
---|---|
body * |