Help us shape the future of Go! Take the 2026 Go Developer Survey

flashscore

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 11 Imported by: 0

README

Flashscore clients for Crawlora

Official Crawlora client packages for the hosted Flashscore API. These packages send requests to Crawlora's API and require a Crawlora account and CRAWLORA_API_KEY; service usage follows your Crawlora account billing plan.

The packages do not run a browser or scrape Flashscore locally. Crawlora is an independent service and is not affiliated with or endorsed by Flashscore or its owners.

Create an account at crawlora.net, open the Crawlora console to get an API key, or read the API documentation.

Install

npm install @crawlora-org/flashscore
python -m pip install crawlora-flashscore
go get github.com/Crawlora-org/crawlora-flashscore@latest
gem install crawlora-flashscore
composer require crawlora/flashscore

For Java, add net.crawlora:crawlora-flashscore:0.2.0 to your Maven dependencies; see java/README.md.

Set your Crawlora key in the environment before running a client:

export CRAWLORA_API_KEY="your-crawlora-api-key"

Do not commit API keys. See the language-specific READMEs for sync and async use.

PHP example

The Packagist package is available as crawlora/flashscore:

composer require crawlora/flashscore
<?php
require __DIR__ . '/vendor/autoload.php';

$apiKey = getenv('CRAWLORA_API_KEY');
if (!$apiKey) throw new RuntimeException('Set CRAWLORA_API_KEY before running this example.');
$client = new \Crawlora\Flashscore\Client(apiKey: $apiKey);
$result = $client->request("flashscore-sports", []);
print_r($result);
$client->close();

The same example and install details are in php/README.md.

Run examples from a source checkout

From the repository root, set CRAWLORA_API_KEY as shown above and run:

node examples/javascript.mjs
python -m pip install ./python
python examples/python.py

The checked-in JavaScript example imports the generated local source at javascript/src/index.js. The Python command installs this checkout's package before running its example. Every language-specific README also includes an install snippet and a client call for the corresponding registry package.

Contract

This package release is 0.2.0. The generated client methods follow the bundled openapi/public.json contract at revision sha256:fcaf7e58d82dcbe73e54cddcffc79511b5d01e2c25d511531656862dfe91fb3e. scripts/generate.py regenerates all six language clients and the documentation from the shared source.

Contract updates and releases

The Sync live API contract workflow checks the deployed public OpenAPI contract every day at 03:27 UTC. It always reads https://api.crawlora.net/swagger/doc.json; its only manual option is dry_run, which applies the candidate in the workflow and reports the result without validating, committing, tagging, or publishing it.

An unchanged contract is a no-op and does not run the client test matrix or create a release. Additions and updates are applied to a candidate, checked across Node.js, Python, Go, Ruby, Java, and PHP, then committed to main only after all checks pass. Removing or deprecating an existing operation stops the run for maintainer review; packages already published remain available. The release workflow publishes accepted versions to npm, PyPI, Go modules, RubyGems, Maven Central, GitHub Packages, and Packagist. A failed fetch, invalid contract, or failed check also stops before the commit. A later scheduled run can resume an incomplete registry publication at the same package version and immutable tag; recovery does not bypass the removed-operation review.

The workflow does not accept an alternate source URL or a caller-supplied version. To preview a change, open Actions → Sync live API contract → Run workflow and select dry_run.

License

MIT. See LICENSE.

Documentation

Overview

Package flashscore is a focused Go client for Crawlora's Flashscore endpoints.

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.crawlora.net/api/v1"
	Version        = "0.2.0"
)
View Source
const OperationCount = 38

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

type Client struct {
	APIKey     string
	BaseURL    string
	Timeout    time.Duration
	HTTPClient *http.Client
}

Client calls only the operation IDs included in this platform module.

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a client using the supplied API key, or CRAWLORA_API_KEY when empty.

func (*Client) Calendar

func (c *Client) Calendar(ctx context.Context, params Params) (any, error)

Calendar calls the flashscore-calendar operation.

func (*Client) CalendarCategories

func (c *Client) CalendarCategories(ctx context.Context, params Params) (any, error)

CalendarCategories calls the flashscore-calendar-categories operation.

func (*Client) Call

func (c *Client) Call(ctx context.Context, operationID string, params Params) (any, error)

Call executes a selected platform operation by operation ID.

func (*Client) Close

func (c *Client) Close() error

Close releases idle connections held by the configured HTTP transport.

func (*Client) Competitions

func (c *Client) Competitions(ctx context.Context, params Params) (any, error)

Competitions calls the flashscore-competitions operation.

func (*Client) MatchH2h

func (c *Client) MatchH2h(ctx context.Context, params Params) (any, error)

MatchH2h calls the flashscore-match-h2h operation.

func (*Client) MatchHighlights

func (c *Client) MatchHighlights(ctx context.Context, params Params) (any, error)

MatchHighlights calls the flashscore-match-highlights operation.

func (*Client) MatchInfo

func (c *Client) MatchInfo(ctx context.Context, params Params) (any, error)

MatchInfo calls the flashscore-match-info operation.

func (*Client) MatchLineups

func (c *Client) MatchLineups(ctx context.Context, params Params) (any, error)

MatchLineups calls the flashscore-match-lineups operation.

