Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stelzo committed Jan 20, 2024
1 parent 679175b commit 1a6911c
Show file tree
Hide file tree
Showing 96 changed files with 2,974 additions and 1,551 deletions.
8 changes: 6 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ docs/AlmanaxEntryTributeItem.md
docs/AlmanaxWebhook.md
docs/AlmanaxWebhookDailySettings.md
docs/ConditionEntry.md
docs/ConditionEntryElement.md
docs/ConditionTreeLeaf.md
docs/ConditionTreeNode.md
docs/ConditionTreeRelation.md
docs/ConsumablesAPI.md
docs/Cosmetic.md
docs/CosmeticType.md
Expand Down Expand Up @@ -80,7 +82,9 @@ model_almanax_entry_tribute_item.go
model_almanax_webhook.go
model_almanax_webhook_daily_settings.go
model_condition_entry.go
model_condition_entry_element.go
model_condition_tree_leaf.go
model_condition_tree_node.go
model_condition_tree_relation.go
model_cosmetic.go
model_cosmetic_type.go
model_create_almanax_webhook.go
Expand Down
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0-SNAPSHOT
7.3.0-SNAPSHOT
71 changes: 20 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Go API client for dodugo

# A project for you - the developer.
The free, always-up-to-date, low-latency, insert-buzzword-here Ankama API for your next cool project!
The all-in-one toolbelt for your next Ankama related project.

