|
23 | 23 | * :meth:`Chart.from_monday() <highcharts_gantt.chart.Chart.from_monday>`
|
24 | 24 | * :meth:`GanttData.from_monday() <highcharts_gantt.options.series.data.GanttData.from_monday>`
|
25 | 25 |
|
26 |
| - .. method:: load_from_monday(cls, board_id, api_token = None, template = None, property_column_map = None, connection_kwargs = None, connection_callback = None) |
| 26 | + .. method:: load_from_monday(self, board_id, api_token = None, template = None, property_column_map = None, connection_kwargs = None, connection_callback = None) |
| 27 | + :noindex: |
27 | 28 |
|
28 |
| - Update the :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` instance |
29 |
| - with data from a `Monday.com <https://www.monday.com>`__ work board. |
30 |
| - |
31 |
| - :param board_id: The ID of the Monday.com board whose items should be retrieved |
32 |
| - to populate the Gantt series. |
33 |
| - |
34 |
| - .. tip:: |
35 |
| - |
36 |
| - You can find your Asana Project GID in your browser URL bar: |
37 |
| - |
38 |
| - .. figure:: /_static/monday-board-id.png |
39 |
| - :align: center |
40 |
| - :alt: Monday.com Board ID |
| 29 | + Update the :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` instance |
| 30 | + with data from a `Monday.com <https://www.monday.com>`__ work board. |
| 31 | + |
| 32 | + :param board_id: The ID of the Monday.com board whose items should be retrieved |
| 33 | + to populate the Gantt series. |
| 34 | + |
| 35 | + .. tip:: |
| 36 | + |
| 37 | + You can find your Asana Project GID in your browser URL bar: |
| 38 | + |
| 39 | + .. figure:: /_static/monday-board-id.png |
| 40 | + :align: center |
| 41 | + :alt: Monday.com Board ID |
41 | 42 |
|
42 |
| - :type board_id: :class:`int <python:int>` |
43 |
| - |
44 |
| - :param api_token: The Monday.com API token to use when authenticating your |
45 |
| - request against the Monday.com API. Defaults to :obj:`None <python:None>`, |
46 |
| - which will then try to determine the token from the ``MONDAY_API_TOKEN`` |
47 |
| - environment variable. |
48 |
| - |
49 |
| - .. warning:: |
50 |
| - |
51 |
| - If no token is either passed to the method *or* found in the |
52 |
| - ``MONDAY_API_TOKEN`` environment variable, calling this method will raise |
53 |
| - an error. |
54 |
| - |
55 |
| - :type api_token: :class:`str <python:str>` or :obj:`None <python:None>` |
56 |
| - |
57 |
| - :param template: The name of a standard Mpnday.com board template supported by |
58 |
| - **Highcharts for Python**. If supplied, will override the |
59 |
| - ``property_column_map`` argument. Defaults to :obj:`None <python:None>`. |
60 |
| - |
61 |
| - .. note:: |
62 |
| - |
63 |
| - If ``property_column_map`` is set, the ``template`` argument will be |
64 |
| - *ignored* and overridden by ``property_column_map``. |
| 43 | + :type board_id: :class:`int <python:int>` |
| 44 | + |
| 45 | + :param api_token: The Monday.com API token to use when authenticating your |
| 46 | + request against the Monday.com API. Defaults to :obj:`None <python:None>`, |
| 47 | + which will then try to determine the token from the ``MONDAY_API_TOKEN`` |
| 48 | + environment variable. |
| 49 | + |
| 50 | + .. warning:: |
| 51 | + |
| 52 | + If no token is either passed to the method *or* found in the |
| 53 | + ``MONDAY_API_TOKEN`` environment variable, calling this method will raise |
| 54 | + an error. |
| 55 | + |
| 56 | + :type api_token: :class:`str <python:str>` or :obj:`None <python:None>` |
| 57 | + |
| 58 | + :param template: The name of a standard Mpnday.com board template supported by |
| 59 | + **Highcharts for Python**. If supplied, will override the |
| 60 | + ``property_column_map`` argument. Defaults to :obj:`None <python:None>`. |
| 61 | + |
| 62 | + .. note:: |
| 63 | + |
| 64 | + If ``property_column_map`` is set, the ``template`` argument will be |
| 65 | + *ignored* and overridden by ``property_column_map``. |
65 | 66 |
|
66 |
| - :type template: :class:`str <python:str>` or :obj:`None <python:None>` |
67 |
| - |
68 |
| - :param property_column_map: A :class:`dict <python:dict>` used to map Monday.com |
69 |
| - columns to their corresponding |
70 |
| - :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` |
71 |
| - properties. Keys are expected to be |
72 |
| - :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` |
73 |
| - properties, while values are expected to be Monday.com column field names. |
74 |
| - Defaults to :obj:`None <python:None>`. |
75 |
| - |
76 |
| - .. note:: |
77 |
| - |
78 |
| - If ``property_column_map`` is supplied, its settings *override* the |
79 |
| - ``template`` setting. |
80 |
| - |
81 |
| - :type property_column_map: :class:`dict <python:dict>` or |
82 |
| - :obj:`None <python:None>` |
83 |
| - |
84 |
| - :param connection_kwargs: Set of keyword arugments to supply to the |
85 |
| - :class:`DataConnection <highcharts_gantt.options.series.data.connect.DataConnection>` |
86 |
| - constructor, besides the :meth:`.to <highcharts_gantt.options.series.data.connect.DataConnection.to>` |
87 |
| - property which is derived from the task. Defaults |
88 |
| - to :obj:`None <python:None>` |
89 |
| - :type connection_kwargs: :class:`dict <python:dict>` or |
90 |
| - :obj:`None <python:None>` |
91 |
| - |
92 |
| - :param connection_callback: A custom Python function or method which accepts two |
93 |
| - keyword arguments: ``connection_target`` (which expects the dependency |
94 |
| - :class:`dict <python:dict>` object from the Asana task), and ``asana_task`` |
95 |
| - (which expects the Asana task :class:`dict <pythoN:dict>` object). The |
96 |
| - function should return a |
97 |
| - :class:`DataConnection <highcharts_gantt.options.series.data.connect.DataConnection>` instance. Defaults to |
98 |
| - :obj:`None <python:None>` |
99 |
| - |
100 |
| - .. tip:: |
101 |
| - |
102 |
| - The ``connection_callback`` argument is useful if you want to customize the |
103 |
| - connection styling based on properties included in the Asana task. |
104 |
| - |
105 |
| - :type connection_callback: Callable or :obj:`None <python:None>` |
106 |
| - |
107 |
| - :raises HighchartsDependencyError: if the |
108 |
| - `monday <https://pypi.org/project/monday/>`__ Python library is not available |
109 |
| - in the runtime environment |
110 |
| - :raises MondayAuthenticationError: if there is no Monday.com API token supplied |
111 |
| - :raises HighchartsValueError: if both ``template`` and ``property_column_map`` |
112 |
| - are empty |
113 |
| - |
| 67 | + :type template: :class:`str <python:str>` or :obj:`None <python:None>` |
| 68 | + |
| 69 | + :param property_column_map: A :class:`dict <python:dict>` used to map Monday.com |
| 70 | + columns to their corresponding |
| 71 | + :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` |
| 72 | + properties. Keys are expected to be |
| 73 | + :class:`GanttSeries <highcharts_gantt.options.series.gantt.GanttSeries>` |
| 74 | + properties, while values are expected to be Monday.com column field names. |
| 75 | + Defaults to :obj:`None <python:None>`. |
| 76 | + |
| 77 | + .. note:: |
| 78 | + |
| 79 | + If ``property_column_map`` is supplied, its settings *override* the |
| 80 | + ``template`` setting. |
| 81 | + |
| 82 | + :type property_column_map: :class:`dict <python:dict>` or |
| 83 | + :obj:`None <python:None>` |
| 84 | + |
| 85 | + :param connection_kwargs: Set of keyword arugments to supply to the |
| 86 | + :class:`DataConnection <highcharts_gantt.options.series.data.connect.DataConnection>` |
| 87 | + constructor, besides the :meth:`.to <highcharts_gantt.options.series.data.connect.DataConnection.to>` |
| 88 | + property which is derived from the task. Defaults |
| 89 | + to :obj:`None <python:None>` |
| 90 | + :type connection_kwargs: :class:`dict <python:dict>` or |
| 91 | + :obj:`None <python:None>` |
| 92 | + |
| 93 | + :param connection_callback: A custom Python function or method which accepts two |
| 94 | + keyword arguments: ``connection_target`` (which expects the dependency |
| 95 | + :class:`dict <python:dict>` object from the Asana task), and ``asana_task`` |
| 96 | + (which expects the Asana task :class:`dict <pythoN:dict>` object). The |
| 97 | + function should return a |
| 98 | + :class:`DataConnection <highcharts_gantt.options.series.data.connect.DataConnection>` instance. Defaults to |
| 99 | + :obj:`None <python:None>` |
| 100 | + |
| 101 | + .. tip:: |
| 102 | + |
| 103 | + The ``connection_callback`` argument is useful if you want to customize the |
| 104 | + connection styling based on properties included in the Asana task. |
| 105 | + |
| 106 | + :type connection_callback: Callable or :obj:`None <python:None>` |
| 107 | + |
| 108 | + :raises HighchartsDependencyError: if the |
| 109 | + `monday <https://pypi.org/project/monday/>`__ Python library is not available |
| 110 | + in the runtime environment |
| 111 | + :raises MondayAuthenticationError: if there is no Monday.com API token supplied |
| 112 | + :raises HighchartsValueError: if both ``template`` and ``property_column_map`` |
| 113 | + are empty |
| 114 | + |
0 commit comments