Recruit Class Documentation
Represents a recruit in the ESPN recruiting system.
Attributes:
Name | Type | Description |
---|---|---|
recruit_json |
dict
|
The JSON data containing recruit details. |
espn_instance |
The ESPN API instance. |
|
api_ref |
str
|
API reference URL for the recruit. |
athlete |
dict
|
Dictionary containing athlete details. |
id |
str
|
The recruit's unique identifier. |
uid |
str
|
The unique identifier for the recruit. |
guid |
str
|
The global unique identifier. |
type |
str
|
Type of recruit data. |
alternate_ids |
str
|
Alternative ID for the recruit. |
first_name |
str
|
First name of the recruit. |
last_name |
str
|
Last name of the recruit. |
full_name |
str
|
Full name of the recruit. |
display_name |
str
|
Display name of the recruit. |
short_name |
str
|
Shortened version of the recruit's name. |
weight |
int
|
The recruit's weight in pounds (if available). |
height |
int
|
The recruit's height in inches (if available). |
recruiting_class |
str
|
The recruiting class year. |
grade |
str
|
Grade assigned to the recruit. |
links |
list
|
A list of links related to the recruit. |
birth_city |
str
|
City where the recruit was born. |
birth_state |
str
|
State where the recruit was born. |
high_school_id |
str
|
The recruit's high school ID. |
high_school_name |
str
|
Name of the recruit's high school. |
high_school_state |
str
|
State where the recruit's high school is located. |
slug |
str
|
A unique slug identifier for the recruit. |
position_ref |
str
|
API reference for the recruit's position. |
position_id |
str
|
The recruit's position ID. |
position_name |
str
|
Name of the recruit's position. |
position_display_name |
str
|
Display name of the position. |
position_abbreviation |
str
|
Abbreviated name of the recruit's position. |
position_leaf |
bool
|
Whether the position is a leaf node in the hierarchy. |
position_parent_ref |
str
|
Reference to the parent position (if any). |
linked |
dict
|
Additional linked data related to the recruit. |
schools |
list
|
A list of schools associated with the recruit. |
status_id |
str
|
The ID representing the recruit's status. |
status_name |
str
|
Description of the recruit's status. |
rank |
int or None
|
The recruit's overall rank, extracted from attributes. |
Methods:
Name | Description |
---|---|
__repr__ |
Returns a string representation of the recruit instance. |
_set_recruit_data |
Extracts and sets player data from the provided JSON. |
Source code in pyespn/classes/player.py
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 |
|
espn_instance
property
PYESPN: the espn client instance associated with the class
id
property
str: the id for the player
__init__(recruit_json, espn_instance)
Initializes a Recruit instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
recruit_json
|
dict
|
The JSON data containing recruit details. |
required |
espn_instance
|
PYESPN
|
The ESPN API instance. |
required |
Source code in pyespn/classes/player.py
__repr__()
Returns a string representation of the Recruit instance.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
A formatted string with the recruits's name, debut year and jersey. |
Source code in pyespn/classes/player.py
to_dict()
Converts the Recruit instance to its original JSON dictionary.
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The recruit's raw JSON data. |