{"id":19370337,"url":"https://github.com/codam-coding-college/42-connector","last_synced_at":"2025-10-27T23:32:07.911Z","repository":{"id":37453313,"uuid":"505816427","full_name":"codam-coding-college/42-connector","owner":"codam-coding-college","description":"This Node module interfaces with the 42 API --\u003e https://api.intra.42.fr","archived":false,"fork":false,"pushed_at":"2022-06-23T13:45:01.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T23:51:19.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codam-coding-college.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-21T11:36:52.000Z","updated_at":"2022-09-03T20:12:50.000Z","dependencies_parsed_at":"2022-08-19T12:21:18.399Z","dependency_job_id":null,"html_url":"https://github.com/codam-coding-college/42-connector","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2F42-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2F42-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2F42-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2F42-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codam-coding-college","download_url":"https://codeload.github.com/codam-coding-college/42-connector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240492314,"owners_count":19810070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T08:15:02.493Z","updated_at":"2025-10-27T23:32:02.861Z","avatar_url":"https://github.com/codam-coding-college.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42-connector\nThis Node module interfaces with the 42 API --\u003e https://api.intra.42.fr\n\n## Usage\n### Installation\n`npm i --save https://github.com/codam-coding-college/42-connector.git`\n\u003cbr\u003e\nor if you want a specific version:\n\u003cbr\u003e\n`npm i --save https://github.com/codam-coding-college/42-connector.git#3.0.0`\n\n## Code example\n```typescript\nimport { API } from '42-connector'\n\nconst api = new API(clientUID, clientSecret)\n\nconst response: Response = await api.get('/v2/achievements')\nconsole.log(response)\n\nconst post_response: Response = await api.post('/v2/feedbacks', {\n\t'feedback[comment]': 'Much good, such wow',\n\t'feedback[feedback_details_attributes][rate]': 2,\n\t'feedback[feedback_details_attributes][kind]': 'interesting',\n})\n\nconst delete_response: Response = await api.delete('/v2/events_users/:id')\n\nconst allPages: Response = await api.getPaged('/v2/achievements_users', (singlePage) =\u003e {\n\tconsole.log(singlePage)\n})\n```\n\n### Using options\n```typescript\nimport { API } from '42-connector'\n\nconst defaultOptions = {\n\tmaxRequestPerSecond: 1 / 3,\t\t\t// The default unprivileged intra app can do 1200 requests per hour, or 1/3 per second\n\tlogging: false,\t\t\t\t\t\t// Nice for debugging and logging\n\troot: 'https://api.intra.42.fr',\t// The url with which to prefix every request\n\ttimeout: 2147483647\t\t\t\t\t// Maximum time to wait for intra to give a 2xx response before throwing an error\n}\nconst api = new API(clientUID, clientSecret, defaultOptions)\n\nconst response: Response = await api.get('/v2/achievements')\nconsole.log(response)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodam-coding-college%2F42-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodam-coding-college%2F42-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodam-coding-college%2F42-connector/lists"}