{"id":21148667,"url":"https://github.com/rainnny7/pelican4j","last_synced_at":"2025-07-09T07:34:11.225Z","repository":{"id":236716084,"uuid":"792934181","full_name":"Rainnny7/Pelican4J","owner":"Rainnny7","description":"A Java API wrapper for the Pelican/Pterodactyl panel API. Mirror of code maintained at https://git.rainnny.club/Rainnny/Pelican4J","archived":false,"fork":false,"pushed_at":"2024-10-21T14:02:22.000Z","size":61,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-21T23:04:12.105Z","etag":null,"topics":["api","java","library","panel","pelican","pterodactyl"],"latest_commit_sha":null,"homepage":"https://rainnny.club","language":"Java","has_issues":false,"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/Rainnny7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"buy_me_a_coffee":"rainnny7"}},"created_at":"2024-04-28T00:52:38.000Z","updated_at":"2024-05-28T05:32:08.000Z","dependencies_parsed_at":"2024-04-28T08:55:03.848Z","dependency_job_id":"2a70a5de-008c-45f5-ad30-5ca54eb3cacd","html_url":"https://github.com/Rainnny7/Pelican4J","commit_stats":null,"previous_names":["rainnny7/pelican4j"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rainnny7%2FPelican4J","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rainnny7%2FPelican4J/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rainnny7%2FPelican4J/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rainnny7%2FPelican4J/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rainnny7","download_url":"https://codeload.github.com/Rainnny7/Pelican4J/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225514341,"owners_count":17483515,"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","java","library","panel","pelican","pterodactyl"],"created_at":"2024-11-20T09:27:59.977Z","updated_at":"2024-11-20T09:28:00.656Z","avatar_url":"https://github.com/Rainnny7.png","language":"Java","funding_links":["https://buymeacoffee.com/rainnny7"],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://cdn.rainnny.club/X5auKsL4aMHL.png\" alt=\"Pelican\" width=\"132\" align=\"right\"\u003e\n\n[![MIT License](https://img.shields.io/badge/License-MIT-limegreen.svg?style=plastic)](https://choosealicense.com/licenses/mit)\n[![Maven Publish Workflow](https://git.rainnny.club/Rainnny/Pelican4J/actions/workflows/maven-publish.yml/badge.svg)](./actions?workflow=maven-publish.yml)\n![Wakatime Hours](https://wakatime.rainnny.club/api/badge/Rainnny/interval:any/project:Pelican4J)\n[![Discord](https://discord.com/api/guilds/827863713855176755/widget.png)](https://discord.gg/p9gzFE2bc6)\n\n\u003e [!IMPORTANT]\n\u003e This API is currently a WIP and is not yet complete.\n\n# 🦅 Pelican4J\nA Java API wrapper for the [Pelican](https://pelican.dev) and [Pterodactyl](https://pterodactyl.io) panel API.\n\n---\n\n# Table of Contents\n- [Installation](#-installation)\n  - [Maven](#maven)\n  - [Gradle (Kotlin DSL)](#gradle-kotlin-dsl)\n- [Getting Started](#-getting-started)\n- [Panel Actions](#-panel-actions)\n  - [Rate Limiting](#-rate-limiting)\n  - [Error Handling](#-error-handling)\n\n---\n\n## 🔬 Installation\nBefore getting started, you must add the dependency to your project.\nBelow you can find the dependency for both [Maven](#maven) and [Gradle](#gradle-kotlin-dsl).\n\n### Maven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eme.braydon\u003c/groupId\u003e\n  \u003cartifactId\u003ePelican4J\u003c/artifactId\u003e\n  \u003cversion\u003eVERSION\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle (Kotlin DSL)\n```kt\nimplementation(\"me.braydon:Pelican4J:VERSION\")\n```\n\n## 🏃‍♂️ Getting Started\nBelow is an example on how to create a client for Pelican **(Ptero is also supported)**, and send an action to the panel.\n\n```java\nPelican4J\u003cPelicanPanelActions\u003e client = Pelican4J.forPelican(ClientConfig.builder()\n        .panelUrl(\"https://pelican.app\")\n        .apiKey(\"YOUR_API_KEY\")\n        .build()); // Create a new Pelican client\n\n// Queuing an action - this will get the node with the ID of 1, and print it's name.\nApplicationNodeActions nodeActions = client.actions().application().nodes();\nnodeActions.getDetails(1).queue(node -\u003e {\n    System.out.println(\"Name of node: \" + node.getName());\n});\n\n// Instantly sending an action\nNode node = nodeActions.getDetails(1).execute();\nSystem.out.println(\"Name of node: \" + node.getName());\n```\n\n## 🔨 Panel Actions\nEvery action that is executed on the panel will return a [PanelAction](./src/main/java/me/braydon/pelican/action/PanelAction.java), this action has several different functions:\n\n- `queue(callback)` - This will allow you to queue an action, and await its response asynchronously.\n- `execute()` - This will immediately execute the action synchronously, and return the result.\n\n### ⌛ Rate Limiting\nWhen an action is being queued, it will try to immediately execute the action, and if a rate limit is hit, that action will be queued to be re-tried later once the rate limit has been lifted. If the action is re-tried more than **25 Times**, it will respond with an error.\n\n### ⚠️ Error Handling\nWhen an error is raised by the panel API, an [PanelAPIException](./src/main/java/me/braydon/pelican/exception/PanelAPIException.java) exception will be thrown.\n\nWhen queuing an action, errors are automatically handled and are printed to the terminal. To handle the error yourself, you can modify the callback function to contain both the response, and the exception:\n```java\nApplicationNodeActions nodeActions = client.actions().application().nodes();\nnodeActions.getDetails(1).queue((node, ex) -\u003e {\n    if (ex != null) {\n        // Handle the error...\n        return;\n    }\n    // ...\n});\n```\n\n---\n\n## YourKit\nYourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications.\nYourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor).\n\n![Yourkit Logo](https://www.yourkit.com/images/yklogo.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainnny7%2Fpelican4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frainnny7%2Fpelican4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frainnny7%2Fpelican4j/lists"}