func (*Client) MatchMissingPlayers

func (c *Client) MatchMissingPlayers(ctx context.Context, params Params) (any, error)

MatchMissingPlayers calls the flashscore-match-missing-players operation.

func (*Client) MatchNews

func (c *Client) MatchNews(ctx context.Context, params Params) (any, error)

MatchNews calls the flashscore-match-news operation.

func (*Client) MatchOdds

func (c *Client) MatchOdds(ctx context.Context, params Params) (any, error)

MatchOdds calls the flashscore-match-odds operation.

func (*Client) MatchPredictedLineups

func (c *Client) MatchPredictedLineups(ctx context.Context, params Params) (any, error)

MatchPredictedLineups calls the flashscore-match-predicted-lineups operation.

func (*Client) MatchStandings

func (c *Client) MatchStandings(ctx context.Context, params Params) (any, error)

MatchStandings calls the flashscore-match-standings operation.

func (*Client) MatchStats

func (c *Client) MatchStats(ctx context.Context, params Params) (any, error)

MatchStats calls the flashscore-match-stats operation.

func (*Client) MatchTv

func (c *Client) MatchTv(ctx context.Context, params Params) (any, error)

MatchTv calls the flashscore-match-tv operation.

func (*Client) Navigation

func (c *Client) Navigation(ctx context.Context, params Params) (any, error)

Navigation calls the flashscore-navigation operation.

func (*Client) News

func (c *Client) News(ctx context.Context, params Params) (any, error)

News calls the flashscore-news operation.

func (*Client) NewsArticle

func (c *Client) NewsArticle(ctx context.Context, params Params) (any, error)

NewsArticle calls the flashscore-news-article operation.

func (*Client) NewsCategories

func (c *Client) NewsCategories(ctx context.Context, params Params) (any, error)

NewsCategories calls the flashscore-news-categories operation.

func (*Client) OddsGeos

func (c *Client) OddsGeos(ctx context.Context, params Params) (any, error)

OddsGeos calls the flashscore-odds-geos operation.

func (*Client) Player

func (c *Client) Player(ctx context.Context, params Params) (any, error)

Player calls the flashscore-player operation.

func (*Client) PlayerInjuries

func (c *Client) PlayerInjuries(ctx context.Context, params Params) (any, error)

PlayerInjuries calls the flashscore-player-injuries operation.

func (*Client) PlayerTransfers

func (c *Client) PlayerTransfers(ctx context.Context, params Params) (any, error)

PlayerTransfers calls the flashscore-player-transfers operation.

func (*Client) RankingCategories

func (c *Client) RankingCategories(ctx context.Context, params Params) (any, error)

RankingCategories calls the flashscore-ranking-categories operation.

func (*Client) Rankings

func (c *Client) Rankings(ctx context.Context, params Params) (any, error)

Rankings calls the flashscore-rankings operation.

func (*Client) Scores

func (c *Client) Scores(ctx context.Context, params Params) (any, error)

Scores calls the flashscore-scores operation.

func (*Client) Search

func (c *Client) Search(ctx context.Context, params Params) (any, error)

Search calls the flashscore-search operation.

func (*Client) Sports

func (c *Client) Sports(ctx context.Context, params Params) (any, error)

Sports calls the flashscore-sports operation.

func (*Client) Team

func (c *Client) Team(ctx context.Context, params Params) (any, error)

Team calls the flashscore-team operation.

func (*Client) TeamFixtures

func (c *Client) TeamFixtures(ctx context.Context, params Params) (any, error)

TeamFixtures calls the flashscore-team-fixtures operation.

func (*Client) TeamNews

func (c *Client) TeamNews(ctx context.Context, params Params) (any, error)

TeamNews calls the flashscore-team-news operation.

func (*Client) TeamResults

func (c *Client) TeamResults(ctx context.Context, params Params) (any, error)

TeamResults calls the flashscore-team-results operation.

func (*Client) TeamSquad

func (c *Client) TeamSquad(ctx context.Context, params Params) (any, error)

TeamSquad calls the flashscore-team-squad operation.

func (*Client) TeamTransfers

func (c *Client) TeamTransfers(ctx context.Context, params Params) (any, error)

TeamTransfers calls the flashscore-team-transfers operation.

func (*Client) TopSearch

func (c *Client) TopSearch(ctx context.Context, params Params) (any, error)

TopSearch calls the flashscore-top-search operation.

func (*Client) TournamentEvents

func (c *Client) TournamentEvents(ctx context.Context, params Params) (any, error)

TournamentEvents calls the flashscore-tournament-events operation.

func (*Client) TournamentSeasons

func (c *Client) TournamentSeasons(ctx context.Context, params Params) (any, error)

TournamentSeasons calls the flashscore-tournament-seasons operation.

func (*Client) TournamentStandings

func (c *Client) TournamentStandings(ctx context.Context, params Params) (any, error)

TournamentStandings calls the flashscore-tournament-standings operation.

func (*Client) TournamentStandingsViews

func (c *Client) TournamentStandingsViews(ctx context.Context, params Params) (any, error)

TournamentStandingsViews calls the flashscore-tournament-standings-views operation.

type Params

type Params map[string]any

Params maps the exact OpenAPI parameter names expected by this platform client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL