{"id":16974641,"url":"https://github.com/alttiri/meganz-api","last_synced_at":"2026-05-04T01:33:56.913Z","repository":{"id":104053050,"uuid":"246210632","full_name":"AlttiRi/meganz-api","owner":"AlttiRi","description":"Unfinished Mega.nz API library. Only some of methods are implemented.","archived":false,"fork":false,"pushed_at":"2022-10-18T22:10:15.000Z","size":366,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T06:06:03.683Z","etag":null,"topics":["javascript"],"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/AlttiRi.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":"2020-03-10T04:47:45.000Z","updated_at":"2023-01-27T12:39:27.000Z","dependencies_parsed_at":"2023-07-26T04:17:07.798Z","dependency_job_id":null,"html_url":"https://github.com/AlttiRi/meganz-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlttiRi/meganz-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlttiRi%2Fmeganz-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlttiRi%2Fmeganz-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlttiRi%2Fmeganz-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlttiRi%2Fmeganz-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlttiRi","download_url":"https://codeload.github.com/AlttiRi/meganz-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlttiRi%2Fmeganz-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: 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":["javascript"],"created_at":"2024-10-14T01:07:21.893Z","updated_at":"2026-05-04T01:33:56.898Z","avatar_url":"https://github.com/AlttiRi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meganz-api\n\n**Uncomplited, demo Mega.nz JS library.**\n\nIt works, but supports only some features: \n- listing,\n- thumbnails/previews downloading.\n\n---\n\n- `npm ci`\n- `npm run build`\n\nTo open a web demo run a http server in the root folder, then open a html file from `_examples-browser` directory.\n\nOr try to use a Node.js demo from `_examples-node` directory. (Note: remove `import * as URLS from \"./test-urls-private.js\";` first and use your own Mega URL.)\n\n---\n\n### The example usage\n\nDownloading of thumbnails:\n\nhttps://github.com/AlttiRi/meganz-api/blob/master/_examples-node/ex-3.3-ok.js:\n```js\nimport {saveFile} from \"./util-node.js\";\nimport {Nodes} from \"../src/mega.js\";\n\nconst nodeArray = await Nodes.nodes(\"https://mega.nz/...\"); // Use your own URL\n\nconst promises = [];\nlet i = 0;\nfor (const node of nodeArray) {\n    if (Nodes.isMediaNode(node)) {\n        const index = (++i).toString().padStart(3, \"0\");\n        console.log(`${index} ${node.name}`);\n        const filename = `thumbnail-${index}-${node.id}.jpg`;\n        const downloaded = node.getThumbnail()\n            .then(thumb =\u003e {\n                void saveFile(thumb, filename, node.mtime);\n            });\n        promises.push(downloaded);\n    }\n}\nawait Promise.all(promises);\n```\n\n- Multiple API requests are grouped within one API request when it's possible.\n- Multiple thumbnails data are downloaded within one download request when it's possible.\n- All similar HTTP connections are performed concurrently, but not more that 16 at one moment. See `Semaphore` class.\n- Also it uses custom (much faster (up to x9 times)) convertation from `ArrayBuffer` to `WordArray` of CryptoJS library. See `/src/crypto.js`.\n\n---\n\n- 2022.02.20: This private repo was turned into public one.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttiri%2Fmeganz-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falttiri%2Fmeganz-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttiri%2Fmeganz-api/lists"}