0.7.0 • Published 2 years ago

openapilibrary v0.7.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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! 😉

  • Javascript npm i dofusdude-js --save
  • Typescript npm i dofusdude-ts --save
  • Go go get -u github.com/dofusdude/dodugo
  • Python pip install dofusdude

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 microservices for 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.7.0
  • Package version: 0.7.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.AllItemsApi()
var language = "language_example"; // {String} a valid language code
var game = dofus2; // {String} 
var query = atcham; // {String} case sensitive search query
var opts = {
  'filterTypeName': Bottes, // {String} only results with the translated type name across all item_subtypes
  'filterMinLevel': 190, // {Number} only results which level is equal or above this value
  'filterMaxLevel': 200 // {Number} only results which level is equal or below this value
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getItemsAllSearch(language, game, query, opts, callback);

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
dofusdude.AllItemsApigetItemsAllSearchGET /{game}/{language}/items/searchSearch All Items
dofusdude.AlmanaxApigetAlmanaxDateGET /dofus2/{language}/almanax/{date}Single Almanax Date
dofusdude.AlmanaxApigetAlmanaxRangeGET /dofus2/{language}/almanaxAlmanax Range
dofusdude.ConsumablesApigetAllItemsConsumablesListGET /{game}/{language}/items/consumables/allList All Consumables
dofusdude.ConsumablesApigetItemsConsumablesListGET /{game}/{language}/items/consumablesList Consumables
dofusdude.ConsumablesApigetItemsConsumablesSearchGET /{game}/{language}/items/consumables/searchSearch Consumables
dofusdude.ConsumablesApigetItemsConsumablesSingleGET /{game}/{language}/items/consumables/{ankama_id}Single Consumables
dofusdude.CosmeticsApigetAllCosmeticsListGET /{game}/{language}/items/cosmetics/allList All Cosmetics
dofusdude.CosmeticsApigetCosmeticsListGET /{game}/{language}/items/cosmeticsList Cosmetics
dofusdude.CosmeticsApigetCosmeticsSearchGET /{game}/{language}/items/cosmetics/searchSearch Cosmetics
dofusdude.CosmeticsApigetCosmeticsSingleGET /{game}/{language}/items/cosmetics/{ankama_id}Single Cosmetics
dofusdude.EquipmentApigetAllItemsEquipmentListGET /{game}/{language}/items/equipment/allList All Equipment
dofusdude.EquipmentApigetItemsEquipmentListGET /{game}/{language}/items/equipmentList Equipment
dofusdude.EquipmentApigetItemsEquipmentSearchGET /{game}/{language}/items/equipment/searchSearch Equipment
dofusdude.EquipmentApigetItemsEquipmentSingleGET /{game}/{language}/items/equipment/{ankama_id}Single Equipment
dofusdude.MetaApigetMetaAlmanaxBonusesGET /dofus2/meta/{language}/almanax/bonusesAvailable Almanax Bonuses
dofusdude.MetaApigetMetaElementsGET /dofus2/meta/elementsEffects and Condition Elements
dofusdude.MountsApigetAllMountsListGET /{game}/{language}/mounts/allList All Mounts
dofusdude.MountsApigetMountsListGET /{game}/{language}/mountsList Mounts
dofusdude.MountsApigetMountsSearchGET /{game}/{language}/mounts/searchSearch Mounts
dofusdude.MountsApigetMountsSingleGET /{game}/{language}/mounts/{ankama_id}Single Mounts
dofusdude.QuestItemsApigetAllItemsQuestListGET /{game}/{language}/items/quest/allList All Quest Items
dofusdude.QuestItemsApigetItemQuestSingleGET /{game}/{language}/items/quest/{ankama_id}Single Quest Items
dofusdude.QuestItemsApigetItemsQuestListGET /{game}/{language}/items/questList Quest Items
dofusdude.QuestItemsApigetItemsQuestSearchGET /{game}/{language}/items/quest/searchSearch Quest Items
dofusdude.ResourcesApigetAllItemsResourcesListGET /{game}/{language}/items/resources/allList All Resources
dofusdude.ResourcesApigetItemsResourceSearchGET /{game}/{language}/items/resources/searchSearch Resources
dofusdude.ResourcesApigetItemsResourcesListGET /{game}/{language}/items/resourcesList Resources
dofusdude.ResourcesApigetItemsResourcesSingleGET /{game}/{language}/items/resources/{ankama_id}Single Resources
dofusdude.SetsApigetAllSetsListGET /{game}/{language}/sets/allList All Sets
dofusdude.SetsApigetSetsListGET /{game}/{language}/setsList Sets
dofusdude.SetsApigetSetsSearchGET /{game}/{language}/sets/searchSearch Sets
dofusdude.SetsApigetSetsSingleGET /{game}/{language}/sets/{ankama_id}Single Sets
dofusdude.WebhooksApideleteWebhooksAlmanaxIdDELETE /webhooks/almanax/{id}Unregister Almanax Hook
dofusdude.WebhooksApideleteWebhooksRssIdDELETE /webhooks/rss/{id}Unregister RSS Hook
dofusdude.WebhooksApideleteWebhooksTwitterIdDELETE /webhooks/twitter/{id}Unregister Twitter Hook
dofusdude.WebhooksApigetMetaWebhooksAlmanaxGET /meta/webhooks/almanaxGet Almanax Hook Metainfo
dofusdude.WebhooksApigetMetaWebhooksRssGET /meta/webhooks/rssGet RSS Hook Metainfo
dofusdude.WebhooksApigetMetaWebhooksTwitterGET /meta/webhooks/twitterGet Twitter Hook Metainfo
dofusdude.WebhooksApigetWebhooksAlmanaxIdGET /webhooks/almanax/{id}Get Almanax Hook
dofusdude.WebhooksApigetWebhooksRssIdGET /webhooks/rss/{id}Get RSS Hook
dofusdude.WebhooksApigetWebhooksTwitterIdGET /webhooks/twitter/{id}Get Twitter Hook
dofusdude.WebhooksApipostWebhooksAlmanaxPOST /webhooks/almanaxRegister Almanax Hook
dofusdude.WebhooksApipostWebhooksRssPOST /webhooks/rssRegister RSS Hook
dofusdude.WebhooksApipostWebhooksTwitterPOST /webhooks/twitterRegister Twitter Hook
dofusdude.WebhooksApiputWebhooksAlmanaxIdPUT /webhooks/almanax/{id}Update Almanax Hook
dofusdude.WebhooksApiputWebhooksRssIdPUT /webhooks/rss/{id}Update RSS Hook
dofusdude.WebhooksApiputWebhooksTwitterIdPUT /webhooks/twitter/{id}Update Twitter Hook

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.