xRuiAlves / fide-ratings-scraper

FIDE (International Chess Federation) ratings pages scraper built with NodeJS
MIT License
49 stars 22 forks source link

Feature: to add the rating history to the full info call #8

Closed matt-d-webb closed 4 years ago

matt-d-webb commented 4 years ago

I wanted to get the full player information & rating history in a single request ...

Before /player/418250/info

{
   name: "Webb, Matthew D ",
   federation: "England",
   birth_year: 1986,
   sex: "Male",
   title: "None",
   standard_elo: "2249",
   rapid_elo: "Notrated",
    blitz_elo: "Notrated",
    world_rank_all_players: 13860,
    world_rank_active_players: 0,
    national_rank_all_players: 237,
    national_rank_active_players: 0,
    continental_rank_all_players: 10563,
    continental_rank_active_players: 0
}

After /player/418250/info?include_history=true

{
    name: "Webb, Matthew D ",
    federation: "England",
    birth_year: 1986,
    sex: "Male",
    title: "None",
    standard_elo: "2249",
    rapid_elo: "Notrated",
    blitz_elo: "Notrated",
    world_rank_all_players: 13860,
    world_rank_active_players: 0,
    national_rank_all_players: 237,
    national_rank_active_players: 0,
    continental_rank_all_players: 10563,
    continental_rank_active_players: 0,
    history: [ {
        date: "2020-Sep",
        numeric_date: 202009,
        standard: "2249",
        num_standard_games: "0",
        rapid: "",
        num_rapid_games: "",
        blitz: "",
        num_blitz_games: ""
   }, ... ]
}
xRuiAlves commented 4 years ago

Hello @matt-d-webb :wave:

Sorry for the delay in my response. Thank you for your suggestion, it sounds like a good idea to me :+1: I see that you also opened a PR to tackle this, I'll take a look at it.

Cheers!