# Getting Started

### How do I import the API?

To integrate the Wale API into your project, we recommend using Gradle or Maven. **Do not shade it**.

1. **First, you need to register the repository server by using the following URL:**

{% tabs %}
{% tab title="Gradle (Groovy)" %}

```gradle
maven {
    name "waleRepositoryReleases"
    url "https://repo.walecloud.com/releases"
}
```

{% endtab %}

{% tab title="Maven" %}

```xml
<repositories>
    <repository>
        <id>waleRepositoryReleases</id>
        <name>waleRepositoryReleases</name>
        <url>https://repo.walecloud.com/releases</url>
    </repository>
</repositories>
```

{% endtab %}
{% endtabs %}

2. **After that, add the dependency to your project.**

You can always check the latest version on the [repository server](https://repo.walecloud.com/#/releases/at/stefan/wale-api). For this documentation, version `1.5.8` is used.

{% tabs %}
{% tab title="Gradle (Groovy)" %}

```gradle
dependencies {
    compileOnly "at.stefan:wale-api:VERSION"
}
```

{% endtab %}

{% tab title="Maven" %}

```xml
<dependencies>
    <dependency>
        <groupId>at.stefan</groupId>
        <artifactId>wale-api</artifactId>
        <version>VERSION</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
```

{% endtab %}
{% endtabs %}

{% hint style="danger" %}
Important: **Do not** shade the API yourself; **depend** on the **Wale plugin**, which always includes the **latest** API version.
{% endhint %}

### How do I now use the API in my project?

{% hint style="warning" %}
Create **only one instance** per plugin. If you have multiple plugins using the API, try to create only one instance and centralize it, as it can **save** on **traffic**.
{% endhint %}

```java
// An example of how to initialize the API
public class Test extends JavaPlugin {
    
    @Getter
    private WaleAPI waleAPI;
    
    @Override
    public void onEnable() {
        waleAPI = new WaleAPI();
    }
}
```


---

# 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.walecloud.com/api-documentation/getting-started.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.
