continuationsGet
Get a selection of correct and incorrect continuations for a (possibly empty) sentence.
This endpoint supplies a mapping from tokens to status values, which are 'final', 'nonfinal' and 'incorrect'. <b>final</b>: These tokens are acceptable given the current sentence, and will therefore be droppable into the authoring area. In addition, they lead to a final, acceptable sentence. In the case of a 'write' task, this means that the selection of such a token will cause the <b>Write</b> button to be enabled, while in a 'game' task, it will cause the sentence to be written automatically to the right-hand panel. <b>nonfinal</b>: These tokens are acceptable given the current sentence, and will therefore be droppable into the authoring area. <b>incorrect</b>: These tokens are not acceptable given the current sentence, and will not be droppable into the authoring area.
/continuations
Usage and SDK Samples
curl -X GET "https://localhost/continuations?user_id=&lesson_index=&task_index=&sentence=&prompt="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ContinuationsApi;
import java.io.File;
import java.util.*;
public class ContinuationsApiExample {
public static void main(String[] args) {
ContinuationsApi apiInstance = new ContinuationsApi();
String userId = userId_example; // String | Unique user identifier.
String lessonIndex = lessonIndex_example; // String | Index of lesson.
Integer taskIndex = 56; // Integer | Index of task in lesson.
String sentence = sentence_example; // String | Sentence authored so far.
String prompt = prompt_example; // String | Prompt, if applicable.
try {
inline_response_200_4 result = apiInstance.continuationsGet(userId, lessonIndex, taskIndex, sentence, prompt);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ContinuationsApi#continuationsGet");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ContinuationsApi;
public class ContinuationsApiExample {
public static void main(String[] args) {
ContinuationsApi apiInstance = new ContinuationsApi();
String userId = userId_example; // String | Unique user identifier.
String lessonIndex = lessonIndex_example; // String | Index of lesson.
Integer taskIndex = 56; // Integer | Index of task in lesson.
String sentence = sentence_example; // String | Sentence authored so far.
String prompt = prompt_example; // String | Prompt, if applicable.
try {
inline_response_200_4 result = apiInstance.continuationsGet(userId, lessonIndex, taskIndex, sentence, prompt);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ContinuationsApi#continuationsGet");
e.printStackTrace();
}
}
}
String *userId = userId_example; // Unique user identifier.
String *lessonIndex = lessonIndex_example; // Index of lesson.
Integer *taskIndex = 56; // Index of task in lesson.
String *sentence = sentence_example; // Sentence authored so far.
String *prompt = prompt_example; // Prompt, if applicable. (optional)
ContinuationsApi *apiInstance = [[ContinuationsApi alloc] init];
// Get a selection of correct and incorrect continuations for a (possibly empty) sentence.
[apiInstance continuationsGetWith:userId
lessonIndex:lessonIndex
taskIndex:taskIndex
sentence:sentence
prompt:prompt
completionHandler: ^(inline_response_200_4 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var ApiSpecificationForNgiyaqondaNlgWorker = require('api_specification_for_ngiyaqonda_nlg_worker');
var api = new ApiSpecificationForNgiyaqondaNlgWorker.ContinuationsApi()
var userId = userId_example; // {String} Unique user identifier.
var lessonIndex = lessonIndex_example; // {String} Index of lesson.
var taskIndex = 56; // {Integer} Index of task in lesson.
var sentence = sentence_example; // {String} Sentence authored so far.
var opts = {
'prompt': prompt_example // {String} Prompt, if applicable.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.continuationsGet(userId, lessonIndex, taskIndex, sentence, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class continuationsGetExample
{
public void main()
{
var apiInstance = new ContinuationsApi();
var userId = userId_example; // String | Unique user identifier.
var lessonIndex = lessonIndex_example; // String | Index of lesson.
var taskIndex = 56; // Integer | Index of task in lesson.
var sentence = sentence_example; // String | Sentence authored so far.
var prompt = prompt_example; // String | Prompt, if applicable. (optional)
try
{
// Get a selection of correct and incorrect continuations for a (possibly empty) sentence.
inline_response_200_4 result = apiInstance.continuationsGet(userId, lessonIndex, taskIndex, sentence, prompt);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ContinuationsApi.continuationsGet: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\ContinuationsApi();
$userId = userId_example; // String | Unique user identifier.
$lessonIndex = lessonIndex_example; // String | Index of lesson.
$taskIndex = 56; // Integer | Index of task in lesson.
$sentence = sentence_example; // String | Sentence authored so far.
$prompt = prompt_example; // String | Prompt, if applicable.
try {
$result = $api_instance->continuationsGet($userId, $lessonIndex, $taskIndex, $sentence, $prompt);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContinuationsApi->continuationsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ContinuationsApi;
my $api_instance = WWW::SwaggerClient::ContinuationsApi->new();
my $userId = userId_example; # String | Unique user identifier.
my $lessonIndex = lessonIndex_example; # String | Index of lesson.
my $taskIndex = 56; # Integer | Index of task in lesson.
my $sentence = sentence_example; # String | Sentence authored so far.
my $prompt = prompt_example; # String | Prompt, if applicable.
eval {
my $result = $api_instance->continuationsGet(userId => $userId, lessonIndex => $lessonIndex, taskIndex => $taskIndex, sentence => $sentence, prompt => $prompt);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ContinuationsApi->continuationsGet: $@\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.ContinuationsApi()
userId = userId_example # String | Unique user identifier.
lessonIndex = lessonIndex_example # String | Index of lesson.
taskIndex = 56 # Integer | Index of task in lesson.
sentence = sentence_example # String | Sentence authored so far.
prompt = prompt_example # String | Prompt, if applicable. (optional)
try:
# Get a selection of correct and incorrect continuations for a (possibly empty) sentence.
api_response = api_instance.continuations_get(userId, lessonIndex, taskIndex, sentence, prompt=prompt)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContinuationsApi->continuationsGet: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| user_id* |
String
Unique user identifier.
Required
|
| lesson_index* |
String
Index of lesson.
Required
|
| task_index* |
Integer
Index of task in lesson.
Required
|
| sentence* |
String
Sentence authored so far.
Required
|
| prompt |
String
Prompt, if applicable.
|