Skip to main content

Module person

Module person 

Source
Expand description

A description of a person in baseball.

Person works through multi-level definition.

  1. PersonId, which deserializes a:
"person": {
    "id": 660271,
    "link": "/api/v1/people/660271"
}
  1. NamedPerson, which deserializes a:
"person": {
    "id": 660271,
    "link": "/api/v1/people/660271",
    "fullName": "Shohei Ohtani"
}
  1. Person, which deserializes a lot of extra fields, see http://statsapi.mlb.com/api/v1/people/660271. Technically, Person is actually an enum which separates fields supplied for Ballplayers (handedness, draft year, etc.), and fields available to people like coaches and umpires (such as last name, age, etc.) RegularPerson.

This module also contains person_hydrations, which are used to get additional data about people when making requests.

Modules§

free_agents
Lists the registered free agents at the time.
players
Lists all players in the sport in a given season.
stats
Gets the stats of a player for a single game.

Macros§

person_hydrations
Creates hydrations for a person

Structs§

Ballplayer
A baseball player.
BirthData
Data regarding birthplace.
BodyMeasurements
Height and weight
Education
Schools the ballplayer went to.
JerseyNumber
The number on the back of a jersey, useful for radix sorts maybe??
NamedPerson
A person with a name.
PeopleResponse
Response containing a list of people
PersonId
A u32 that represents a person.
PersonRequest
Returns a PeopleResponse.
PersonRequestBuilder
Use builder syntax to set the inputs and finish with build().
PreferredTeamData
Data regarding preferred team, likely for showcasing the player with a certain look regardless of the time.
RegularPerson
A regular person; detailed-name stuff.
Relative
Relative to the ballplayer, father, son, etc.
StrikeZoneMeasurements
Strike zone dimensions, measured in feet from the ground.

Enums§

Person
A complete person response for a hydrated request. Ballplayers have more fields.

Traits§

PersonHydrations
A type that is made with person_hydrations!