createTask
Task creation
Creates a new task. By default the task is in `todo` state.
/task
Usage and SDK Samples
curl -X POST "http://api.tasker.ovh/1.0.0/task"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String title = title_example; // String | A title of the task
String description = description_example; // String | A description of the task
String asignee = asignee_example; // String | A name of person asigned to the task
try {
apiInstance.createTask(title, description, asignee);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createTask");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String title = title_example; // String | A title of the task
String description = description_example; // String | A description of the task
String asignee = asignee_example; // String | A name of person asigned to the task
try {
apiInstance.createTask(title, description, asignee);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#createTask");
e.printStackTrace();
}
}
}
String *title = title_example; // A title of the task
String *description = description_example; // A description of the task (optional)
String *asignee = asignee_example; // A name of person asigned to the task (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
// Task creation
[apiInstance createTaskWith:title
description:description
asignee:asignee
completionHandler: ^(NSError* error) {
if (error) {
NSLog(@"Error: %@", error);
}
}];
var TaskerApi = require('tasker_api');
var api = new TaskerApi.DefaultApi()
var title = title_example; // {String} A title of the task
var opts = {
'description': description_example, // {String} A description of the task
'asignee': asignee_example // {String} A name of person asigned to the task
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
api.createTask(title, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createTaskExample
{
public void main()
{
var apiInstance = new DefaultApi();
var title = title_example; // String | A title of the task
var description = description_example; // String | A description of the task (optional)
var asignee = asignee_example; // String | A name of person asigned to the task (optional)
try
{
// Task creation
apiInstance.createTask(title, description, asignee);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.createTask: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\DefaultApi();
$title = title_example; // String | A title of the task
$description = description_example; // String | A description of the task
$asignee = asignee_example; // String | A name of person asigned to the task
try {
$api_instance->createTask($title, $description, $asignee);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->createTask: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $title = title_example; # String | A title of the task
my $description = description_example; # String | A description of the task
my $asignee = asignee_example; # String | A name of person asigned to the task
eval {
$api_instance->createTask(title => $title, description => $description, asignee => $asignee);
};
if ($@) {
warn "Exception when calling DefaultApi->createTask: $@\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.DefaultApi()
title = title_example # String | A title of the task
description = description_example # String | A description of the task (optional)
asignee = asignee_example # String | A name of person asigned to the task (optional)
try:
# Task creation
api_instance.create_task(title, description=description, asignee=asignee)
except ApiException as e:
print("Exception when calling DefaultApi->createTask: %s\n" % e)
Parameters
Name | Description |
---|---|
title* |
String
A title of the task
Required
|
description |
String
A description of the task
|
asignee |
String
A name of person asigned to the task
|