DofusSharp.DofusDb.ApiClients
0.18.0
dotnet add package DofusSharp.DofusDb.ApiClients --version 0.18.0
NuGet\Install-Package DofusSharp.DofusDb.ApiClients -Version 0.18.0
<PackageReference Include="DofusSharp.DofusDb.ApiClients" Version="0.18.0" />
<PackageVersion Include="DofusSharp.DofusDb.ApiClients" Version="0.18.0" />
<PackageReference Include="DofusSharp.DofusDb.ApiClients" />
paket add DofusSharp.DofusDb.ApiClients --version 0.18.0
#r "nuget: DofusSharp.DofusDb.ApiClients, 0.18.0"
#:package DofusSharp.DofusDb.ApiClients@0.18.0
#addin nuget:?package=DofusSharp.DofusDb.ApiClients&version=0.18.0
#tool nuget:?package=DofusSharp.DofusDb.ApiClients&version=0.18.0
DofusDB API Clients
This project is under active development. Note that not all available APIs have been implemented at this time.
Provides API clients for the DofusDB API.
Most of the APIs are search APIs that allow you to query the DofusDB database for various resources such as items, monsters, spells, etc. For these APIs, the library providers both a low-level client (IDofusDbTableClient<TResource>
) for maximum control and a high-level, fluent interface (DofusDbQuery<TResource>
) for building requests using LINQ-like statements.
The remaining APIs are simple GET APIs that return a single resource, such as the version of the game data or the map images at various scales.
Installation
Install via NuGet:
dotnet add package DofusSharp.DofusDb.ApiClients
Usage
In both the examples below we will fetch the items from level 50 to 100, that are not consumables, select only the name
field and order them by realWeight
in descending order.
Query interface (recommended)
The query interface returns an IAsyncEnumerable<TResource>
that will fetch all the available pages automatically while iterating over the results.
IDofusDbQuery<DofusDbItem> query = DofusDbQuery.Production().Items()
.Select(i => i.Name)
.OrderByDescending(i => i.RealWeight)
.Where(i => i.Level >= 50 && i.Level <= 100 && i.Usable == false);
IAsyncEnumerable<DofusDbItem> itemsEnumerable = await query.ExecuteAsync();
DofusDbItem[] items = itemsEnumerable.ToArrayAsync();
All model fields are nullable because the API supports a select
operator for partial field selection.
As a result, enabling nullable analysis may cause compiler warnings about possible null references in expression subtrees.
However, these warnings are safe to ignore in this context, since the expressions are only used to determine property names for request parameters and will not cause null reference exceptions at runtime.
Low-level client
The low-level client grants direct access to the request parameters exposed by FeatherJS
.
IDofusDbTableClient<DofusDbItem> client = DofusDbTableClient.Production().Items();
SearchResult<DofusDbItem> items = await client.SearchAsync(
new DofusDbSearchQuery
{
Limit = 50,
Select = ["name"],
Sort = new Dictionary<string, DofusDbSearchQuerySortOrder> { { "realWeight", DofusDbSearchQuerySortOrder.Descending } },
Predicates =
[
new DofusDbSearchPredicate.GreaterThanOrEqual("level", "50"),
new DofusDbSearchPredicate.LessThanOrEqual("level", "100"),
new DofusDbSearchPredicate.Eq("usable", "false")
]
}
);
Note: the query string generated from a SearchQuery
can be computed by calling the ToQueryString
extension method on the SearchQuery
object. This can be useful for debugging or logging purposes.
For example the search query above would generate the following query string:
limit=50&select=name&sort[realWeight]=desc&level[$gte]=50&level[$lte]=100&usable=false
Contributing
Contributions are welcome! Please open issues or submit pull requests for bug fixes, features, or documentation improvements.
License
This project is licensed under the terms of the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- DofusSharp.Common (>= 0.18.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.18.0 | 33 | 9/15/2025 |
0.17.0 | 29 | 9/14/2025 |
0.16.0 | 31 | 9/14/2025 |
0.14.0 | 27 | 9/11/2025 |
0.13.2 | 32 | 9/11/2025 |
0.13.1 | 30 | 9/11/2025 |
0.13.0 | 27 | 9/11/2025 |
0.12.3 | 33 | 9/10/2025 |
0.12.2 | 31 | 9/8/2025 |
0.12.1 | 28 | 9/8/2025 |
0.12.0 | 27 | 9/8/2025 |
0.11.1-alpha.0.7 | 27 | 9/7/2025 |
0.11.0 | 151 | 9/7/2025 |
0.10.1-alpha.0.14 | 127 | 9/7/2025 |
0.10.0 | 187 | 8/30/2025 |
0.9.0 | 69 | 8/23/2025 |
0.8.0 | 68 | 8/23/2025 |
0.7.0 | 140 | 8/20/2025 |
0.6.0 | 142 | 8/17/2025 |
0.5.0 | 143 | 8/17/2025 |
0.4.0 | 114 | 8/17/2025 |
0.3.0 | 140 | 8/10/2025 |