API help

First create an account, and get the API key in your user page.

Then you need to make a POST request to the appropriate url, with the necessary arguments.

Return codes

todolist-web-api.herokuapp.com/v1/list/info

Return information about the account.

argument description
api_key To identify the user.
returns = {
    'username': str,
    'post_count': int,
    'text_max_length': int
}
top

todolist-web-api.herokuapp.com/v1/list/add

Add a single post to the list.

argument description
api_key To identify the user.
text The text string of a single post.
returns = {
    'id': int,
    'text': str,
    'last_updated': str
}
top

todolist-web-api.herokuapp.com/v1/list/add_multiple

Add multiple new posts.

argument description
api_key To identify the user.
text[] A list of strings, of the posts to be added.
returns = {
    'post[]': [
        {
            'id': int,
            'text': str,
            'last_updated': str
        },
        # (...)
    ]
}
top

todolist-web-api.herokuapp.com/v1/list/get

Get a post from an user.

argument description
api_key To identify the user.
id The post identifier.
returns = {
    'id': int,
    'text': str,
    'last_updated': str
}
top

todolist-web-api.herokuapp.com/v1/list/get_multiple

Get several posts from an user.

argument description
api_key To identify the user.
id[] A list of the post ids to retrieve.
returns = {
    'post[]': [
        {
            'id': int,
            'text': str,
            'last_updated': str
        },
        # (...)
    ]
}
top

todolist-web-api.herokuapp.com/v1/list/get_all

Get all the posts from the user.

argument description
api_key To identify the user.
returns = {
    'post[]': [
        {
            'id': int,
            'text': str,
            'last_updated': str
        },
        # (...)
    ]
}
top

todolist-web-api.herokuapp.com/v1/list/update

Update a post's text.

argument description
api_key To identify the user.
id The post identifier.
text The new content to be replaced.
returns = {
    'id': int,
    'text': str,
    'last_updated': str
}
top

todolist-web-api.herokuapp.com/v1/list/update_multiple

Update several posts.

argument description
api_key To identify the user.
id[] A list with the posts identifiers.
text[] A list with the new text for each post. The text must have the same position as in the id list.
returns = {
    'post[]': [
        {
            'id': int,
            'text': str,
            'last_updated': str
        },
        # (...)
    ]
}
top

todolist-web-api.herokuapp.com/v1/list/delete

Delete a post.

argument description
api_key To identify the user.
id The post identifier.
top

todolist-web-api.herokuapp.com/v1/list/delete_multiple

Delete multiple posts.

argument description
api_key To identify the user.
id[] A list with the posts identifiers.
top

todolist-web-api.herokuapp.com/v1/list/delete_all

Remove all the posts of a user.

argument description
api_key To identify the user.
top