pycharmers.sdk.trello module

A wrapper class for Trello API

class pycharmers.sdk.trello.Trello(apikey=None, token=None, verbose=True)[source]

Bases: pycharmers.sdk.base.PycharmersSDK

A wrapper class for Trello API

Visit https://trello.com/app-key to get an API key and Token. (NOTE: You have to login before visiting)

Parameters
  • api_key (str) – API-key.

  • token (str) – Token.

  • verbose (bool) – Whether to print logs or not.

api_call(url, apikey=None, token=None)[source]

Get information about the memberships users have to the board.

Parameters
  • url (str) – URL to which the API sends the request.

  • api_key (str) – API-key.

  • token (str) – Token.

static show_results(result, keynames=['name', 'id'])[source]

Static Method for displaying result beautifullly.

Parameters
  • result (list) – Result.

  • keynames (list) – The keyname to extract and display the value from the result

Examples

>>> from pycharmers.sdk import Trello
>>> Trello.show_results(result=[
...     {"api": "slack",  "foo": 1, "bar": ["get"]},
...     {"api": "github", "foo": 2, "bar": ["post"]}
>>> ], keynames=["api", "b"])
+--------+------+
|  api   |  b   |
+========+======+
|  slack | None |
+--------+------+
| github | None |
+--------+------+
setup_show_func()[source]

Set up the show_XXX funciton.

get_memberships_of_a_board(username=None, apikey=None, token=None)[source]

API wrapper for Get Memberships of a Board

get_lists_on_a_board(board_id, apikey=None, token=None)[source]

API wrapper for Get Lists on a Board

get_cards_on_a_board(board_id, apikey=None, token=None)[source]

API wrapper for Get Cards on a Board

get_cards_in_a_list(board_id, apikey=None, token=None)[source]

API wrapper for Get Cards in a List