Helpers¶
add_editors_to_board(board, users)
¶
Add users to a board with editing permissions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board
|
Board
|
Board to add users to |
required |
users
|
list[User]
|
Users to add |
required |
Returns:
Name | Type | Description |
---|---|---|
Board |
list[BoardMembership]
|
Board with users added |
Source code in src/plankapy/helpers.py
110 111 112 113 114 115 116 117 118 119 120 |
|
add_labels_to_card(card, labels)
¶
Add labels to a card
Parameters:
Name | Type | Description | Default |
---|---|---|---|
card
|
Card
|
Card to add labels to |
required |
labels
|
list[Label]
|
Labels to add |
required |
Returns:
Type | Description |
---|---|
list[CardLabel]
|
list[CardLabel]: CardLabel relationships created |
Source code in src/plankapy/helpers.py
146 147 148 149 150 151 152 153 154 155 156 |
|
add_members_to_card(card, members)
¶
Add members to a card
Parameters:
Name | Type | Description | Default |
---|---|---|---|
card
|
Card
|
Card to add members to |
required |
members
|
list[User]
|
Members to add |
required |
Returns:
Type | Description |
---|---|
list[CardMembership]
|
list[CardMembership]: CardMemberships created |
Source code in src/plankapy/helpers.py
158 159 160 161 162 163 164 165 166 167 168 |
|
add_viewers_to_board(board, users)
¶
Add users to a board with viewing permissions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board
|
Board
|
Board to add users to |
required |
users
|
list[User]
|
Users to add |
required |
Returns:
Type | Description |
---|---|
list[BoardMembership]
|
list[BoardMembership]: BoardMemberships created |
Source code in src/plankapy/helpers.py
122 123 124 125 126 127 128 129 130 131 132 |
|
by_action_type(action_list, type)
¶
Get actions by type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action_list
|
list[Action]
|
List of actions to search |
required |
type
|
ActionType
|
Type of the action |
required |
Returns:
Type | Description |
---|---|
list[Action]
|
list[Action]: Actions with the given type |
Source code in src/plankapy/helpers.py
96 97 98 99 100 101 102 103 104 105 106 |
|
by_board_name(board_list, name)
¶
Get boards by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board_list
|
list[Board]
|
List of boards to search |
required |
name
|
str
|
Name of the board |
required |
Returns:
Type | Description |
---|---|
list[Board]
|
list[Board]: Boards with the given name |
Source code in src/plankapy/helpers.py
48 49 50 51 52 53 54 55 56 57 58 |
|
by_card_name(card_list, name)
¶
Get cards by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
card_list
|
list[Card]
|
List of cards to search |
required |
name
|
str
|
Name of the card |
required |
Returns:
Type | Description |
---|---|
list[Card]
|
list[Card]: Cards with the given |
Source code in src/plankapy/helpers.py
72 73 74 75 76 77 78 79 80 81 82 |
|
by_label_name(label_list, name)
¶
Get labels by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label_list
|
list[Label]
|
List of labels to search |
required |
name
|
str
|
Name of the label |
required |
Returns:
Type | Description |
---|---|
list[Label]
|
list[Label]: Labels with the given name |
Source code in src/plankapy/helpers.py
84 85 86 87 88 89 90 91 92 93 94 |
|
by_list_name(list_list, name)
¶
Get lists by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
list_list
|
list[List]
|
List of lists to search |
required |
name
|
str
|
Name of the list |
required |
Returns:
Type | Description |
---|---|
list[List]
|
list[List]: Lists with the given name |
Source code in src/plankapy/helpers.py
60 61 62 63 64 65 66 67 68 69 70 |
|
by_project_name(project_list, name)
¶
Get projects by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_list
|
list[Project]
|
List of projects to search |
required |
name
|
str
|
Name of the project |
required |
Returns:
Type | Description |
---|---|
list[Project]
|
list[Project]: Projects with the given name |
Source code in src/plankapy/helpers.py
36 37 38 39 40 41 42 43 44 45 46 |
|
by_username(user_list, name)
¶
Get users by username
Parameters:
Name | Type | Description | Default |
---|---|---|---|
user_list
|
list[User]
|
List of users to search |
required |
name
|
str
|
Username of the user |
required |
Returns:
Type | Description |
---|---|
list[User]
|
list[User]: Users with the given username |
Source code in src/plankapy/helpers.py
24 25 26 27 28 29 30 31 32 33 34 |
|
create_board_labels(board, labels)
¶
Create labels on a board
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board
|
Board
|
Board to create labels on |
required |
labels
|
list[Label]
|
Labels to create |
required |
Returns:
Type | Description |
---|---|
list[Label]
|
list[Label]: The labels that were created |
Source code in src/plankapy/helpers.py
134 135 136 137 138 139 140 141 142 143 144 |
|
delete_actions(actions)
¶
Delete a list of actions
Parameters:
Name | Type | Description | Default |
---|---|---|---|
actions
|
list[Action]
|
Actions to delete |
required |
Returns:
Type | Description |
---|---|
list[Action]
|
list[Action]: Actions that were deleted |
Source code in src/plankapy/helpers.py
239 240 241 242 243 244 245 246 247 248 |
|
delete_boards(boards)
¶
Delete a list of boards
Parameters:
Name | Type | Description | Default |
---|---|---|---|
boards
|
list[Board]
|
Boards to delete |
required |
Returns:
Type | Description |
---|---|
list[Board]
|
list[Board]: Boards that were deleted |
Source code in src/plankapy/helpers.py
184 185 186 187 188 189 190 191 192 193 |
|
delete_cards(cards)
¶
Delete a list of cards
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cards
|
list[Card]
|
Cards to delete |
required |
Returns:
Type | Description |
---|---|
list[Card]
|
list[Card]: Cards that were deleted |
Source code in src/plankapy/helpers.py
206 207 208 209 210 211 212 213 214 215 |
|
delete_labels(labels)
¶
Delete a list of labels
Parameters:
Name | Type | Description | Default |
---|---|---|---|
labels
|
list[Label]
|
Labels to delete |
required |
Returns:
Type | Description |
---|---|
list[Label]
|
list[Label]: Labels that were deleted |
Source code in src/plankapy/helpers.py
217 218 219 220 221 222 223 224 225 226 |
|
delete_lists(lists)
¶
Delete a list of lists
Parameters:
Name | Type | Description | Default |
---|---|---|---|
lists
|
list[List]
|
Lists to delete |
required |
Returns:
Type | Description |
---|---|
list[List]
|
list[List]: Lists that were deleted |
Source code in src/plankapy/helpers.py
195 196 197 198 199 200 201 202 203 204 |
|
delete_projects(projects)
¶
Delete a list of projects
Parameters:
Name | Type | Description | Default |
---|---|---|---|
projects
|
list[Project]
|
Projects to delete |
required |
Returns:
Type | Description |
---|---|
list[Project]
|
list[Project]: Projects that were deleted |
Source code in src/plankapy/helpers.py
173 174 175 176 177 178 179 180 181 182 |
|
delete_users(users)
¶
Delete a list of users
Parameters:
Name | Type | Description | Default |
---|---|---|---|
users
|
list[User]
|
Users to delete |
required |
Returns:
Type | Description |
---|---|
list[User]
|
list[User]: Users that were deleted |
Source code in src/plankapy/helpers.py
228 229 230 231 232 233 234 235 236 237 |
|
get_boards_by_name(project, name)
¶
Get all boards in a project by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project
|
Project
|
Project to search |
required |
name
|
str
|
Name of the board |
required |
Returns:
Type | Description |
---|---|
list[Board]
|
list[Board]: Boards in the project with the given name |
Source code in src/plankapy/helpers.py
277 278 279 280 281 282 283 284 285 286 287 |
|
get_cards_by_name(org_unit, name)
¶
Get a card by name from a list or board
Parameters:
Name | Type | Description | Default |
---|---|---|---|
org_unit
|
List | Board
|
List or Board to search |
required |
name
|
str
|
Name of the card |
required |
Returns:
Type | Description |
---|---|
list[Card]
|
list[Card]: Cards in the list or board with the given name |
Source code in src/plankapy/helpers.py
301 302 303 304 305 306 307 308 309 310 311 |
|
get_labels_by_name(org_unit, name)
¶
Get a label by name from a board or card
Parameters:
Name | Type | Description | Default |
---|---|---|---|
org_unit
|
Board | Card
|
Board or Card to search |
required |
name
|
str
|
Name of the label |
required |
Returns:
Type | Description |
---|---|
list[Label]
|
list[Label]: Labels in the board or card with the given name |
Source code in src/plankapy/helpers.py
313 314 315 316 317 318 319 320 321 322 323 |
|
get_lists_by_name(board, name)
¶
Get all lists in a board by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
board
|
Board
|
Board to search |
required |
name
|
str
|
Name of the list |
required |
Returns:
Type | Description |
---|---|
list[List]
|
list[List]: Lists in the board with the given name |
Source code in src/plankapy/helpers.py
289 290 291 292 293 294 295 296 297 298 299 |
|
get_projects_by_name(planka, name)
¶
Get all projects with the given name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
planka
|
Planka
|
Planka instance |
required |
name
|
str
|
Name of the project |
required |
Returns:
Type | Description |
---|---|
list[Project]
|
list[Project]: List of projects with the given name |
Source code in src/plankapy/helpers.py
265 266 267 268 269 270 271 272 273 274 275 |
|
get_users_by_username(org_unit, username)
¶
Get a user by username from a Planka Instance, Project, or Board
Parameters:
Name | Type | Description | Default |
---|---|---|---|
org_unit
|
Planka | Project | Board
|
Planka instance, Project, or Board to search |
required |
username
|
str
|
Username of the user |
required |
Returns:
Type | Description |
---|---|
list[User]
|
list[User]: Users in the org_unit with the given username |
Source code in src/plankapy/helpers.py
325 326 327 328 329 330 331 332 333 334 335 |
|
remove_labels_from_card(card, labels)
¶
Remove labels from a card
Parameters:
Name | Type | Description | Default |
---|---|---|---|
card
|
Card
|
Card to remove labels from |
required |
labels
|
list[Label]
|
Labels to remove |
required |
Returns:
Type | Description |
---|---|
list[Label]
|
list[Label]: Labels that were removed |
Source code in src/plankapy/helpers.py
252 253 254 255 256 257 258 259 260 261 262 |
|