Board Thread:The Quarters - Q & A/@comment-213.186.50.98-20141015143110/@comment-213.186.50.98-20141016103256

Get the list : check

Complete a task : check !

final step : add a task in the TODO.

I send a POST request to https://habitrpg.com/api/v2/user/tasks with the following contant :

{"notes": "", "value": 0, "challenge": {}, "tags": {}, "priority": 1, "dateCreated": "2014-10-16T11:14:32.667355", "type": "todo", "attribute": "int", "id": "8ef03c84-3268-48db-9f9a-8e495ba9cda9", "text": "test api"}

(I used the task schema I've retrieved as an exemple. )

The serveur returns the following object :

{'_id': '1a214761-1f9d-4850-8195-953c6cd78456', 'attribute': 'str', 'challenge': {}, 'dateCreated': '2014-10-16T09:14:31.712Z', 'down': True, 'history': [], 'id': '1a214761-1f9d-4850-8195-953c6cd78456', 'notes': '', 'priority': 1, 'text': '', 'type': 'habit', 'up': True, 'value': 0, '{"notes": "", "value": 0, "challenge": {}, "tags": {}, "priority": 1, "dateCreated": "2014-10-16T11:14:32.667355", "type": "todo", "attribute": "int", "id": "8ef03c84-3268-48db-9f9a-8e495ba9cda9", "text": "test api"}': ''}

an empty task containing my json in it instead of using it …

I think I've not understood what to send in my request.

If needed for comprehension, here is the code