{"id":26123058,"url":"https://github.com/mmrlapp/webui-api","last_synced_at":"2025-04-13T13:50:48.965Z","repository":{"id":274476977,"uuid":"923036249","full_name":"MMRLApp/WebUI-API","owner":"MMRLApp","description":"A library designed to provide an interface for interacting with the MMRL environment.","archived":false,"fork":false,"pushed_at":"2025-02-14T14:12:19.000Z","size":354,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T17:53:04.673Z","etag":null,"topics":["apatch","kernelsu","magisk","mmrl","webui"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/mmrl","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/MMRLApp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-27T14:36:32.000Z","updated_at":"2025-02-25T02:22:29.000Z","dependencies_parsed_at":"2025-01-27T15:39:29.740Z","dependency_job_id":"718a2478-5157-4b30-9026-b47f060bd22f","html_url":"https://github.com/MMRLApp/WebUI-API","commit_stats":null,"previous_names":["mmrlapp/webui-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMRLApp%2FWebUI-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMRLApp%2FWebUI-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMRLApp%2FWebUI-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MMRLApp%2FWebUI-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MMRLApp","download_url":"https://codeload.github.com/MMRLApp/WebUI-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248724589,"owners_count":21151559,"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":["apatch","kernelsu","magisk","mmrl","webui"],"created_at":"2025-03-10T15:19:21.981Z","updated_at":"2025-04-13T13:50:48.926Z","avatar_url":"https://github.com/MMRLApp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MMRL JavaScript Library for WebUI\n\nThis is a JavaScript library designed to provide an interface for interacting with the MMRL environment. It includes classes and types to facilitate the integration and manipulation of MMRL objects.\n\n## Table of Contents\n\n- [MMRL JavaScript Library for WebUI](#mmrl-javascript-library-for-webui)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Types](#types)\n    - [MMRLObjectAccessor](#mmrlobjectaccessor)\n    - [MMRLInterface](#mmrlinterface)\n    - [FileSystem](#filesystem)\n    - [VersionInterface](#versioninterface)\n    - [Toast](#toast)\n\n## Installation\n\nTo install MMRL-V4, clone the repository and install the dependencies:\n\n```sh\nnpm install mmrl\n```\n\n## Usage\n\n### Types\n\nThe `types.ts` file defines various types used throughout the library:\n\n```typescript\nexport type Scope = `$${string}`;\nexport type ObjectScope = Scope | object;\nexport type MimeType = `${string}/${string}`;\n\nexport interface Manager {\n    name: string;\n    versionName: string;\n    versionCode: number;\n}\n```\n\n### MMRLObjectAccessor\n\nThe `MMRLObjectAccessor` class provides a base class for accessing MMRL objects. It handles the parsing of the scope and provides utility methods for interacting with the MMRL environment.\n\nExample usage:\n\n```typescript\nimport { MMRLObjectAccessor } from \"mmrl\";\n\nconst accessor = new MMRLObjectAccessor(\"net-switch\");\nconsole.log(accessor.interface);\n```\n\n### MMRLInterface\n\nThe `MMRLInterface` class extends `MMRLObjectAccessor` to provide additional functionality specific to MMRL. It includes methods for injecting stylesheets, accessing manager information, and interacting with the MMRL environment.\n\nExample usage:\n\n```typescript\nimport { MMRLInterfaceFactory } from \"mmrl\";\n\nconst mmrl = MMRLInterfaceFactory(\"net-switch\");\nmmrl.injectStyleSheets();\nconsole.log(mmrl.manager);\n```\n\n### FileSystem\n\nThe `FileSystem` class provides methods for interacting with the file system within the MMRL environment. It includes methods for reading, writing, and deleting files.\n\nExample usage:\n\n```typescript\nimport { FileSystem } from \"mmrl\";\n\nconst fs = new FileSystem(\"net-switch\");\nfs.write(\"example.txt\", \"Hello, MMRL!\");\nconst content = fs.read(\"example.txt\");\nconsole.log(content);\nfs.delete(\"example.txt\");\n```\n\n### VersionInterface\n\nThe `VersionInterface` class provides access to version information about the MMRL environment. It includes properties for application and root configuration details.\n\nExample usage:\n\n```typescript\nimport { mmrl } from \"mmrl\";\n\nconsole.log(mmrl.app.versionName);\nconsole.log(mmrl.root.platform);\n```\n\n### Toast\n\nThe `Toast` class provides methods for creating and displaying native toast notifications within the MMRL environment. It includes methods for setting text, duration, gravity, and showing or canceling the toast.\n\nExample usage:\n\n```typescript\nimport { Toast } from \"mmrl\";\n\nconst toast = Toast.makeText(\"Hello, MMRL!\", Toast.LENGTH_LONG);\ntoast.show();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmrlapp%2Fwebui-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmrlapp%2Fwebui-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmrlapp%2Fwebui-api/lists"}