{"id":20472066,"url":"https://github.com/hywax/gotify-client","last_synced_at":"2025-09-24T23:31:37.678Z","repository":{"id":219286293,"uuid":"748212720","full_name":"hywax/gotify-client","owner":"hywax","description":"Gotify HTTP Client ","archived":false,"fork":false,"pushed_at":"2025-01-14T19:06:11.000Z","size":922,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T20:24:08.475Z","etag":null,"topics":["api-client","client","codegen","gotify","gotify-client","javascript","nodejs","swagger","typescript"],"latest_commit_sha":null,"homepage":"","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/hywax.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-01-25T14:09:59.000Z","updated_at":"2025-01-12T19:05:09.000Z","dependencies_parsed_at":"2024-02-11T20:53:27.580Z","dependency_job_id":"838baa7f-b798-432a-ba45-cdff6a754eac","html_url":"https://github.com/hywax/gotify-client","commit_stats":null,"previous_names":["hywax/gotify-client"],"tags_count":9,"template":false,"template_full_name":"hywax/vite-vanilla-library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hywax%2Fgotify-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hywax%2Fgotify-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hywax%2Fgotify-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hywax%2Fgotify-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hywax","download_url":"https://codeload.github.com/hywax/gotify-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234139244,"owners_count":18785537,"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-client","client","codegen","gotify","gotify-client","javascript","nodejs","swagger","typescript"],"created_at":"2024-11-15T14:18:24.845Z","updated_at":"2025-09-24T23:31:32.145Z","avatar_url":"https://github.com/hywax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![gotify-client](https://raw.githubusercontent.com/hywax/gotify-client/main/public/cover.jpg)](https://github.com/hywax/vitepress-yandex-metrika)\n\n# Gotify Client\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n\nFull-featured HTTP client to work with Gotify API.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eTable of Contents\u003c/b\u003e\u003c/summary\u003e\n\n* [Features](#-features)\n* [Installation](#-installation)\n* [Usage](#-usage)\n    * [Mapping version](#-mapping-version)\n    * [Base](#-base)\n    * [Configuration](#-configuration)\n* [API](#-api)\n  \u003c!-- API-TOC --\u003e\n  * [ApplicationApi](#ApplicationApi)\n  * [ClientApi](#ClientApi)\n  * [CurrentApi](#CurrentApi)\n  * [HealthApi](#HealthApi)\n  * [MessageApi](#MessageApi)\n  * [PluginApi](#PluginApi)\n  * [StreamApi](#StreamApi)\n  * [UserApi](#UserApi)\n  * [VersionApi](#VersionApi)\u003c!-- /API-TOC --\u003e\n* [Advanced](#-advanced)\n    * [Custom client](#-custom-client)\n* [License](#-license)\n\u003c/details\u003e\n\n## 🎯 Features\n\n* 🔥 **Code gen**. The client is fully compliant with the official documentation.\n* 👌 **Slim**. Zero dependencies.\n* ✨ **Runner**. Browser and Node support.\n* 🌐 **Custom Http**. If you need a custom http client, you can swap it out.\n* 🌳 **Tree shaking**. Only use what you need.\n* 🪄️ **TypeScript**. The library is entirely made in typescript\n\n## ✨ Installation\n\n```shell\n# Using pnpm\npnpm add gotify-client -D\n\n# Using yarn\nyarn add gotify-client -D\n\n# Using npm\nnpm install gotify-client -D\n```\n\n## ⚡ Usage\n\n### 🗺️ Mapping version\n\n| Gotify Client | Gotify Server |\n|---------------|---------------|\n| 0.4.0         | 2.4.0         |\n\n### 🚀 Base\n\n```typescript\nimport { GotifyClient } from 'gotify-client'\n\nconst client = new GotifyClient('http://gotify.home', {\n    // You must specify at least 1 key\n    app: 'app_api_key',\n    client: 'client_api_key'\n})\n\nconst message = await gotify.message.createMessage({\n  message: \"Test message!\"\n})\n```\n\n### ⚙️ Configuration\n\nTo execute requests, you need to specify a link to the `host` gotify, as well as pass `api keys`.\n\nIn Gotify there are two token types:\n* `app`: an application is something that sends messages.\n* `client`: a client is something that receives message and manages stuff like creating new tokens or delete messages.\n\n```typescript\nconstructor(host: string, authKeys: {\n  app?: string\n  client?: string\n})\n```\n\n## 🤖 API\n\nThe source documentation is fully described in swagger on the [official website](https://gotify.net/api-docs).\n\n\u003c!-- API --\u003e\n### ApplicationApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getApps` | Return all applications. | `GET /application` |\n| `createApp` | Create an application. | `POST /application` |\n| `updateApplication` | Update an application. | `PUT /application/${id}` |\n| `deleteApp` | Delete an application. | `DELETE /application/${id}` |\n| `uploadAppImage` | Upload an image for an application. | `POST /application/${id}/image` |\n| `removeAppImage` | Deletes an image of an application. | `DELETE /application/${id}/image` |\n| `getAppMessages` | Return all messages from a specific application. | `GET /application/${id}/message` |\n| `deleteAppMessages` | Delete all messages from a specific application. | `DELETE /application/${id}/message` |\n\n### ClientApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getClients` | Return all clients. | `GET /client` |\n| `createClient` | Create a client. | `POST /client` |\n| `updateClient` | Update a client. | `PUT /client/${id}` |\n| `deleteClient` | Delete a client. | `DELETE /client/${id}` |\n\n### CurrentApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `currentUser` | Return the current user. | `GET /current/user` |\n| `updateCurrentUser` | Update the password of the current user. | `POST /current/user/password` |\n\n### HealthApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getHealth` | Get health information. | `GET /health` |\n\n### MessageApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getMessages` | Return all messages. | `GET /message` |\n| `createMessage` | Create a message. | `POST /message` |\n| `deleteMessages` | Delete all messages. | `DELETE /message` |\n| `deleteMessage` | Deletes a message with an id. | `DELETE /message/${id}` |\n\n### PluginApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getPlugins` | Return all plugins. | `GET /plugin` |\n| `getPluginConfig` | Get YAML configuration for Configurer plugin. | `GET /plugin/${id}/config` |\n| `updatePluginConfig` | Update YAML configuration for Configurer plugin. | `POST /plugin/${id}/config` |\n| `disablePlugin` | Disable a plugin. | `POST /plugin/${id}/disable` |\n| `getPluginDisplay` | Get display info for a Displayer plugin. | `GET /plugin/${id}/display` |\n| `enablePlugin` | Enable a plugin. | `POST /plugin/${id}/enable` |\n\n### StreamApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `streamMessages` | Websocket, return newly created messages. | `GET /stream` |\n\n### UserApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getUsers` | Return all users. | `GET /user` |\n| `createUser` | Create a user. | `POST /user` |\n| `getUser` | Get a user. | `GET /user/${id}` |\n| `updateUser` | Update a user. | `POST /user/${id}` |\n| `deleteUser` | Deletes a user. | `DELETE /user/${id}` |\n\n### VersionApi\n\n| Method | Description | Http request |\n|--------|-------------|--------------|\n| `getVersion` | Get version information. | `GET /version` |\n\n\u003c!-- /API --\u003e\n\n## ⚡ Advanced\n\n### 🪄 Custom client\n```typescript\nimport { MessageApi } from 'gotify-client'\n\nconst httpClient = new CustomHttpClient()\nconst messageApi = new MessageApi(httpClient)\n\nconst message = await messageApi.createMessage({\n    message: \"Test message!\"\n})\n```\n\n## 📄 License\n\nThis template was created under the [MIT License](LICENSE).\n\n[npm-version-src]: https://img.shields.io/npm/v/gotify-client/latest.svg?logo=hackthebox\u0026color=00ADD8\u0026logoColor=fff\n[npm-version-href]: https://npmjs.com/package/gotify-client\n[npm-downloads-src]: https://img.shields.io/npm/dm/gotify-client.svg?colorB=00ADD8\n[npm-downloads-href]: https://npmjs.com/package/gotify-client\n[license-src]: https://img.shields.io/badge/License-MIT-00ADD8?logo=opensourceinitiative\u0026logoColor=fff\n[license-href]: https://npmjs.com/package/gotify-client\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhywax%2Fgotify-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhywax%2Fgotify-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhywax%2Fgotify-client/lists"}