Skip to content

dofusdude/dofusdude-php

Repository files navigation

dofusdude-php

A project for you - the developer.

The all-in-one toolbelt for your next Ankama related project.

Client SDKs

  • Javascript npm i dofusdude-js --save
  • Typescript npm i dofusdude-ts --save
  • Go go get -u github.com/dofusdude/dodugo
  • Python pip install dofusdude
  • PHP
  • Java Maven with GitHub packages setup

Everything, including this site, is generated out of the Docs Repo. Consider it the Single Source of Truth. If there is a problem with the SDKs, create an issue there.

Your favorite language is missing? Please let me know!

Main Features

  • 🥷 Seamless Auto-Update load data in the background when a new Dofus version is released and serving it within 10 minutes with atomic data source switching. No downtime and no effects for the user, just always up-to-date.

  • 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 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 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.

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

  • 🖼️ HD Images rendering game assets to high-res images with up to 800x800 px.

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

For more information, please visit https://discord.gg/3EtHskZD8h.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/dofusdude/dofusdude-php.git"
    }
  ],
  "require": {
    "dofusdude/dofusdude-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/dofusdude-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');




$apiInstance = new OpenAPI\Client\Api\AlmanaxApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$language = fr; // string | code
$date = Tue Jul 14 00:00:00 UTC 2020; // \DateTime | yyyy-mm-dd

try {
    $result = $apiInstance->getAlmanaxDate($language, $date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AlmanaxApi->getAlmanaxDate: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

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

Class Method HTTP request Description
AlmanaxApi getAlmanaxDate GET /dofus2/{language}/almanax/{date} Single Almanax Date
AlmanaxApi getAlmanaxRange GET /dofus2/{language}/almanax Almanax Range
ConsumablesApi getAllItemsConsumablesList GET /{game}/{language}/items/consumables/all List All Consumables
ConsumablesApi getItemsConsumablesList GET /{game}/{language}/items/consumables List Consumables
ConsumablesApi getItemsConsumablesSearch GET /{game}/{language}/items/consumables/search Search Consumables
ConsumablesApi getItemsConsumablesSingle GET /{game}/{language}/items/consumables/{ankama_id} Single Consumables
CosmeticsApi getAllCosmeticsList GET /{game}/{language}/items/cosmetics/all List All Cosmetics
CosmeticsApi getCosmeticsList GET /{game}/{language}/items/cosmetics List Cosmetics
CosmeticsApi getCosmeticsSearch GET /{game}/{language}/items/cosmetics/search Search Cosmetics
CosmeticsApi getCosmeticsSingle GET /{game}/{language}/items/cosmetics/{ankama_id} Single Cosmetics
EquipmentApi getAllItemsEquipmentList GET /{game}/{language}/items/equipment/all List All Equipment
EquipmentApi getItemsEquipmentList GET /{game}/{language}/items/equipment List Equipment
EquipmentApi getItemsEquipmentSearch GET /{game}/{language}/items/equipment/search Search Equipment
EquipmentApi getItemsEquipmentSingle GET /{game}/{language}/items/equipment/{ankama_id} Single Equipment
GameApi getGameSearch GET /{game}/{language}/search Game Search
GameApi getItemsAllSearch GET /{game}/{language}/items/search Search All Items
MetaApi getGameSearchTypes GET /dofus2/meta/search/types Available Game Search Types
MetaApi getItemTypes GET /dofus2/meta/items/types Available Item Types
MetaApi getMetaAlmanaxBonuses GET /dofus2/meta/{language}/almanax/bonuses Available Almanax Bonuses
MetaApi getMetaAlmanaxBonusesSearch GET /dofus2/meta/{language}/almanax/bonuses/search Search Available Almanax Bonuses
MetaApi getMetaElements GET /dofus2/meta/elements Effects and Condition Elements
MetaApi getMetaVersion GET /dofus2/meta/version Game Version
MountsApi getAllMountsList GET /{game}/{language}/mounts/all List All Mounts
MountsApi getMountsList GET /{game}/{language}/mounts List Mounts
MountsApi getMountsSearch GET /{game}/{language}/mounts/search Search Mounts
MountsApi getMountsSingle GET /{game}/{language}/mounts/{ankama_id} Single Mounts
QuestItemsApi getAllItemsQuestList GET /{game}/{language}/items/quest/all List All Quest Items
QuestItemsApi getItemQuestSingle GET /{game}/{language}/items/quest/{ankama_id} Single Quest Items
QuestItemsApi getItemsQuestList GET /{game}/{language}/items/quest List Quest Items
QuestItemsApi getItemsQuestSearch GET /{game}/{language}/items/quest/search Search Quest Items
ResourcesApi getAllItemsResourcesList GET /{game}/{language}/items/resources/all List All Resources
ResourcesApi getItemsResourceSearch GET /{game}/{language}/items/resources/search Search Resources
ResourcesApi getItemsResourcesList GET /{game}/{language}/items/resources List Resources
ResourcesApi getItemsResourcesSingle GET /{game}/{language}/items/resources/{ankama_id} Single Resources
SetsApi getAllSetsList GET /{game}/{language}/sets/all List All Sets
SetsApi getSetsList GET /{game}/{language}/sets List Sets
SetsApi getSetsSearch GET /{game}/{language}/sets/search Search Sets
SetsApi getSetsSingle GET /{game}/{language}/sets/{ankama_id} Single Sets
WebhooksApi deleteWebhooksAlmanaxId DELETE /webhooks/almanax/{id} Unregister Almanax Hook
WebhooksApi deleteWebhooksRssId DELETE /webhooks/rss/{id} Unregister RSS Hook
WebhooksApi deleteWebhooksTwitterId DELETE /webhooks/twitter/{id} Unregister Twitter Hook
WebhooksApi getMetaWebhooksAlmanax GET /meta/webhooks/almanax Get Almanax Hook Metainfo
WebhooksApi getMetaWebhooksRss GET /meta/webhooks/rss Get RSS Hook Metainfo
WebhooksApi getMetaWebhooksTwitter GET /meta/webhooks/twitter Get Twitter Hook Metainfo
WebhooksApi getWebhooksAlmanaxId GET /webhooks/almanax/{id} Get Almanax Hook
WebhooksApi getWebhooksRssId GET /webhooks/rss/{id} Get RSS Hook
WebhooksApi getWebhooksTwitterId GET /webhooks/twitter/{id} Get Twitter Hook
WebhooksApi postWebhooksAlmanax POST /webhooks/almanax Register Almanax Hook
WebhooksApi postWebhooksRss POST /webhooks/rss Register RSS Hook
WebhooksApi postWebhooksTwitter POST /webhooks/twitter Register Twitter Hook
WebhooksApi putWebhooksAlmanaxId PUT /webhooks/almanax/{id} Update Almanax Hook
WebhooksApi putWebhooksRssId PUT /webhooks/rss/{id} Update RSS Hook
WebhooksApi putWebhooksTwitterId PUT /webhooks/twitter/{id} Update Twitter Hook

Models

Authorization

Endpoints do not require authorization.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

stelzo@steado.de

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 0.9.4
    • Generator version: 7.10.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen