def get_categories(limit=<NUM_LIT:20>, offset=<NUM_LIT:0>, last_id=None):
if last_id is not None:<EOL><INDENT>params = dict(limit=limit, last_id=last_id)<EOL><DEDENT>else:<EOL><INDENT>params = dict(limit=limit, offset=offset)<EOL>print(OFFSET_WARNING)<EOL><DEDENT>try:<EOL><INDENT>res = _pybossa_req('<STR_LIT>', '<STR_LIT>',<EOL>params=params)<EOL>if type(res).__name__ == '<STR_LIT:list>':<EOL><INDENT>return [Category(category) for category in res]<EOL><DEDENT>else:<EOL><INDENT>raise TypeError<EOL><DEDENT><DEDENT>except:<EOL><INDENT>raise<EOL><DEDENT>
Return a list of registered categories.

    :param limit: Number of returned items, default 20
    :type limit: integer
    :param offset: Offset for the query, default 0
    :type offset: integer
    :param last_id: id of the last category, used for pagination. If provided, offset is ignored
    :type last_id: integer
    :rtype: list
    :returns: A list of PYBOSSA Categories