r6api.js icon indicating copy to clipboard operation
r6api.js copied to clipboard

Implement "profiles/gamesplayed endpoint

Open BadCoder1337 opened this issue 4 years ago • 6 comments

Underlying endpoint returns only Uplay (id f68a4bb5-608a-4ff2-8123-be8ef797e0a6) and nothing about R6 Extraction (id 5033bfb3-8a2e-4748-93e5-2ffa82975a85, codename Pioneer PC) or R6 Siege (id e3d5ea9e-50bd-43b7-88bf-39794f4e3d40) profiles is under a year old. We need to update the documentation, mark getProfileApplications as deprecated and discourage usage.

BadCoder1337 avatar Jan 20 '22 12:01 BadCoder1337

There's a working alternative https://public-ubiservices.ubi.com/v1/profiles/{profileId}/gamesplayed https://public-ubiservices.ubi.com/v1/profiles/gamesplayed?profileIds={profileIds}

BadCoder1337 avatar Jan 20 '22 12:01 BadCoder1337

Underlying endpoint returns only Uplay id

It will if profileId never launched anything else, it does return correct data for uplay launcher and siege for my account, not sure about extraction

profiles is under a year old

not sure what that means

On top of that, gamesplayed endpoint only returns appId and nothing else, I use lastDatePlayed in several of my projects, so it wouldn't be a sufficient alternative.

danielwerg avatar Jan 20 '22 14:01 danielwerg

This is getProfileApplications for my profile. (I truncated some crap from 2018)

{
  "id": "c09fc7c9-5d45-4c6c-94e5-2dee159abff3",
  "applications": [
    {
      "id": "a427a342-56bb-437b-b835-fa695c75893b",
      "name": "Tom Clancy's Rainbow Six Siege - Test Server",
      "platform": "PC",
      "sessionsPlayed": 53,
      "daysPlayed": 20,
      "lastPlayedAt": "2020-10-10T19:40:18.197Z",
      "firstPlayedAt": "2017-05-19T14:59:46.804Z"
    },
    {
      "id": "e3d5ea9e-50bd-43b7-88bf-39794f4e3d40",
      "name": "Tom Clancy's Rainbow Six Siege",
      "platform": "PC",
      "sessionsPlayed": 1431,
      "daysPlayed": 786,
      "lastPlayedAt": "2021-02-03T19:43:21.239Z",
      "firstPlayedAt": "2016-02-07T12:15:41.606Z"
    },
    {
      "id": "f68a4bb5-608a-4ff2-8123-be8ef797e0a6",
      "name": null,
      "platform": null,
      "sessionsPlayed": 1174,
      "daysPlayed": 959,
      "lastPlayedAt": "2022-01-20T05:08:19.948Z",
      "firstPlayedAt": "2016-02-07T12:09:26.631Z"
    }
  ]
}

I obviously played Siege till the end of 2021, but info frozen on February. Also there's no Extraction which i played today.

BadCoder1337 avatar Jan 20 '22 14:01 BadCoder1337

Oh yeah, you are right, it doesn't update siege. I will still keep because in 99% uplay lastPlayed and siege lastPlayed are the same thing.

danielwerg avatar Jan 20 '22 15:01 danielwerg

It's worth to mention. Also worth to implement the getGamesPlayed method if someone would ensure that a user has a game.

BadCoder1337 avatar Jan 20 '22 16:01 BadCoder1337

I don't really have a use case for that nor motivation right now, but If you want to do that I will review a pr.

danielwerg avatar Jan 20 '22 16:01 danielwerg