# Getting The API

{% tabs %}
{% tab title="Maven" %}
You need to add the dependency to your `pom.xml`.

```xml
<repository>
  <id>reposilite-repository-releases</id>
  <name>Reposilite Repository</name>
  <url>https://repo.athlas.club/releases</url>
</repository>
```

```xml
<dependency>
  <groupId>me.gurwi</groupId>
  <artifactId>InventoryTrackerAPI</artifactId>
  <version>1.0.2</version>
</dependency>
```

{% endtab %}

{% tab title="Gradle (Groovy)" %}
You need to add the dependency to your `build.gradle`.

```gradle
maven {
    name "athlasDevRepositoryReleases"
    url "https://repo.athlas.club/releases"
}
```

```
compileOnly "me.gurwi:InventoryTrackerAPI:1.0.2"
```

{% endtab %}

{% tab title="Gradle (Kotlin)" %}
You need to add the dependency to your `build.gradle.kts`.

```gradle
maven {
    name = "reposiliteRepositoryReleases"
    url = uri("https://repo.athlas.club/releases")
}
```

```gradle
compileOnly("me.gurwi:InventoryTrackerAPI:1.0.2")
```

{% endtab %}
{% endtabs %}

```java
package me.gurwi.example;

import me.gurwi.inventorytracker.api.InventoryTrackerAPI;
import org.bukkit.plugin.java.JavaPlugin;

public final class InventoryTrackerExample extends JavaPlugin {

    private InventoryTrackerAPI inventoryTrackerAPI;

    @Override
    public void onEnable() {
        inventoryTrackerAPI = InventoryTrackerAPI.getAPI();

        if (inventoryTrackerAPI == null) {
            getLogger().severe("Inventory tracker is not loaded!");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

    }

    @Override
    public void onDisable() {

    }

    public InventoryTrackerAPI getInventoryTrackerAPI() {
        return inventoryTrackerAPI;
    }

}
```


---

# 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://gurwiworks.gitbook.io/inventorytracker-wiki/developers/java-api/getting-the-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.
