Skip to content

Commit

Permalink
encoding api fetching on contributor.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pandeyji711 committed Jun 4, 2024
1 parent 1d1efb0 commit 084dcb2
Showing 1 changed file with 67 additions and 11 deletions.
78 changes: 67 additions & 11 deletions Official_Website/contributor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,77 @@ const repoName = "HelpOps-Hub";
// const loading = document.getElementById("skeleton-wrapper");
// cont.appendChild(loading);
async function fetchContributors(pageNumber) {
const apiUrl =
"https://script.google.com/macros/s/AKfycbzipat1oQlBel7YwZaPl7mCpshjRpvyouFSRgunjqGlKC-0gv46hypYD0EnSMsOEBeC-Q/exec";

const _0x57c7a2 = _0x55df;
(function (_0x7afde4, _0x279ad2) {
const _0x373dbd = _0x55df,
_0x449b85 = _0x7afde4();
while (!![]) {
try {
const _0x5aa9a9 =
-parseInt(_0x373dbd(0xad)) / 0x1 +
-parseInt(_0x373dbd(0xb7)) / 0x2 +
-parseInt(_0x373dbd(0xaf)) / 0x3 +
(parseInt(_0x373dbd(0xac)) / 0x4) *
(-parseInt(_0x373dbd(0xae)) / 0x5) +
-parseInt(_0x373dbd(0xa8)) / 0x6 +
(-parseInt(_0x373dbd(0xb3)) / 0x7) *
(-parseInt(_0x373dbd(0xab)) / 0x8) +
(-parseInt(_0x373dbd(0xaa)) / 0x9) *
(-parseInt(_0x373dbd(0xb5)) / 0xa);
if (_0x5aa9a9 === _0x279ad2) break;
else _0x449b85["push"](_0x449b85["shift"]());
} catch (_0x36680b) {
_0x449b85["push"](_0x449b85["shift"]());
}
}
})(_0x470c, 0xe59c7);
function _0x55df(_0x3c5be2, _0x22e4d2) {
const _0x470c8f = _0x470c();
return (
(_0x55df = function (_0x55dfa5, _0x40ac15) {
_0x55dfa5 = _0x55dfa5 - 0xa8;
let _0x120ab5 = _0x470c8f[_0x55dfa5];
return _0x120ab5;
}),
_0x55df(_0x3c5be2, _0x22e4d2)
);
}
const apiUrl = _0x57c7a2(0xb1);
async function getkey() {
const _0x36503b = _0x57c7a2;
try {
const response = await fetch(apiUrl);
if (!response.ok) {
throw new Error("Network response was not ok");
}
const data = await response.json();
return data.apik[0].apikey;
} catch (error) {
console.error("Error fetching data:", error);
const _0x37cb91 = await fetch(apiUrl);
if (!_0x37cb91["ok"]) throw new Error(_0x36503b(0xb4));
const _0x1d7bab = await _0x37cb91[_0x36503b(0xb2)]();
return _0x1d7bab[_0x36503b(0xa9)][0x0][_0x36503b(0xb6)];
} catch (_0x45ce9f) {
console["error"](_0x36503b(0xb0), _0x45ce9f);
}
}
function _0x470c() {
const _0x57b2f6 = [
"11073704OnHOnz",
"192616eTlKBl",
"1549488wLKhSq",
"170ZCfKen",
"754176DlyvCG",
"Error\x20fetching\x20data:",
"https://script.google.com/macros/s/AKfycbzipat1oQlBel7YwZaPl7mCpshjRpvyouFSRgunjqGlKC-0gv46hypYD0EnSMsOEBeC-Q/exec",
"json",
"7Sgnepe",
"Network\x20response\x20was\x20not\x20ok",
"70NJzGMO",
"apikey",
"1110902JNcOiC",
"1677348FGGESa",
"apik",
"4923513NUAFJk",
];
_0x470c = function () {
return _0x57b2f6;
};
return _0x470c();
}
const token = await getkey();
const perPage = 100;
const url = `https://api.github.com/repos/${owner}/${repoName}/contributors?page=${pageNumber}&per_page=${perPage}`;
Expand Down

0 comments on commit 084dcb2

Please sign in to comment.