Skip to content

dofusdude/dofusdude-js

Repository files navigation

dofusdude-js

dofusdude - JavaScript client for dofusdude-js

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.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.9.4
  • Package version: 0.9.4
  • Generator version: 7.10.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://discord.gg/3EtHskZD8h

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install dofusdude-js --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your dofusdude-js from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var dofusdude = require('dofusdude-js');


var api = new dofusdude.AlmanaxApi()
var language = "fr"; // {String} code
var date = new Date("Tue Jul 14 00:00:00 UTC 2020"); // {Date} yyyy-mm-dd
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAlmanaxDate(language, date, callback);

Documentation for API Endpoints

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

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

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.