Documentation
¶
Overview ¶
Package flashscore is Crawlora's Flashscore API client for 54 endpoints, covering scores, match details, competitions, teams, players, odds, and news. API documentation: https://crawlora.net/docs?utm_source=pkg.go.dev&utm_medium=referral&utm_campaign=platform-clients&utm_content=flashscore-go-api-docs
Index ¶
- Constants
- func OperationIDs() []string
- type Client
- func (c *Client) Calendar(ctx context.Context, params Params) (any, error)
- func (c *Client) CalendarCategories(ctx context.Context, params Params) (any, error)
- func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)
- func (c *Client) Close() error
- func (c *Client) Competitions(ctx context.Context, params Params) (any, error)
- func (c *Client) EntityNews(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchBoxScore(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchDarts(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchH2h(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchHighlights(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchInfo(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchLineups(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchMissingPlayers(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchMomentum(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchNews(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchOdds(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchPlayerStats(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchPointByPoint(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchPredictedLineups(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchReport(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchStandings(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchStats(ctx context.Context, params Params) (any, error)
- func (c *Client) MatchTv(ctx context.Context, params Params) (any, error)
- func (c *Client) Navigation(ctx context.Context, params Params) (any, error)
- func (c *Client) News(ctx context.Context, params Params) (any, error)
- func (c *Client) NewsArticle(ctx context.Context, params Params) (any, error)
- func (c *Client) NewsArticleBody(ctx context.Context, params Params) (any, error)
- func (c *Client) NewsCategories(ctx context.Context, params Params) (any, error)
- func (c *Client) NewsMostRead(ctx context.Context, params Params) (any, error)
- func (c *Client) OddsGeos(ctx context.Context, params Params) (any, error)
- func (c *Client) Player(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerFixtures(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerInjuries(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerMatchLog(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerNews(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerResults(ctx context.Context, params Params) (any, error)
- func (c *Client) PlayerTransfers(ctx context.Context, params Params) (any, error)
- func (c *Client) RankingCategories(ctx context.Context, params Params) (any, error)
- func (c *Client) Rankings(ctx context.Context, params Params) (any, error)
- func (c *Client) Scores(ctx context.Context, params Params) (any, error)
- func (c *Client) Search(ctx context.Context, params Params) (any, error)
- func (c *Client) Sports(ctx context.Context, params Params) (any, error)
- func (c *Client) Team(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamFixtures(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamNews(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamOutrightOdds(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamResults(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamSquad(ctx context.Context, params Params) (any, error)
- func (c *Client) TeamTransfers(ctx context.Context, params Params) (any, error)
- func (c *Client) TopSearch(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentArchiveSeasons(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentEvents(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentOutrightOdds(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentSeasons(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentStandings(ctx context.Context, params Params) (any, error)
- func (c *Client) TournamentStandingsViews(ctx context.Context, params Params) (any, error)
- type Params
Examples ¶
Constants ¶
const ( DefaultBaseURL = "https://api.crawlora.net/api/v1" Version = "0.3.6" )
const OperationCount = 54
OperationCount reports how many selected-platform operations this module exposes.
Variables ¶
This section is empty.
Functions ¶
func OperationIDs ¶
func OperationIDs() []string
OperationIDs returns the selected operation IDs in stable sorted order.
Types ¶
type Client ¶
Client calls only the operation IDs included in this platform module.
func NewClient ¶
NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.
func (*Client) CalendarCategories ¶
CalendarCategories calls the flashscore-calendar-categories operation.
func (*Client) Call ¶
Call executes a selected platform operation by operation ID.
Example ¶
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{"ok":true}`))
}))
defer server.Close()
client := NewClient("your-crawlora-api-key")
client.BaseURL = server.URL + "/api/v1"
client.HTTPClient = server.Client()
result, err := client.Call(context.Background(), "flashscore-calendar", Params{"category": "tennis-atp"})
if err != nil {
panic(err)
}
fmt.Println(result.(map[string]any)["ok"])
Output: true
func (*Client) Competitions ¶
Competitions calls the flashscore-competitions operation.
func (*Client) EntityNews ¶ added in v0.3.0
EntityNews calls the flashscore-entity-news operation.
func (*Client) MatchBoxScore ¶ added in v0.3.0
MatchBoxScore calls the flashscore-match-box-score operation.
func (*Client) MatchDarts ¶ added in v0.3.0
MatchDarts calls the flashscore-match-darts operation.
func (*Client) MatchHighlights ¶
MatchHighlights calls the flashscore-match-highlights operation.
func (*Client) MatchLineups ¶
MatchLineups calls the flashscore-match-lineups operation.
func (*Client) MatchMissingPlayers ¶
MatchMissingPlayers calls the flashscore-match-missing-players operation.
func (*Client) MatchMomentum ¶ added in v0.3.0
MatchMomentum calls the flashscore-match-momentum operation.
func (*Client) MatchPlayerStats ¶ added in v0.3.0
MatchPlayerStats calls the flashscore-match-player-stats operation.
func (*Client) MatchPointByPoint ¶ added in v0.3.0
MatchPointByPoint calls the flashscore-match-point-by-point operation.
func (*Client) MatchPredictedLineups ¶
MatchPredictedLineups calls the flashscore-match-predicted-lineups operation.
func (*Client) MatchReport ¶ added in v0.3.0
MatchReport calls the flashscore-match-report operation.
func (*Client) MatchStandings ¶
MatchStandings calls the flashscore-match-standings operation.
func (*Client) MatchStats ¶
MatchStats calls the flashscore-match-stats operation.
func (*Client) Navigation ¶
Navigation calls the flashscore-navigation operation.
func (*Client) NewsArticle ¶
NewsArticle calls the flashscore-news-article operation.
func (*Client) NewsArticleBody ¶ added in v0.3.0
NewsArticleBody calls the flashscore-news-article-body operation.
func (*Client) NewsCategories ¶
NewsCategories calls the flashscore-news-categories operation.
func (*Client) NewsMostRead ¶ added in v0.3.0
NewsMostRead calls the flashscore-news-most-read operation.
func (*Client) PlayerFixtures ¶ added in v0.3.0
PlayerFixtures calls the flashscore-player-fixtures operation.
func (*Client) PlayerInjuries ¶
PlayerInjuries calls the flashscore-player-injuries operation.
func (*Client) PlayerMatchLog ¶ added in v0.3.0
PlayerMatchLog calls the flashscore-player-match-log operation.
func (*Client) PlayerNews ¶ added in v0.3.0
PlayerNews calls the flashscore-player-news operation.
func (*Client) PlayerResults ¶ added in v0.3.0
PlayerResults calls the flashscore-player-results operation.
func (*Client) PlayerTransfers ¶
PlayerTransfers calls the flashscore-player-transfers operation.
func (*Client) RankingCategories ¶
RankingCategories calls the flashscore-ranking-categories operation.
func (*Client) TeamFixtures ¶
TeamFixtures calls the flashscore-team-fixtures operation.
func (*Client) TeamOutrightOdds ¶ added in v0.3.0
TeamOutrightOdds calls the flashscore-team-outright-odds operation.
func (*Client) TeamResults ¶
TeamResults calls the flashscore-team-results operation.
func (*Client) TeamTransfers ¶
TeamTransfers calls the flashscore-team-transfers operation.
func (*Client) TournamentArchiveSeasons ¶ added in v0.3.0
TournamentArchiveSeasons calls the flashscore-tournament-archive-seasons operation.
func (*Client) TournamentEvents ¶
TournamentEvents calls the flashscore-tournament-events operation.
func (*Client) TournamentOutrightOdds ¶ added in v0.3.0
TournamentOutrightOdds calls the flashscore-tournament-outright-odds operation.
func (*Client) TournamentSeasons ¶
TournamentSeasons calls the flashscore-tournament-seasons operation.
func (*Client) TournamentStandings ¶
TournamentStandings calls the flashscore-tournament-standings operation.