From 75c00d911f160b81fb813fb7961313a5f11e6fd4 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Fri, 11 Jul 2025 08:20:32 +0100 Subject: [PATCH] Switch to using GithubIDContributions api Signed-off-by: Marcus Noble --- src/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script.js b/src/script.js index 22b08a0..fba8f8d 100644 --- a/src/script.js +++ b/src/script.js @@ -29,12 +29,12 @@ function find() { "Content-Type": "application/json", }, redirect: "follow", - body: "{\"api\":\"DevActCnt\",\"payload\":{\"project\":\"all\",\"range\":\"Last century\",\"metric\":\"Contributions\",\"repository_group\":\"All\",\"country\":\"All\",\"github_id\":\"" + user + "\",\"bg\":\"\"}}", + body: "{\"api\":\"GithubIDContributions\",\"payload\":{\"github_id\":\"" + user + "\"}}", }) .then(res => res.json()) .then(data => { statusUpdate("", "info"); - let score = data.number[0]; + let score = data.contributions; if (score) { result.innerHTML = score; rawResults.innerText = JSON.stringify(data, "", 2)