{"id":23416243,"url":"https://github.com/jarvis394/glitch-api","last_synced_at":"2025-04-12T08:52:49.478Z","repository":{"id":35127894,"uuid":"210167354","full_name":"jarvis394/glitch-api","owner":"jarvis394","description":"Library for using Glitch API ⚙️","archived":false,"fork":false,"pushed_at":"2023-01-07T09:58:19.000Z","size":1805,"stargazers_count":17,"open_issues_count":22,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T08:52:43.833Z","etag":null,"topics":["api","glitch","nodejs","sdk"],"latest_commit_sha":null,"homepage":"https://glapi.ml","language":"TypeScript","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/jarvis394.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-22T15:11:21.000Z","updated_at":"2024-03-14T08:39:54.000Z","dependencies_parsed_at":"2023-01-15T14:23:08.483Z","dependency_job_id":null,"html_url":"https://github.com/jarvis394/glitch-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvis394%2Fglitch-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvis394%2Fglitch-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvis394%2Fglitch-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarvis394%2Fglitch-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarvis394","download_url":"https://codeload.github.com/jarvis394/glitch-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"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":["api","glitch","nodejs","sdk"],"created_at":"2024-12-22T22:14:06.805Z","updated_at":"2025-04-12T08:52:49.460Z","avatar_url":"https://github.com/jarvis394.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## glitch-api\n\n[![GitHub package.json dynamic](https://img.shields.io/github/package-json/version/jarvis394/glitch-api)](https://www.npmjs.com/package/glitch-api)\n[![CircleCI](https://circleci.com/gh/jarvis394/glitch-api/tree/master.svg?style=shield)](https://circleci.com/gh/jarvis394/glitch-api/tree/master)\n[![npm bundle size](https://img.shields.io/bundlephobia/min/glitch-api?label=size)](https://www.npmjs.com/package/glitch-api)\n\nA Node.js module that allows you to easily interact with the Glitch API\n\n| 📖 [Documentation](https://glapi.ml/globals) | ✨ [Examples](https://github.com/jarvis394/glitch-api/tree/master/docs/examples/) |\n| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |\n\n## Features\n\n- 99% coverage of the **known** Glitch API\n- Uses **TypeScript** that provides hints in editor, type checking, etc.\n- **Supports WebSocket connection to the Glitch editor**\n- Support for authorization\n- Only two dependencies: `node-fetch` and `algoliasearch`\n- Class abstraction\n- Works with both API versions\n\n###### _Warning: this module uses unstable API that hasn't been officially released yet. Described only world-open methods from [this unofficial site](https://glitchapi.glitch.me) and my researches_\n\n## Installation\n\n\u003e **[Node.js](https://nodejs.org/) 8.0.0 or newer is required**\n\n##### NPM\n\n```\nnpm i glitch-api -s\n```\n\n## Example usage\n\n```javascript\n// Require using ES6 syntax\nimport { Glitch } from 'glitch-api'\n\n// Or using old fancy style\nconst { Glitch } = require('glitch-api')\n\n// Init main class\nconst glitch = new Glitch({ token: 'xxx' })  // Put here your Glitch token or use glitch.setAnonToken()\nconst { api } = glitch\n\n// Get a user profile\napi.users.get({ id: 1 }).then(user =\u003e console.log) // → User\n```\n\n## ❗ Migration from 2.x to 3.x\n\n- Any search method now follows the same syntax:\n  ```\n  .search(s: string) → Algolia result\n  ```\n- Remixing a project doesn't return `joinLink`. Now it is a `Project` instance. Consider getting project data with token via `api.projects.get()`\n- Token is absolutely required. If you don't have a token, consider using `Glitch.setAnonToken()`. For more info, see [examples/anonymous.js](https://github.com/jarvis394/glitch-api/blob/master/docs/examples/anonymous.js)\n\n## Q\u0026A\n\n### How do I get Glitch token?\n\nPaste the following code to the browser's console on the Glitch editor page:\n\n```javascript\n(JSON.parse(localStorage.getItem('cachedUser'))).persistentToken\n```\n\nAlso you can use `Glitch.setAnonToken() → Promise\u003cstring\u003e` method to login as an anonymous user and use its token.\n\n___\n### Why *\\*api-method\\** is not implemented?\n\nBecause I'm also human and I might not have seen the recent changes in Glitch's API.\nAnyway, PRs are open for anyone :)\n\n___\n### The *\\*api-method\\** is not working.\n\nIt could be that Glitch devs removed the support for that method. Or it's just a my fault.\nOpen a new issue and describe what's happend.\n\n## Contribution\n\nFeel free to open new Pull request or an issue!\n\n## Credits\n\nMade by jarvis394 with ♥️\n\n- VK: **[@tarnatovski](https://vk.com/tarnatovski)**\n- git: **[@jarvis394](https://github.com/jarvis394)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvis394%2Fglitch-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarvis394%2Fglitch-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarvis394%2Fglitch-api/lists"}