{"id":20670897,"url":"https://github.com/orsifrancesco/getgithub","last_synced_at":"2026-04-18T00:31:24.670Z","repository":{"id":116004121,"uuid":"522331741","full_name":"orsifrancesco/getGithub","owner":"orsifrancesco","description":"Just a snippet of code to get Github data by user, repo and parameters","archived":false,"fork":false,"pushed_at":"2022-08-07T21:47:07.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T00:04:12.748Z","etag":null,"topics":["api","github","github-api","html","javascript","js","snippet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orsifrancesco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-07T21:46:29.000Z","updated_at":"2022-08-07T21:47:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e6a566b-8704-4f79-b169-eef99d8527ab","html_url":"https://github.com/orsifrancesco/getGithub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/orsifrancesco/getGithub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2FgetGithub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2FgetGithub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2FgetGithub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2FgetGithub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orsifrancesco","download_url":"https://codeload.github.com/orsifrancesco/getGithub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orsifrancesco%2FgetGithub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31951231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","github","github-api","html","javascript","js","snippet"],"created_at":"2024-11-16T20:24:01.959Z","updated_at":"2026-04-18T00:31:24.598Z","avatar_url":"https://github.com/orsifrancesco.png","language":"JavaScript","funding_links":["https://www.paypal.com/donate/?business=5EL4L2LDYVH96","https://paypal.me/orsifrancesco)--"],"categories":[],"sub_categories":[],"readme":"\n\u003ch2 align=\"center\"\u003egetGithub\u003c/h2\u003e\n\u003ch3 align=\"center\"\u003eJust a snippet of code to get Github data by user, repo and parameters\u003c/h3\u003e\n\n### [🎮 Demo on console.log()](https://orsifrancesco.github.io/getGithub)\n### ⚖️ Licensed under MIT\n### 🤓 Author [@orsifrancesco](https://twitter.com/orsifrancesco)\n### ☕ [Offer me a coffee](https://www.paypal.com/donate/?business=5EL4L2LDYVH96)\n\u003c!--### ☕ [Offer me a coffee](https://paypal.me/orsifrancesco)--\u003e\n\n\u003chr/\u003e\n\n## 📦 Just a snippet of code\n\n```js\nfunction getGithub({ user, id, parameter }) {\n\treturn new Promise((resolve, reject) =\u003e {\n\n\t\tif (!user) resolve(false);\n\t\tconst url = `https://api.github.com/search/repositories?q=user:${user}`;\n\t\tfetch(url)\n\t\t\t.then(x =\u003e x?.json())\n\t\t\t.then(y =\u003e {\n\t\t\t\tif (!id) resolve(y?.items);\n\t\t\t\tif (!parameter) resolve(y?.items?.find(el =\u003e el.id === id));\n\t\t\t\tresolve(y?.items?.find(el =\u003e el.id === id)?.[parameter]);\n\t\t\t});\n\t});\n\n}\n\nasync function fetchData() {\n\n\tconst getUserData = await getGithub({ user: 'orsifrancesco' });\n\tconst getRepoData = await getGithub({ user: 'orsifrancesco', id: 265545485 });\n\tconst getRepoParameter = await getGithub({ user: 'orsifrancesco', id: 265545485, parameter: 'watchers' });\n\n\tconsole.log({\n\t\tgetUserData,\n\t\tgetRepoData,\n\t\tgetRepoParameter\n\t});\n\n}\n\nfetchData();\n```\n\n## 🕹️ JSON output\n\n```json\n{\n    \"getUserData\": [\n        {\n            \"id\": 265545485,\n            \"node_id\": \"MDEwOlJlcG9zaXRvcnkyNjU1NDU0ODU=\",\n            \"name\": \"instagram-without-api\",\n\t\t    ...\n            \"watchers\": 63\n        },\n        {\n            \"id\": 519609940,\n            \"node_id\": \"R_kgDOHvieVA\",\n\t\t    ...\n            \"forks\": 12,\n            \"watchers\": 53\n        },\n        {\n            \"id\": 425524054,\n            \"node_id\": \"R_kgDOGVz7Vg\",\n            ...\n        }\n    ],\n    \"getRepoData\": {\n        \"id\": 265545485,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkyNjU1NDU0ODU=\",\n        \"name\": \"instagram-without-api\",\n        \"full_name\": \"orsifrancesco/instagram-without-api\",\n        \"private\": false,\n\t    ...\n    \"visibility\": \"public\",\n        \"forks\": 2,\n        \"open_issues\": 0,\n        \"watchers\": 63,\n        \"default_branch\": \"master\",\n        \"score\": 1\n    },\n    \"getRepoParameter\": 63\n}\n```\n\n## ⚖️ License\n\nLicensed under MIT\n\n\n## ☕ About\n\nAny feedback to [@orsifrancesco](https://twitter.com/orsifrancesco) and/or [coffee](https://www.paypal.com/donate/?business=5EL4L2LDYVH96) is welcome :) ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsifrancesco%2Fgetgithub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forsifrancesco%2Fgetgithub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forsifrancesco%2Fgetgithub/lists"}