Current collected state Current
Observed since 20 Oct, 19:59 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
42.js
Library for 42 school API in js (ts)
42.jsLibrary for 42 school API. In progress...
Author: shocquen
npm install 42.js
import "dotenv/config";
import { Client } from "42.js";
(async () => {
const client = new Client(
<string>process.env.CLIENT_ID,
<string>process.env.CLIENT_SECRET
);
try {
if (process.argv.length != 3) throw "Bad arguments! Give me a login !";
const login = process.argv[2];
const user = await client.users.get(login);
console.log(user?.displayname);
const auth_process = await client.auth_manager.init_auth_process(
"http://localhost:3333/callback",
["public", "projects", "profile"],
{
port: 3333,
callback_function: async (user) => {
if (auth_process)
client.auth_manager.stop_auth_process(auth_process.id);
//const teams = await user.get("/me/teams");
//console.log(teams?.data[0]);
},
}
);
if (auth_process) console.log(auth_process.url);
} catch (err) {
console.error(err);
}
})();
Pull requests are welcome. Don't hesitate to contact me by discord Saky#0001 or directly at school if we met
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@types/axiosEnvironment{
"local_name": "@types/axios",
"alias": false,
"peer_metadata": null
} | ^0.14.0 | runtime |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^18.6.3 | runtime |
axiosEnvironment{
"local_name": "axios",
"alias": false,
"peer_metadata": null
} | ^0.27.2 | runtime |
bottleneckEnvironment{
"local_name": "bottleneck",
"alias": false,
"peer_metadata": null
} | ^2.19.5 | runtime |
dotenvEnvironment{
"local_name": "dotenv",
"alias": false,
"peer_metadata": null
} | ^16.0.1 | runtime |
expressEnvironment{
"local_name": "express",
"alias": false,
"peer_metadata": null
} | ^4.18.2 | runtime |
@types/expressEnvironment{
"local_name": "@types/express",
"alias": false,
"peer_metadata": null
} | ^4.17.14 | development |
Source distribution
{
"integrity": "sha512-H+PTYOj39Htr2UcIMS+92ItpMN8rvUZKRoW2oCTeWK+rS4rRDPdUowy9oIeKsF0y+9tNkUBh6OcnkPr56QcgtQ==",
"shasum": "14e3b23ade0f45343df123a0afad97072f23b182",
"tarball": "https://registry.npmjs.org/42.js/-/42.js-1.2.6.tgz",
"fileCount": 68,
"unpackedSize": 75503,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIAIJg03B1yV7ocePbzj4OKoYoCMNxd7wFbcrLBFlYq78AiBxllpdMRogGtY8zMRGvXQn8Bej8128Mqoi1fhKlIVNfQ=="
}
]
}Observed since 20 Oct, 19:59 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:cd6bfddb939f9ef8d24dc1f22b21c276c54c0ea61ef192015630d8e9b65b4e1d