Skip to content

Latest commit

 

History

History
217 lines (176 loc) · 8.33 KB

GameApi.md

File metadata and controls

217 lines (176 loc) · 8.33 KB

Dofusdude.Api.Api.GameApi

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

Method HTTP request Description
GetGameSearch GET /{game}/{language}/search Game Search
GetItemsAllSearch GET /{game}/{language}/items/search Search All Items

GetGameSearch

List<GetGameSearch200ResponseInner> GetGameSearch (string language, string game, string query, List? filterType = null, int? limit = null, List? fieldsItem = null)

Game Search

Search in all names and descriptions of all supported types in the game. For the list of supported types see the endpoint /dofus2/meta/search/types.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Dofusdude.Api.Api;
using Dofusdude.Api.Client;
using Dofusdude.Api.Model;

namespace Example
{
    public class GetGameSearchExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.dofusdu.de";
            var apiInstance = new GameApi(config);
            var language = "en";  // string | a valid language code
            var game = dofus2;  // string | 
            var query = paztek;  // string | search query
            var filterType = new List<string>?(); // List<string>? | only results with all specific type (optional) 
            var limit = 8;  // int? | maximum number of returned results (optional)  (default to 8)
            var fieldsItem = new List<string>?(); // List<string>? | adds fields from the item search to the list entries if the hit is a item. Multiple comma separated values allowed. (optional) 

            try
            {
                // Game Search
                List<GetGameSearch200ResponseInner> result = apiInstance.GetGameSearch(language, game, query, filterType, limit, fieldsItem);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GameApi.GetGameSearch: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetGameSearchWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Game Search
    ApiResponse<List<GetGameSearch200ResponseInner>> response = apiInstance.GetGameSearchWithHttpInfo(language, game, query, filterType, limit, fieldsItem);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GameApi.GetGameSearchWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
language string a valid language code
game string
query string search query
filterType List<string>? only results with all specific type [optional]
limit int? maximum number of returned results [optional] [default to 8]
fieldsItem List<string>? adds fields from the item search to the list entries if the hit is a item. Multiple comma separated values allowed. [optional]

Return type

List<GetGameSearch200ResponseInner>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Game Search Result -
400 Bad Request Possibilities: - empty or no query - filter[type] does not exist -
404 Not Found Possibilities: - no hits for query -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetItemsAllSearch

List<ItemsListEntryTyped> GetItemsAllSearch (string language, string game, string query, string? filterTypeName = null, int? filterMinLevel = null, int? filterMaxLevel = null, int? limit = null)

Search All Items

Search in all names and descriptions of Dofus items (including all subtypes) with a query.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Dofusdude.Api.Api;
using Dofusdude.Api.Client;
using Dofusdude.Api.Model;

namespace Example
{
    public class GetItemsAllSearchExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.dofusdu.de";
            var apiInstance = new GameApi(config);
            var language = fr;  // string | a valid language code
            var game = dofus2;  // string | 
            var query = atcham;  // string | case sensitive search query
            var filterTypeName = Bottes;  // string? | only results with the translated type name across all item_subtypes (optional) 
            var filterMinLevel = 190;  // int? | only results which level is equal or above this value (optional) 
            var filterMaxLevel = 200;  // int? | only results which level is equal or below this value (optional) 
            var limit = 8;  // int? | maximum number of returned results (optional)  (default to 8)

            try
            {
                // Search All Items
                List<ItemsListEntryTyped> result = apiInstance.GetItemsAllSearch(language, game, query, filterTypeName, filterMinLevel, filterMaxLevel, limit);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling GameApi.GetItemsAllSearch: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the GetItemsAllSearchWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Search All Items
    ApiResponse<List<ItemsListEntryTyped>> response = apiInstance.GetItemsAllSearchWithHttpInfo(language, game, query, filterTypeName, filterMinLevel, filterMaxLevel, limit);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling GameApi.GetItemsAllSearchWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
language string a valid language code
game string
query string case sensitive search query
filterTypeName string? only results with the translated type name across all item_subtypes [optional]
filterMinLevel int? only results which level is equal or above this value [optional]
filterMaxLevel int? only results which level is equal or below this value [optional]
limit int? maximum number of returned results [optional] [default to 8]

Return type

List<ItemsListEntryTyped>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Items Found -
400 Bad Request Possibilities: - empty or no query -
404 Not Found Possibilities: - no hits for query -

[Back to top] [Back to API list] [Back to Model list] [Back to README]