Categorygithub.com/imdevinc/go-fifa
modulepackage
0.1.3
Repository: https://github.com/imdevinc/go-fifa.git
Documentation: pkg.go.dev

# README

go-fifa Library

This libary allows for interactions with the FIFA API. It's currently in alpha phase, feel free to submit PR's or file bugs.

Warning
This library uses an undocumented API from the FIFA web servers. It may stop functioning correctly at any point due to this

Usage

Create a new client using the NewClient() function. You will need to pass in an Options parameter, with optional values for an HTTPClient, an APIBaseURL and a UserAgent. If any values are not provIded, the defaults will be used.

Currently Supported

The following endpoints are currently supported

API EndpointFunction
/competitionsGetCompetitions()
/competitions/{competitionId}GetCompetition()
/timelines/{competitionId}/{seasonId}/{stageId}/{matchId}GetMatchEvents()
/live/football/nowGetCurrentMatches()
/calendar/matchesGetMatches()
/teams/{teamId}GetTeam()
/players/{playerId}GetPlayer()
/seasons/{seasonId}GetSeason()

Use of any

Because this uses an undocumented API, it is not always possible to find all the proper values for building the types. Because of this, we use the any object for any object we don't have an example of. As we discover new object types, we can update accordingly.

# Packages

No description provided by the author

# Constants

A player assisted a goal.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A player cleared the ball.
The coin toss happened.
Referee awarded a corner kick.
A player was given a second yellow card.
The referee called a drop ball.
Female.
First extra period.
First period.
A player commited a foul.
Unknown event type.
No description provided by the author
A player hit the crossbar from a free-kick.
A player scored a goal from a free-kick.
A player hit the post from a free-kick.
A player made an attempt on goal.
The goalie stopped the shot.
A player scored a goal.
The half is over.
The referee called a handball.
The player hit the crossbar.
The player hit the post.
Male.
No description provided by the author
The match is over.
The match is over.
The referee paused the match.
The match has resumed.
The match has started.
The first period hasn't started yet.
A player was deemed offside.
No description provided by the author
A player scored against their own team.
A penalty was awarded.
A player scored a goal from a penalty.
A player missed their penalty.
A player missed their penalty??.
This event is still pending a final event type, query again for the new event.
A player was given a red card.
No description provided by the author
No description provided by the author
No description provided by the author
Second extra period.
Second period.
Shootout.
The goalie blocked a shot.
A player was substituded out.
No description provided by the author
A player took a throw-in.
Unknown event type.
Unknown event type.
A penalty was awarded after VAR.
No description provided by the author
A player was given a yellow card.

# Structs

BallPossession represents the information about ball possession.
Booking represents the structure of a booking.
No description provided by the author
Competition represents the structure of a competition.
CompetitionsResponse represents the response from the competitions API.
GetCompetitionsResponse represents the input used when looking up a competition.
GetMatchesOptions represents the inputs when looking up matches.
GetMatchEventOptions represents the inputs used to get data about matches.
GetPlayerOptions represents the inputs when looking up a player.
GetSeasonOptions represents the inputs when looking up a season.
GetTeamOptions represents the inputs when looking up a team.
Goal represents the structure of a goal.
LiveMatch represents the structure of a live match from the "now" api.
LiveResponse represents the structure of a response from the "now" api.
LocaleDescription represents a common usage for specifying locale information for different nested structures.
MatchData represents the structure of a match object.
MatchesResponse represents the information returned from the calendar API.
Official represents the information about an offical.
No description provided by the author
PlayerResponse represents the structure of a player from the API.
Properties represents the properties that can be attached to many objects.
HostTeam represents the structure of a host team.
SeasonResponse represents the structure returned from the Seasons API.
Stadium represents the structure of a stadium.
Team represents the structure of a team object.
TeamCoach represents the structure of a coach object.
TeamPlayer represents the structure of a player from the teams API.
TeamPlayerPicture represents a picture object from the "now" API.
TeamResponse represents the structure returned from the teams API.
TeamSubstitution represents the information about a substitution.
TimelineEvent represent the structure of a timeline event.
TimelineResponse represents the response from the timeline API.
VARNotification struct represents information about VAR.
Weather represents the information about weather.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
Represents the gender of the player.
No description provided by the author
No description provided by the author
Represents the period of play.