0.0.7 • Published 1 year ago

fotmob-api v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Fotmob-Api Package

The package is still in the development process.

Api Search Functions

FunctionParametersDescription
getTeam (async)teamId : string, full : booleanget any football team informations using fotmob team id
getPlayer (async)playerId : string, full : booleanget any football player/coach informations using fotmob team id
getSearchResult (async)keyword : string, optionssearch in fotmob for teams/players or coaches (squad)/news/matches/leagues
import { getTeam, getPlayer, getSearchResult } from "fotmob-api";

async function test(){
    try{
    let results=await getSearchResult("messi");//searching for a player
    /*

    advanced search
    let results = await getSearchResult("messi", {
    filter: "squadMember"
    });

    */
    console.log(results);

    } catch(err){
        console.log(err);
    }

}
test()

Note: The Fotmob API is public but without any official documentation.

Anyone who wants to contribute can open a pull request on GitHub.