curl -H "MicroworkersApiKey:YOUR_API_KEY" -X GET "https://ttv.microworkers.com/api/campaign/get_task_info/B/12345/format/json"
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('GET','/campaign/get_task_info/B/12345/format/json', {}, {})
pprint(res)
use MW_API;
use Data::Dumper qw(Dumper);
my $mw_api = MW_API->new('api_key' => 'YOUR_API_KEY');
my $res = $mw_api->do_request('GET', '/campaign/get_task_info/B/12345/format/json');
print Dumper($res);
<?php
include "includes/RESTClient.php";
define("cAPI_KEY", "YOUR_API_KEY");
define("cAPI_URL", "https://ttv.microworkers.com/api");
$client = new RESTClient();
$client->setApiKey(cAPI_KEY);
$client->setUrl(cAPI_URL . "/campaign/get_task_info/B/12345/format/json");
$client->setMethod("GET");
$client->execute();
$response = $client->getLastResponse();
$client->resetClient();
echo $response;
?>
using System;
using MWAPI;
using System.Collections.Specialized;
public class Test{
public static void Main (string[] args){
MW_API MW_API_Client = new MW_API ("YOUR_API_KEY");
NameValueCollection postData = new NameValueCollection();
string body = MW_API_Client.getRequest("/campaign/get_task_info/B/12345/format/json");
Console.WriteLine (body);
}
}
{ "status": "SUCCESS", "response": { "task_id": 2884015, "task_details": { "campaign_id": "493daad49cfc", "worker_id": "de917335", "ip": "95.85.20.130", "finished_datetime": "Saturday, 27-Feb-16 00:57:03 EST", "employer_comment": "", "task_rating": "OK", "worker_earned": "0.05000", "bonus_worker_earned": "0.00000", "started_datetime": "Saturday, 27-Feb-16 00:56:55 EST", "is_testcase_passed": true, "answers": [ { "sub_task_id": "493daad49cfc_HG_56d13a0e2dde61_13035131", "answer": [ { "question_id": "Q56d139d57cd6b", "question_name": "name", "answer": "aa" }, { "question_id": "Q56d139d57cdde", "question_name": "Age", "answer": "21-40" }, { "question_id": "Q56d139d57ce30", "question_name": "description", "answer": "test" }, { "question_id": "Q56d139d57ce73", "question_name": "gender", "answer": "male" }, { "question_id": "Q56d139d57cef6", "question_name": "human", "answer": "yes" } ], "variable": [ ] } ] } } }
{ "status": "ERROR", "message": "TTVAPI-E0004:API-E0000:NO SUCH TASK" }