# API documentation

## `public class Indigo`

A class which simplifies access to the FutureGateway API

## `public static void init(String url)`

A method must be called in the application class of your app

* **Parameters:** `url` — domain or IP address of the FutureGateway instance

## `public static void init(String url, String username)`

A method must be called in the application class of your app - only for debug purposes

* **Parameters:**
  * `url` — domain or IP address of the FutureGateway instance
  * `username` — provided username to init the library. It should be gathered from the API

## `public static void getTasks(String status, TasksCallback callback)`

Gets all status assigned to given user and filtered by status

* **Parameters:**
  * `status` — results will be filtered based on provided status
  * `callback` — a callback to notify about the result of the operation

## `public static void getTasks(TasksCallback callback)`

Gets all tasks assigned to authenticated user

* **Parameters:** `callback` — a callback to notify about the result of the operation

## `public static void getTasks(String application, String status, TasksCallback callback)`

Gets all tasks related with given user and application filtered by status

* **Parameters:**
  * `application` — results will be filtered basing on the application name
  * `status` — results will be filtered based on the provided status
  * `callback` — a callback to notify about the result of the operation

## `public static void getTask(int taskId, TaskDetailsCallback callback)`

Gets details about task

* **Parameters:**
  * `taskId` — id of the task which should be obtained
  * `callback` — a callback to notify about the result of the operation

## `public static void createTask(Task newTask, TaskCreationCallback callback)`

Executing the task

* **Parameters:**
  * `newTask` — a task to execute
  * `callback` — a callback to notify about the result of the operation

## `public static void getApplications(ApplicationsCallback callback)`

Quering all applications

* **Parameters:**
  * `callback` — a callback to notify about the result of the operation

## `public static void getApplications(String appName, ApplicationsCallback callback)`

Quering all applications by application's name

* **Parameters:**
  * `appName` — an application's name on the FG instance
  * `callback` — a callback to notify about the result of the operation

## `public static void getApplications(int appId, ApplicationsCallback callback)`

Quering all applications by application's id

* **Parameters:**
  * `appId` — an application's id on the FG instance
  * `callback` — a callback to notify about the result of the operation


---

# 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://indigo-dc.gitbook.io/omt-android/api-documentation.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.
