Open BadCoder1337 opened 1 year ago
Why not just use the public profile endpoint to retrieve level and XP instead of relying on a somewhat weird math and legacy endpoints that could be shut down by Ubisoft at any minute? c09fc7c9-5d45-4c6c-94e5-2dee159abff3=
Why not just use the public profile endpoint.
constants.ts
lootbox_probability
Oh, wow, /r6playerprofile/playerprofile/progressions
is fully unsupported, doesn't even update alpha pack drop chance. I will probably replace /r6playerprofile/playerprofile/progressions
with /title/r6s/rewards/public_profile
for getUserProgresssion
method my only concern is lack of bulk profile ids request.
fully unsupported
Only XPLAY sandbox gets updated. Yesterday I played few matches and this is current progression.
Bulk requests are crucial to update large datasets.
a somewhat weird math and legacy endpoints that could be shut down by Ubisoft at any minute
This is certified Ubisoft API Moment™️. I would love to use official tracker endpoints, but there's very tight ratelimites and no bulk queries. It's designed to use under user auth, so it's impossible to use it under "bot" auth for production-scale data retrieval.
Only XPLAY sandbox gets updated
Could you give me full url that you are hitting? For uplay
I'm getting 3000
and for crossplay I'm getting 3100
which both are wrong, in game it shows 11.00%
PR branch:
import R6API from './index.mjs';
const { UBI_EMAIL: email = '', UBI_PASSWORD: password = '' } = process.env;
const r6api = new R6API({ email, password });
const res = await r6api.getProgression('xplay', ['c09fc7c9-5d45-4c6c-94e5-2dee159abff3']);
console.log(res)
GET /v1/spaces/0d2ae42d-4c27-4cb7-af6c-2099062302bb/sandboxes/OSBOR_XPLAY_LNCH_A/r6playerprofile/playerprofile/progressions?profile_ids=c09fc7c9-5d45-4c6c-94e5-2dee159abff3 HTTP/1.1
Host: public-ubiservices.ubi.com
Authorization: Ubi_v1 t=<token>
Ubi-AppId: e3d5ea9e-50bd-43b7-88bf-39794f4e3d40
{
"player_profiles": [
{
"xp": 22970,
"profile_id": "c09fc7c9-5d45-4c6c-94e5-2dee159abff3",
"lootbox_probability": 1750,
"level": 89
}
]
}
@BadCoder1337 Nope, I'm still getting 3100
. Maybe I'm making some silly mistake, could you look up 0b95544b-0228-49a7-b338-6d15cfbc3d6a
?
@danielwerg still 31%. Looks like it doesn't work for you, because I got correct result also for my friend.
After crossplay release
r6api.getProgression
no longer receive updates. My current xp and level: My xp and level from legacy progression endpoint:While we have been researching for Ranked 2.0 @floxay provided new sandbox name and space id for crossplay. My xp and level from new crossplay progression endpoint:
As you can see, both results are incorrect. It would be reasonable for Ubisoft (lol) to use the sum of legacy and crossplay xp. But there's no total xp in API response, only level and xp remainder. Using some redditor research I wrote few functions in Google Sheets to calculate xp per level, total xp, level and remainder by total xp. NOTE: there's a constant 500xp difference with the calculated and actual result. Looks like Ubisoft added 500xp to legacy profiles after freezing it. So now I can import these functions from utils, call
r6api.getProgression('uplay', id)
andr6api.getProgression('xplay', id)
, merge total xp and calculate the actual level and xp remainder. If @danielwerg decide he could add a unified method to collect and merge progression from all sandboxes, but such method is not ratelimit friendly.