## Client SDKs
Don't write types or functions yourself - I already (kinda) did! 😉
- [Javascript](https://github.com/dofusdude/dofusdude-js) npm i dofusdude-js --save
- [Typescript](https://github.com/dofusdude/dofusdude-ts) npm i dofusdude-ts --save
- [Go](https://github.com/dofusdude/dodugo) go get -u github.com/dofusdude/dodugo
Expand All @@ -20,67 +19,34 @@ Your favorite language is missing? Please let me know!

-**Blazingly Fast** all data in-memory, aggressive caching over short time spans, HTTP/2 multiplexing, written in Go, optimized for low latency, hosted on bare metal in 🇩🇪.

- 📨 **Discord Integration** Ankama related Twitter, RSS and Almanax feeds to post to Discord servers with advanced features like filters or mentions. Use the endpoints as a dev or the official [Web Client](https://discord.dofusdude.com) as a user.
- 📨 **Discord Integration** Ankama related RSS and Almanax feeds to post to Discord servers with advanced features like filters or mentions. Use the endpoints as a dev or the official [Web Client](https://discord.dofusdude.com) as a user.

- 🩸 **Dofus 2 Beta** from stable to bleeding edge by replacing /dofus2 with /dofus2beta.

- 🗣️ **Multilingual** supporting _en_, _fr_, _es_, _pt_ including the dropped languages from the Dofus website _de_ and _it_.

- 🧠 **Search by Relevance** allowing typos in name and description, handled by language specific text analysis and indexing by the powerful [Meilisearch](https://www.meilisearch.com) written in Rust.
- 🧠 **Search by Relevance** allowing typos in name and description, handled by language specific text analysis and indexing.

- 🕵️ **Complete** actual data from the game including items invisible to the encyclopedia like quest items.

- 🖼️ **HD Images** rendering vector graphics into PNGs up to 800x800 px in the background.


## Current state
- Weapons ✅
- Equipment ✅
- Sets ✅
- Resources ✅
- Consumables ✅
- Pets ✅
- Mounts ✅
- Cosmetics/Ceremonial Items ✅
- Harnesses ✅
- Quest Items ✅
- Almanax ✅
- Monsters ❌
- Spells ❌
- 🖼️ **HD Images** rendering game assets to high-res images with up to 800x800 px.

... and much more on the Roadmap on my Discord.

## Deploy now. Use forever.
Everything you see here on this site, you can use now and forever. Updates could introduce new fields, new paths or parameter but never break backwards compatibility, so no field or parameter will be deleted.
Everything you see here on this site, you can use now and forever. Updates could introduce new fields, new paths or parameter but never break backwards compatibility.

There is one exception! **The API will _always_ choose being up-to-date over everything else**. So if Ankama decides to drop languages from the game like they did with their website, the API will loose support for them, too.

## Only the beginning... 🤯
I want this project to be useful and not just add plain GET-categories no one needs.

There is a long list of features I want to add (see the Roadmap on my [Discord](https://discord.gg/3EtHskZD8h)). But they are all focussed on you, the developers. So please let me know what you need. I will change the list based on demand.

# Get started! 🥳
Scroll down and try it for yourself!

Or see how these other awesome projects use it:
- [KaellyBot](https://github.com/Kaysoro/KaellyBot) by Kaysoro
- [Dofus Craftlist](https://dofuscraftlist-dev.netlify.app) by Lystina
- [AlmanaxApp](https://almanaxapp.netlify.app) by Lystina
- [DofuStuffSimulator](https://dofusstuffsimulator.netlify.app/)

I highly recommend using the SDKs for quick results. I use them myself for parts of the API.

## Thank you!
I highly welcome everyone on my [Discord](https://discord.gg/3EtHskZD8h) to just talk about projects and use cases or give feedback of any kind.

The servers have a fixed monthly cost to provide very fast responses. If you want to help me keeping them running or simply donate, consider becoming a [GitHub Sponsor](https://github.com/sponsors/dofusdude).

The servers have a fixed monthly cost to provide very fast responses. If you want to help me keeping them running or simply donate to that cause, consider becoming a [GitHub Sponsor](https://github.com/sponsors/dofusdude).

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 0.8.0
- API version: 0.8.1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://discord.gg/3EtHskZD8h](https://discord.gg/3EtHskZD8h)
Expand All @@ -89,20 +55,20 @@ For more information, please visit [https://discord.gg/3EtHskZD8h](https://disco

Install the following dependencies:

```shell
```sh
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
```

Put the package under your project folder and add the following in import:

```golang
```go
import dodugo "github.com/dofusdude/dodugo"
```

To use a proxy, set the environment variable `HTTP_PROXY`:

```golang
```go
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```

Expand All @@ -112,17 +78,17 @@ Default configuration comes with `Servers` field that contains server objects as

### Select Server Configuration

For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
For using other server than the one defined on index 0 set context value `dodugo.ContextServerIndex` of type `int`.

```golang
```go
ctx := context.WithValue(context.Background(), dodugo.ContextServerIndex, 1)
```

### Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
Templated server URL is formatted using default variables from configuration or from context value `dodugo.ContextServerVariables` of type `map[string]string`.

```golang
```go
ctx := context.WithValue(context.Background(), dodugo.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Expand All @@ -134,9 +100,9 @@ Note, enum values are always validated and all unused variables are silently ign

Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
Similar rules for overriding default operation server index and variables applies by using `dodugo.ContextOperationServerIndices` and `dodugo.ContextOperationServerVariables` context maps.

```golang
```go
ctx := context.WithValue(context.Background(), dodugo.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
Expand Down Expand Up @@ -171,6 +137,7 @@ Class | Method | HTTP request | Description
*GameAPI* | [**GetItemsAllSearch**](docs/GameAPI.md#getitemsallsearch) | **Get** /{game}/{language}/items/search | Search All Items
*MetaAPI* | [**GetGameSearchTypes**](docs/MetaAPI.md#getgamesearchtypes) | **Get** /dofus2/meta/search/types | Available Game Search Types
*MetaAPI* | [**GetMetaAlmanaxBonuses**](docs/MetaAPI.md#getmetaalmanaxbonuses) | **Get** /dofus2/meta/{language}/almanax/bonuses | Available Almanax Bonuses
*MetaAPI* | [**GetMetaAlmanaxBonusesSearch**](docs/MetaAPI.md#getmetaalmanaxbonusessearch) | **Get** /dofus2/meta/{language}/almanax/bonuses/search | Search Available Almanax Bonuses
*MetaAPI* | [**GetMetaElements**](docs/MetaAPI.md#getmetaelements) | **Get** /dofus2/meta/elements | Effects and Condition Elements
*MountsAPI* | [**GetAllMountsList**](docs/MountsAPI.md#getallmountslist) | **Get** /{game}/{language}/mounts/all | List All Mounts
*MountsAPI* | [**GetMountsList**](docs/MountsAPI.md#getmountslist) | **Get** /{game}/{language}/mounts | List Mounts
Expand Down Expand Up @@ -214,7 +181,9 @@ Class | Method | HTTP request | Description
- [AlmanaxWebhook](docs/AlmanaxWebhook.md)
- [AlmanaxWebhookDailySettings](docs/AlmanaxWebhookDailySettings.md)
- [ConditionEntry](docs/ConditionEntry.md)
- [ConditionEntryElement](docs/ConditionEntryElement.md)
- [ConditionTreeLeaf](docs/ConditionTreeLeaf.md)
- [ConditionTreeNode](docs/ConditionTreeNode.md)
- [ConditionTreeRelation](docs/ConditionTreeRelation.md)
- [Cosmetic](docs/Cosmetic.md)
- [CosmeticType](docs/CosmeticType.md)
- [CreateAlmanaxWebhook](docs/CreateAlmanaxWebhook.md)
Expand Down
Loading

0 comments on commit 1a6911c

Please sign in to comment.