Skip to content

Latest commit

 

History

History
312 lines (248 loc) · 13.9 KB

ResourcesApi.md

File metadata and controls

312 lines (248 loc) · 13.9 KB

ResourcesApi

All URIs are relative to https://api.dofusdu.de

Method HTTP request Description
getAllItemsResourcesList GET /{game}/v1/{language}/items/resources/all List All Resources
getItemsResourceSearch GET /{game}/v1/{language}/items/resources/search Search Resources
getItemsResourcesList GET /{game}/v1/{language}/items/resources List Resources
getItemsResourcesSingle GET /{game}/v1/{language}/items/resources/{ankama_id} Single Resources

getAllItemsResourcesList

ListItems getAllItemsResourcesList(language, game, sortLevel, filterMinLevel, filterMaxLevel, acceptEncoding, filterTypeNameId)

List All Resources

Retrieve all resource items with one request. This endpoint is just an alias for the a list with disabled pagination (page[size]=-1) and all fields[type] set. If you want everything unfiltered, delete the other query parameters. Be careful with testing or (god forbid) using /all in your browser, the returned json is huge and will slow down the browser! Tip: set the HTTP Header 'Accept-Encoding: gzip' for saving bandwidth. You will need to uncompress it on your end. Example with cURL: ``` curl -sH 'Accept-Encoding: gzip' <api-endpoint> | gunzip - ```

Example

