# API

The PrivateChats API is a work-in-progress.&#x20;

### Setup

{% tabs %}
{% tab title="Manual Setup" %}
1\. Download the latest API release from [the repo](https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI/).

2\. Add the API jar as a dependency in your projects.

3\. Don't package or shade the API into your plugin jar, it must remain seperate. PrivateChats includes the API.

4\. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.

5\. The API is now ready to be used in your project.
{% endtab %}

{% tab title="Maven Setup" %}

1. Add the repository to your pom.xml

```xml
<repository>
  <id>ryanmood-repo</id>
  <url>https://repo.ryanmood.me/releases</url>
</repository>
```

2. Add the dependency to your pom.xml, ensuring that `<scope>` is always `provided`.

```xml
<dependency>
  <groupId>me.ryanmood</groupId>
  <artifactId>PrivateChatsAPI</artifactId>
  <version>BETA-0.1</version>
  <scope>provided</scope>
</dependency>
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. The API is now ready to be used.
   {% endtab %}

{% tab title="Gradle Setup" %}

1. Add the repository:

```gradle
repositories {
    mavenCentral()
    maven("https://repo.ryanmood.me/releases/")
}
```

2. Add the dependency (compileOnly is required to ensure that the API isn't packaged into your plugin):

```gradle
dependencies {
    implementation("me.ryanmood", "PrivateChatsAPI", "BETA-0.1", "compileOnly")
}
```

3. Add PrivateChats as a depend or softdepend in your plugin. For example for Bukkit/Spigot `plugin.yml`: `softdepend: [PrivateChats]`.
4. Ensure that PrivateChat's package is excluded from any shading plugins.
5. The API is now ready to be used.
   {% endtab %}
   {% endtabs %}

{% embed url="<https://repo.ryanmood.me/javadoc/releases/me/ryanmood/PrivateChatsAPI/BETA-0.1>" %}
Java Docs for the API.
{% endembed %}

{% embed url="<https://github.com/RyanMoodGAMING/PrivateChatsAPI>" %}
GitHub Repository for the API
{% endembed %}

{% embed url="<https://repo.ryanmood.me/#/releases/me/ryanmood/PrivateChatsAPI>" %}
The Repo for the API.
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ryanmood.me/privatechats/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
