getAnswers
Return the number of answers of the user
/answers
Usage and SDK Samples
curl -X GET "https://lp-miar-groupe01-cloned-paul604.c9users.io/quiz-omdb-1.0.0/answers?token="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.APIApi;
import java.io.File;
import java.util.*;
public class APIApiExample {
public static void main(String[] args) {
APIApi apiInstance = new APIApi();
String token = token_example; // String | The token of the user
try {
inline_response_200_4 result = apiInstance.getAnswers(token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APIApi#getAnswers");
e.printStackTrace();
}
}
}
import io.swagger.client.api.APIApi;
public class APIApiExample {
public static void main(String[] args) {
APIApi apiInstance = new APIApi();
String token = token_example; // String | The token of the user
try {
inline_response_200_4 result = apiInstance.getAnswers(token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling APIApi#getAnswers");
e.printStackTrace();
}
}
}
String *token = token_example; // The token of the user
APIApi *apiInstance = [[APIApi alloc] init];
// Return the number of answers of the user
[apiInstance getAnswersWith:token
completionHandler: ^(inline_response_200_4 output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var QuizzMovie = require('quizz_movie');
var api = new QuizzMovie.APIApi()
var token = token_example; // {String} The token of the user
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAnswers(token, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getAnswersExample
{
public void main()
{
var apiInstance = new APIApi();
var token = token_example; // String | The token of the user
try
{
// Return the number of answers of the user
inline_response_200_4 result = apiInstance.getAnswers(token);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling APIApi.getAnswers: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\APIApi();
$token = token_example; // String | The token of the user
try {
$result = $api_instance->getAnswers($token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling APIApi->getAnswers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::APIApi;
my $api_instance = WWW::SwaggerClient::APIApi->new();
my $token = token_example; # String | The token of the user
eval {
my $result = $api_instance->getAnswers(token => $token);
print Dumper($result);
};
if ($@) {
warn "Exception when calling APIApi->getAnswers: $@\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.APIApi()
token = token_example # String | The token of the user
try:
# Return the number of answers of the user
api_response = api_instance.get_answers(token)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIApi->getAnswers: %s\n" % e)
Parameters
Query parameters
Name | Description |
---|---|
token* |
String
The token of the user
Required
|