// Import classes:
import com.dofusdude.client.ApiClient;
import com.dofusdude.client.ApiException;
import com.dofusdude.client.Configuration;
import com.dofusdude.client.models.*;
import com.dofusdude.client.api.ResourcesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.dofusdu.de");

    ResourcesApi apiInstance = new ResourcesApi(defaultClient);
    String language = "en"; // String | a valid language code
    String game = "dofus3"; // String | game main 'dofus3' or beta channel 'dofus3beta'
    String sortLevel = "asc"; // String | sort the resulting list by level, default unsorted
    Integer filterMinLevel = 160; // Integer | only results which level is equal or above this value
    Integer filterMaxLevel = 190; // Integer | only results which level is equal or below this value
    String acceptEncoding = "gzip"; // String | optional compression for saving bandwidth
    Set<String> filterTypeNameId = Arrays.asList(); // Set<String> | multi-filter results with the english type name. Add with \"wood\" or \"+wood\" and exclude with \"-wood\".
    try {
      ListItems result = apiInstance.getAllItemsResourcesList(language, game, sortLevel, filterMinLevel, filterMaxLevel, acceptEncoding, filterTypeNameId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ResourcesApi#getAllItemsResourcesList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
language String a valid language code [enum: en, fr, de, es, pt]
game String game main 'dofus3' or beta channel 'dofus3beta' [enum: dofus3, dofus3beta]
sortLevel String sort the resulting list by level, default unsorted [optional] [enum: asc, desc]
filterMinLevel Integer only results which level is equal or above this value [optional]
filterMaxLevel Integer only results which level is equal or below this value [optional]
acceptEncoding String optional compression for saving bandwidth [optional] [enum: gzip]
filterTypeNameId Set<String> multi-filter results with the english type name. Add with &quot;wood&quot; or &quot;+wood&quot; and exclude with &quot;-wood&quot;. [optional]

Return type

ListItems

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -
400 -
404 -

getItemsResourceSearch

List<ListItem> getItemsResourceSearch(language, game, query, filterMinLevel, filterMaxLevel, limit, filterTypeNameId)

Search Resources

Search in all names and descriptions of resource items with a query.

Example

// Import classes:
import com.dofusdude.client.ApiClient;
import com.dofusdude.client.ApiException;
import com.dofusdude.client.Configuration;
import com.dofusdude.client.models.*;
import com.dofusdude.client.api.ResourcesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.dofusdu.de");

    ResourcesApi apiInstance = new ResourcesApi(defaultClient);
    String language = "en"; // String | a valid language code
    String game = "dofus3"; // String | game main 'dofus3' or beta channel 'dofus3beta'
    String query = "snowdew"; // String | case sensitive search query
    Integer filterMinLevel = 150; // Integer | only results which level is equal or above this value
    Integer filterMaxLevel = 200; // Integer | only results which level is equal or below this value
    Integer limit = 8; // Integer | maximum number of returned results
    Set<String> filterTypeNameId = Arrays.asList(); // Set<String> | multi-filter results with the english type name. Add with \"wood\" or \"+wood\" and exclude with \"-wood\".
    try {
      List<ListItem> result = apiInstance.getItemsResourceSearch(language, game, query, filterMinLevel, filterMaxLevel, limit, filterTypeNameId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ResourcesApi#getItemsResourceSearch");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
language String a valid language code [enum: en, fr, de, es, pt]
game String game main 'dofus3' or beta channel 'dofus3beta' [enum: dofus3, dofus3beta]
query String case sensitive search query
filterMinLevel Integer only results which level is equal or above this value [optional]
filterMaxLevel Integer only results which level is equal or below this value [optional]
limit Integer maximum number of returned results [optional] [default to 8]
filterTypeNameId Set<String> multi-filter results with the english type name. Add with &quot;wood&quot; or &quot;+wood&quot; and exclude with &quot;-wood&quot;. [optional]

Return type

List<ListItem>

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -
400 -
404 -

getItemsResourcesList

ListItems getItemsResourcesList(language, game, sortLevel, filterMinLevel, filterMaxLevel, pageSize, pageNumber, fieldsItem, filterTypeNameId)

List Resources

Retrieve a list of resource items.

Example

// Import classes:
import com.dofusdude.client.ApiClient;
import com.dofusdude.client.ApiException;
import com.dofusdude.client.Configuration;
import com.dofusdude.client.models.*;
import com.dofusdude.client.api.ResourcesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.dofusdu.de");

    ResourcesApi apiInstance = new ResourcesApi(defaultClient);
    String language = "en"; // String | a valid language code
    String game = "dofus3"; // String | game main 'dofus3' or beta channel 'dofus3beta'
    String sortLevel = "asc"; // String | sort the resulting list by level, default unsorted
    Integer filterMinLevel = 160; // Integer | only results which level is equal or above this value
    Integer filterMaxLevel = 190; // Integer | only results which level is equal or below this value
    Integer pageSize = 10; // Integer | size of the results from the list. -1 disables pagination and gets all in one response.
    Integer pageNumber = 1; // Integer | page number based on the current page[size]. So you could get page 1 with 8 entrys and page 2 would have entries 8 to 16.
    Set<String> fieldsItem = Arrays.asList(); // Set<String> | adds fields from their detail endpoint to the item list entries. Multiple comma separated values allowed.
    Set<String> filterTypeNameId = Arrays.asList(); // Set<String> | multi-filter results with the english type name. Add with \"wood\" or \"+wood\" and exclude with \"-wood\".
    try {
      ListItems result = apiInstance.getItemsResourcesList(language, game, sortLevel, filterMinLevel, filterMaxLevel, pageSize, pageNumber, fieldsItem, filterTypeNameId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ResourcesApi#getItemsResourcesList");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
language String a valid language code [enum: en, fr, de, es, pt]
game String game main 'dofus3' or beta channel 'dofus3beta' [enum: dofus3, dofus3beta]
sortLevel String sort the resulting list by level, default unsorted [optional] [enum: asc, desc]
filterMinLevel Integer only results which level is equal or above this value [optional]
filterMaxLevel Integer only results which level is equal or below this value [optional]
pageSize Integer size of the results from the list. -1 disables pagination and gets all in one response. [optional]
pageNumber Integer page number based on the current page[size]. So you could get page 1 with 8 entrys and page 2 would have entries 8 to 16. [optional]
fieldsItem Set<String> adds fields from their detail endpoint to the item list entries. Multiple comma separated values allowed. [optional] [enum: recipe, description, conditions, effects]
filterTypeNameId Set<String> multi-filter results with the english type name. Add with &quot;wood&quot; or &quot;+wood&quot; and exclude with &quot;-wood&quot;. [optional]

Return type

ListItems

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -
400 -
404 -

getItemsResourcesSingle

Resource getItemsResourcesSingle(language, ankamaId, game)

Single Resources

Retrieve a specific resource item with id.

Example

// Import classes:
import com.dofusdude.client.ApiClient;
import com.dofusdude.client.ApiException;
import com.dofusdude.client.Configuration;
import com.dofusdude.client.models.*;
import com.dofusdude.client.api.ResourcesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.dofusdu.de");

    ResourcesApi apiInstance = new ResourcesApi(defaultClient);
    String language = "en"; // String | a valid language code
    Integer ankamaId = 7295; // Integer | identifier
    String game = "dofus3"; // String | game main 'dofus3' or beta channel 'dofus3beta'
    try {
      Resource result = apiInstance.getItemsResourcesSingle(language, ankamaId, game);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ResourcesApi#getItemsResourcesSingle");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
language String a valid language code [enum: en, fr, de, es, pt]
ankamaId Integer identifier
game String game main 'dofus3' or beta channel 'dofus3beta' [enum: dofus3, dofus3beta]

Return type

Resource

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 -
400 -
404 -