fotmob

package module
v0.1.4 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

FotMob clients for Crawlora

Official Crawlora client packages for the hosted FotMob 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 FotMob locally. Crawlora is an independent service and is not affiliated with or endorsed by FotMob 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/fotmob
python -m pip install crawlora-fotmob
go get github.com/Crawlora-org/crawlora-fotmob@latest
gem install crawlora-fotmob
composer require crawlora/fotmob

For Java, add net.crawlora:crawlora-fotmob:0.1.4 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/fotmob:

composer require crawlora/fotmob
<?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\FotMob\Client(apiKey: $apiKey);
$result = $client->request("fotmob-leagues", []);
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.1.4. The generated client methods follow the bundled openapi/public.json contract at revision sha256:d40e5ee2b400b1b40b5ca6998063cde26b6bb3e7f84da679b5047d26380f3fa1. 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:37 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 fotmob is a focused Go client for Crawlora's FotMob endpoints.

Index

Constants

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

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) AudioMatches

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

AudioMatches calls the fotmob-audio-matches 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) FifaRankingPeriods

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

FifaRankingPeriods calls the fotmob-fifa-ranking-periods operation.

func (*Client) FifaRankings

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

FifaRankings calls the fotmob-fifa-rankings operation.

func (*Client) LatestNews

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

LatestNews calls the fotmob-latest-news operation.

func (*Client) League

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

League calls the fotmob-league operation.

func (*Client) Leagues

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

Leagues calls the fotmob-leagues operation.

func (*Client) LineupBuilderPlayers

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

LineupBuilderPlayers calls the fotmob-lineup-builder-players operation.

func (*Client) LineupBuilderTeam

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

LineupBuilderTeam calls the fotmob-lineup-builder-team operation.

func (*Client) Match

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

Match calls the fotmob-match operation.

func (*Client) MatchMedia

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

MatchMedia calls the fotmob-match-media operation.

func (*Client) Matches

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

Matches calls the fotmob-matches operation.

func (*Client) News

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

News calls the fotmob-news operation.

func (*Client) NewsArticle

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

NewsArticle calls the fotmob-news-article operation.

func (*Client) Player

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

Player calls the fotmob-player operation.

func (*Client) PlayerMatchStats

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

PlayerMatchStats calls the fotmob-player-match-stats operation.

func (*Client) PlayerMatches

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

PlayerMatches calls the fotmob-player-matches operation.

func (*Client) PlayerStats

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

PlayerStats calls the fotmob-player-stats operation.

func (*Client) Search

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

Search calls the fotmob-search operation.

func (*Client) Seasons

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

Seasons calls the fotmob-seasons operation.

func (*Client) Stats

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

Stats calls the fotmob-stats operation.

func (*Client) StatsCategories

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

StatsCategories calls the fotmob-stats-categories operation.

func (*Client) Table

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

Table calls the fotmob-table operation.

func (*Client) Team

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

Team calls the fotmob-team operation.

func (*Client) TeamFixtures

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

TeamFixtures calls the fotmob-team-fixtures operation.

func (*Client) TeamNews

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

TeamNews calls the fotmob-team-news operation.

func (*Client) Transfers

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

Transfers calls the fotmob-transfers operation.

func (*Client) TrendingNews

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

TrendingNews calls the fotmob-trending-news operation.

func (*Client) TrendingSearches

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

TrendingSearches calls the fotmob-trending-searches operation.

func (*Client) TvGuide

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

TvGuide calls the fotmob-tv-guide operation.

func (*Client) TvGuideChannels

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

TvGuideChannels calls the fotmob-tv-guide-channels operation.

func (*Client) TvGuideCountries

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

TvGuideCountries calls the fotmob-tv-guide-countries 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