List¶
Bases: List_
Source code in src/plankapy/interfaces.py
2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 |
|
board
property
¶
cards
property
¶
All cards in the list
Returns:
Type | Description |
---|---|
QueryableList[Card]
|
Queryable List of all cards in the list |
create_card(*args, **kwargs)
¶
create_card(card: Card) -> Card
create_card(name: str, position: int = 0, description: str = None, dueDate: datetime = None, isDueDateCompleted: bool = None, stopwatch: Stopwatch = None, boardId: int = None, listId: int = None, creatorUserId: int = None, coverAttachmentId: int = None, isSubscribed: bool = None) -> Card
Creates a card in the list
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the card (required) |
required |
position
|
int
|
Position of the card (default: 0) |
required |
description
|
str
|
Description of the card (optional) |
required |
dueDate
|
datetime
|
Due date of the card (optional) |
required |
isDueDateCompleted
|
bool
|
Whether the due date is completed (optional) |
required |
stopwatch
|
Stopwatch
|
Stopwatch of the card (optional) |
required |
boardId
|
int
|
Board id of the card (optional) |
required |
listId
|
int
|
List id of the card (optional) |
required |
creatorUserId
|
int
|
Creator user id of the card (optional) |
required |
coverAttachmentId
|
int
|
Cover attachment id of the card (optional) |
required |
isSubscribed
|
bool
|
Whether the card is subscribed (optional) |
required |
Alternate
Name | Type | Description | Default |
---|---|---|---|
card
|
Card
|
Card instance to create |
required |
Returns:
Name | Type | Description |
---|---|---|
Card |
Card
|
New card instance |
Source code in src/plankapy/interfaces.py
2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 |
|
delete()
¶
Deletes the list
Danger
This action is irreversible and cannot be undone
Returns:
Name | Type | Description |
---|---|---|
List |
List
|
Deleted list instance |
Source code in src/plankapy/interfaces.py
2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 |
|
refresh()
¶
Refreshes the list data
Source code in src/plankapy/interfaces.py
2537 2538 2539 2540 2541 |
|
sort_by_due_date()
¶
Sorts cards in the list by due date
Note
After sorting, a call to list.cards
will return a sorted list of cards
Source code in src/plankapy/interfaces.py
2451 2452 2453 2454 2455 2456 2457 |
|
sort_by_name()
¶
Sorts cards in the list by name
Note
After sorting, a call to list.cards
will return a sorted list of cards
Source code in src/plankapy/interfaces.py
2443 2444 2445 2446 2447 2448 2449 |
|
sort_by_newest()
¶
Sorts cards in the list by newest first
Note
After sorting, a call to list.cards
will return a sorted list of cards
Source code in src/plankapy/interfaces.py
2459 2460 2461 2462 2463 2464 2465 |
|
sort_by_oldest()
¶
Sorts cards in the list by oldest first
Note
After sorting, a call to list.cards
will return a sorted list of cards
Source code in src/plankapy/interfaces.py
2467 2468 2469 2470 2471 2472 2473 |
|
update(*args, **kwargs)
¶
update() -> List
update(list: List) -> List
update(name: str = None, position: int = None) -> List
Updates the list with new values
Tip
If you want to update a list, it's better to use the editor()
context manager
Example:
>>> with list_.editor():
... list_.name = 'New List Name'
... list_.position = 1
>>> list
List(id=1, name='New List Name', position=1, ...)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the list (optional) |
required |
position
|
int
|
Position of the list (optional) |
required |
Alternate
Name | Type | Description | Default |
---|---|---|---|
list
|
List
|
List instance to update (required) |
required |
Note
If no arguments are provided, the list will update itself with the current values stored in its attributes
Returns:
Name | Type | Description |
---|---|---|
List |
List
|
Updated list instance |
Source code in src/plankapy/interfaces.py
2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 |
|