API Reference¶
Core Modules¶
API Client¶
NHL API client wrapper with caching and convenience methods.
NHLClient
¶
Client for NHL API with caching and convenience methods.
Source code in src/faceoff/api/client.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | |
aclose()
async
¶
Close the HTTP client.
Source code in src/faceoff/api/client.py
128 129 130 | |
clear_cache()
¶
Clear the response cache.
Source code in src/faceoff/api/client.py
124 125 126 | |
get_game_boxscore(game_id)
async
¶
Get box score for a specific game.
Source code in src/faceoff/api/client.py
59 60 61 | |
get_game_landing(game_id)
async
¶
Get landing page data for a specific game (summary info).
Source code in src/faceoff/api/client.py
67 68 69 | |
get_game_play_by_play(game_id)
async
¶
Get play-by-play data for a specific game.
Source code in src/faceoff/api/client.py
63 64 65 | |
get_game_right_rail(game_id)
async
¶
Get right-rail data for a specific game (team-level game stats).
Source code in src/faceoff/api/client.py
71 72 73 | |
get_goalie_stats_leaders()
async
¶
Get current goalie stats leaders.
Source code in src/faceoff/api/client.py
85 86 87 | |
get_player_game_log(player_id)
async
¶
Get game log for a player in current season.
Source code in src/faceoff/api/client.py
120 121 122 | |
get_player_landing(player_id)
async
¶
Get landing page data for a player.
Source code in src/faceoff/api/client.py
116 117 118 | |
get_schedule(date=None)
async
¶
Get schedule for a specific date or today.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str | None
|
Date in YYYY-MM-DD format, or None for today |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Schedule data including games for the week |
Source code in src/faceoff/api/client.py
42 43 44 45 46 47 48 49 50 51 52 53 | |
get_scoreboard()
async
¶
Get current scoreboard with live game data.
Source code in src/faceoff/api/client.py
55 56 57 | |
get_skater_stats_leaders()
async
¶
Get current skater stats leaders.
Source code in src/faceoff/api/client.py
81 82 83 | |
get_standings(date=None)
async
¶
Get standings for a specific date or current.
Source code in src/faceoff/api/client.py
75 76 77 78 79 | |
get_team_month_schedule(team_abbrev, month=None)
async
¶
Get month schedule for a team (includes past games).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team_abbrev
|
str
|
Team abbreviation (e.g., 'TOR') |
required |
month
|
str | None
|
Month in YYYY-MM format, or None for current month |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Schedule data for the month including past and future games |
Source code in src/faceoff/api/client.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
get_team_roster(team_abbrev)
async
¶
Get current roster for a team.
Source code in src/faceoff/api/client.py
89 90 91 | |
get_team_schedule(team_abbrev)
async
¶
Get current week schedule for a team.
Source code in src/faceoff/api/client.py
93 94 95 | |
get_team_stats(team_abbrev)
async
¶
Get current stats for a team's players.
Source code in src/faceoff/api/client.py
112 113 114 | |
Screens¶
Schedule screen for browsing games.
ScheduleScreen
¶
Bases: Screen
Screen for viewing the game schedule.
Source code in src/faceoff/screens/schedule.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
action_focus_card_above()
¶
Focus the game card above (previous row, same column).
Source code in src/faceoff/screens/schedule.py
352 353 354 355 356 357 358 359 360 | |
action_focus_card_below()
¶
Focus the game card below (next row, same column).
Source code in src/faceoff/screens/schedule.py
362 363 364 365 366 367 368 369 370 371 | |
action_focus_next_card()
¶
Focus the next game card.
Source code in src/faceoff/screens/schedule.py
345 346 347 348 349 350 | |
action_focus_prev_card()
¶
Focus the previous game card.
Source code in src/faceoff/screens/schedule.py
337 338 339 340 341 342 343 | |
action_next_day()
¶
Go to next day.
Source code in src/faceoff/screens/schedule.py
280 281 282 283 284 | |
action_prev_day()
¶
Go to previous day.
Source code in src/faceoff/screens/schedule.py
274 275 276 277 278 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/schedule.py
319 320 321 | |
action_refresh()
¶
Manually refresh games.
Source code in src/faceoff/screens/schedule.py
293 294 295 296 297 298 299 | |
action_standings()
¶
Show standings screen.
Source code in src/faceoff/screens/schedule.py
301 302 303 304 305 | |
action_stats()
¶
Show stats screen.
Source code in src/faceoff/screens/schedule.py
307 308 309 310 311 | |
action_teams()
¶
Show teams screen.
Source code in src/faceoff/screens/schedule.py
313 314 315 316 317 | |
action_today()
¶
Go to today.
Source code in src/faceoff/screens/schedule.py
286 287 288 289 290 291 | |
load_games()
¶
Load games for the current date.
Source code in src/faceoff/screens/schedule.py
151 152 153 | |
on_game_card_selected(event)
¶
Handle game card selection.
Source code in src/faceoff/screens/schedule.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | |
on_mount()
¶
Load games when the screen is mounted.
Source code in src/faceoff/screens/schedule.py
121 122 123 124 125 126 127 128 | |
on_resize(event)
¶
Handle terminal resize to reflow game cards.
Source code in src/faceoff/screens/schedule.py
214 215 216 217 218 219 220 221 222 223 224 225 226 | |
on_unmount()
¶
Clean up when screen is unmounted.
Source code in src/faceoff/screens/schedule.py
130 131 132 133 134 135 | |
get_nhl_today()
¶
Get the current date in NHL timezone (Eastern Time).
Source code in src/faceoff/screens/schedule.py
24 25 26 | |
Game screen for viewing a single game's details.
GameScreen
¶
Bases: Screen
Screen for viewing a single game's details.
Source code in src/faceoff/screens/game.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | |
action_back()
¶
Go back to schedule.
Source code in src/faceoff/screens/game.py
795 796 797 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/game.py
807 808 809 | |
action_refresh()
¶
Manually refresh game data.
Source code in src/faceoff/screens/game.py
799 800 801 802 803 804 805 | |
load_game_data()
¶
Load detailed game data.
Source code in src/faceoff/screens/game.py
302 303 304 | |
on_mount()
¶
Load game data when screen is mounted.
Source code in src/faceoff/screens/game.py
269 270 271 272 273 274 275 276 277 278 279 280 | |
on_resize(event)
¶
Handle resize to adjust layout.
Source code in src/faceoff/screens/game.py
289 290 291 292 293 294 295 296 297 298 299 300 | |
on_unmount()
¶
Clean up when screen is unmounted.
Source code in src/faceoff/screens/game.py
282 283 284 285 286 287 | |
Pre-game screen for viewing game matchup preview.
PreGameScreen
¶
Bases: Screen
Screen for viewing pre-game matchup information.
Source code in src/faceoff/screens/pregame.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
action_back()
¶
Go back to schedule.
Source code in src/faceoff/screens/pregame.py
362 363 364 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/pregame.py
372 373 374 | |
action_refresh()
¶
Manually refresh matchup data.
Source code in src/faceoff/screens/pregame.py
366 367 368 369 370 | |
load_matchup_data()
¶
Load matchup data from API.
Source code in src/faceoff/screens/pregame.py
184 185 186 | |
on_mount()
¶
Load matchup data when screen is mounted.
Source code in src/faceoff/screens/pregame.py
180 181 182 | |
Standings screen for viewing league standings.
StandingsScreen
¶
Bases: Screen
Screen for viewing NHL standings.
Source code in src/faceoff/screens/standings.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | |
action_back()
¶
Go back to schedule.
Source code in src/faceoff/screens/standings.py
485 486 487 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/standings.py
495 496 497 | |
action_refresh()
¶
Manually refresh standings.
Source code in src/faceoff/screens/standings.py
489 490 491 492 493 | |
action_scroll_down()
¶
Scroll the active standings container down.
Source code in src/faceoff/screens/standings.py
479 480 481 482 483 | |
action_scroll_up()
¶
Scroll the active standings container up.
Source code in src/faceoff/screens/standings.py
473 474 475 476 477 | |
load_standings()
¶
Load standings from API.
Source code in src/faceoff/screens/standings.py
205 206 207 | |
on_mount()
¶
Load standings when screen is mounted.
Source code in src/faceoff/screens/standings.py
201 202 203 | |
on_resize(event)
¶
Handle terminal resize to reflow layout.
Source code in src/faceoff/screens/standings.py
461 462 463 464 465 466 467 468 469 470 471 | |
Stats screen for viewing player statistics.
StatsScreen
¶
Bases: Screen
Screen for viewing player stats leaders.
Source code in src/faceoff/screens/stats.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | |
action_back()
¶
Go back to schedule.
Source code in src/faceoff/screens/stats.py
290 291 292 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/stats.py
300 301 302 | |
action_refresh()
¶
Manually refresh stats.
Source code in src/faceoff/screens/stats.py
294 295 296 297 298 | |
action_scroll_down()
¶
Scroll the active container down.
Source code in src/faceoff/screens/stats.py
323 324 325 326 327 | |
action_scroll_up()
¶
Scroll the active container up.
Source code in src/faceoff/screens/stats.py
317 318 319 320 321 | |
load_stats()
¶
Load stats from API.
Source code in src/faceoff/screens/stats.py
152 153 154 | |
on_mount()
¶
Load stats when screen is mounted.
Source code in src/faceoff/screens/stats.py
148 149 150 | |
Teams screen for browsing teams and viewing team details.
PlayerRow
¶
Bases: Widget
A clickable row for a player.
Source code in src/faceoff/screens/teams.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
Selected
¶
Bases: Message
Message sent when a player is selected.
Source code in src/faceoff/screens/teams.py
110 111 112 113 114 115 116 | |
TeamCard
¶
Bases: Widget
A card widget for selecting a team.
Source code in src/faceoff/screens/teams.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
Selected
¶
Bases: Message
Message sent when a team is selected.
Source code in src/faceoff/screens/teams.py
49 50 51 52 53 54 55 | |
TeamDetailScreen
¶
Bases: Screen
Screen for viewing team details.
Source code in src/faceoff/screens/teams.py
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 | |
action_back()
¶
Go back.
Source code in src/faceoff/screens/teams.py
582 583 584 | |
action_focus_next_player()
¶
Focus the next player row.
Source code in src/faceoff/screens/teams.py
620 621 622 623 624 625 626 627 628 | |
action_focus_prev_player()
¶
Focus the previous player row.
Source code in src/faceoff/screens/teams.py
611 612 613 614 615 616 617 618 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/teams.py
592 593 594 | |
action_refresh()
¶
Manually refresh team data.
Source code in src/faceoff/screens/teams.py
586 587 588 589 590 | |
load_team_data()
¶
Load team data from API.
Source code in src/faceoff/screens/teams.py
475 476 477 | |
on_mount()
¶
Load team data when screen is mounted.
Source code in src/faceoff/screens/teams.py
471 472 473 | |
on_player_row_selected(event)
¶
Handle player selection.
Source code in src/faceoff/screens/teams.py
576 577 578 579 580 | |
TeamsScreen
¶
Bases: Screen
Screen for browsing NHL teams.
Source code in src/faceoff/screens/teams.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | |
action_back()
¶
Go back to schedule.
Source code in src/faceoff/screens/teams.py
303 304 305 | |
action_focus_card_above()
¶
Focus the team card above (previous row, same column).
Source code in src/faceoff/screens/teams.py
350 351 352 353 354 355 356 357 358 359 | |
action_focus_card_below()
¶
Focus the team card below (next row, same column).
Source code in src/faceoff/screens/teams.py
361 362 363 364 365 366 367 368 369 370 371 | |
action_focus_next_card()
¶
Focus the next team card.
Source code in src/faceoff/screens/teams.py
340 341 342 343 344 345 346 347 348 | |
action_focus_prev_card()
¶
Focus the previous team card.
Source code in src/faceoff/screens/teams.py
331 332 333 334 335 336 337 338 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/teams.py
313 314 315 | |
action_refresh()
¶
Manually refresh teams.
Source code in src/faceoff/screens/teams.py
307 308 309 310 311 | |
load_teams()
¶
Load teams from API.
Source code in src/faceoff/screens/teams.py
225 226 227 | |
on_mount()
¶
Load teams when screen is mounted.
Source code in src/faceoff/screens/teams.py
221 222 223 | |
on_resize(event)
¶
Handle terminal resize to reflow team cards.
Source code in src/faceoff/screens/teams.py
286 287 288 289 290 291 292 293 294 295 296 297 | |
on_team_card_selected(event)
¶
Handle team selection.
Source code in src/faceoff/screens/teams.py
299 300 301 | |
Player screen for viewing player details and stats.
PlayerScreen
¶
Bases: Screen
Screen for viewing player details.
Source code in src/faceoff/screens/player.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
action_back()
¶
Go back.
Source code in src/faceoff/screens/player.py
311 312 313 | |
action_quit()
¶
Quit the application.
Source code in src/faceoff/screens/player.py
321 322 323 | |
action_refresh()
¶
Manually refresh player data.
Source code in src/faceoff/screens/player.py
315 316 317 318 319 | |
load_player_data()
¶
Load player data from API.
Source code in src/faceoff/screens/player.py
139 140 141 | |
on_mount()
¶
Load player data when screen is mounted.
Source code in src/faceoff/screens/player.py
135 136 137 | |
Widgets¶
Game card widget for displaying a single game in the schedule.
GameCard
¶
Bases: Widget
A card widget displaying a single game's status.
Source code in src/faceoff/widgets/game_card.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | |
Selected
¶
Bases: Message
Message sent when a game card is selected.
Source code in src/faceoff/widgets/game_card.py
104 105 106 107 108 109 110 | |
on_click()
¶
Handle click event.
Source code in src/faceoff/widgets/game_card.py
198 199 200 | |
on_key(event)
¶
Handle key events.
Source code in src/faceoff/widgets/game_card.py
202 203 204 205 206 | |
on_mount()
¶
Apply CSS classes based on game state.
Source code in src/faceoff/widgets/game_card.py
190 191 192 193 194 195 196 | |
get_local_time_with_tz(utc_time_str)
¶
Convert UTC time string to local time with timezone abbreviation.
Source code in src/faceoff/widgets/game_card.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
Scoreboard widget for displaying game score and status.
Scoreboard
¶
Bases: Widget
Widget displaying the current game score and status.
Source code in src/faceoff/widgets/scoreboard.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
on_mount()
¶
Apply CSS classes based on game state.
Source code in src/faceoff/widgets/scoreboard.py
184 185 186 187 188 | |
update_game(game_data)
¶
Update the game data and refresh the display.
Source code in src/faceoff/widgets/scoreboard.py
190 191 192 193 | |
Play-by-play widget for displaying game events.
PlayByPlay
¶
Bases: Widget
Widget displaying play-by-play events for a game.
Source code in src/faceoff/widgets/play_by_play.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | |
update_plays(plays)
¶
Update the plays list and refresh the display.
Source code in src/faceoff/widgets/play_by_play.py
175 176 177 178 | |