dofusdude / dofusdude-js

The Javascript Client SDK for the Dofusdude API.

Home Page:https://docs.dofusdu.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dofusdude-js

dofusdude - JavaScript client for dofusdude-js

A project for you - the developer.

The free, always-up-to-date, low-latency, insert-buzzword-here Ankama API for your next cool project!

Client SDKs

Don't write types or functions yourself - I already (kinda) did! πŸ˜‰

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 2 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 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 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 written in Rust.

  • πŸ•΅οΈ 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 ❌

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

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). 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:

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

This SDK is automatically generated by the OpenAPI Generator project:

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

Installation

For Node.js

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 = 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 getMetaAlmanaxBonuses GET /dofus2/meta/{language}/almanax/bonuses Available Almanax Bonuses
dofusdude.MetaApi getMetaElements GET /dofus2/meta/elements Effects and Condition Elements
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.

About

The Javascript Client SDK for the Dofusdude API.

https://docs.dofusdu.de


Languages

Language:JavaScript 99.8%Language:Shell 0.2%