poe-ninja-api-manager - npm
文章推薦指數: 80 %
Access item data easily and update, save and load data from poe.ninja with NodeJS. Latest version: 0.7.0, last published: 4 years ago. poe-ninja-api-manager0.7.0 • Public • Published4yearsagoReadmeExploreBETA3Dependencies0Dependents26Versionspoe-ninja-api-manager Contents Changelog GettingStarted NinjaAPI GettingStarted Installwithnpm: $ npm install poe-ninja-api-manager Exampleusage: var NinjaAPI = require("poe-ninja-api-manager"); var ninjaAPI = new NinjaAPI({ league: "Standard"}); // Update data, then save data, then get item data for Atziri"s Splendour, 5 link, Energy Shield variantninjaAPI.update().then((result) => { console.log("Updated data, here are the results of the requests:", result); return ninjaAPI.save();}).then((success) => { console.log("Saved data", success); return ninjaAPI.getItem("Atziri's Splendour", {links: 5, variant: "ES"});}).then((item) => { return console.log("An item matching the query was found", item);}).catch((err) => { console.log(err);}); NinjaAPI Kind:globalclass NinjaAPI newNinjaAPI([options]) .update([options])⇒Promise .getItem(name,[options])⇒Promise .getCurrencyDetails(name)⇒object .hasData([league])⇒boolean .getLeague()⇒string .setLeague(league) .load()⇒Promise .save()⇒Promise .isUpdating()⇒boolean newNinjaAPI([options]) CreatesanewNinjaAPIobject Param Type Default Description [options] Object Anoptionaloptionsobject [options.league] string "Standard" Leaguethatshouldbeusedasdefault [options.path] string "./" Pathwheredatashouldbesaved [options.dataFile] string "ninjaData.json" Fileinwhichdatashouldbesaved ninjaAPI.update([options])⇒Promise Updatesdatafrompoe.ninjaforaspecificleague. Kind:instancemethodofNinjaAPI Fulfil:Array-AnarrayofobjectscontainingtherequesteddataofeachAPI Reject:Error-Theerror.messagecontainsinformationaboutwhythepromisewasrejected Param Type Default Description [options] Object Anoptionaloptionsobject [options.league] string "Standard" Leaguethatshouldbeupdated [options.delay] string 200 DelaybetweenAPIcalls ninjaAPI.getItem(name,[options])⇒Promise Returnsdataforanitemfromthecurrentlyloadedpoe.ninjadataobject. Thereturneditemobjectisthesameyou'dreceivefrompoe.ninja,butithasanadditionalpropertyapiType. Theoptionaloptionsdonoapplyforcurrencyitems,exceptforoptions.league. Kind:instancemethodofNinjaAPI Fulfil:Array-Anarraycontainingthematchingitemasanobject.Ifyoureceivemultipleobjects,pleaseopenanissue. Reject:Error-Theerror.messagecontainsinformationaboutwhythepromisewasrejected Param Type Default Description name String Nameoftheitem [options] Object Anoptionaloptionsobject [options.league] string "Standard" Leaguethatshouldbesearched [options.links] string 0 Linkstheitemshouldhave [options.variant] string null Variantoftheitem.Ifnovariantisspecified,anyvariantoftheitemwillbereturned,butpreferablythedefault(nullvariant)oftheitem [options.fallbackVariant] string null Ifavariantwasspecifiedbutnotfound,trytofindthisinstead.Usefulfordefaultinggemstothelevel20variant [options.relic] string false Settotruefortherelicversionoftheitem [options.baseType] string null Basetypeoftheitem.Isignoredifnotspecified ninjaAPI.getCurrencyDetails(name)⇒object Returnsanobjectcontainingdetailsaboutacurrencyitem. Returnsanemptyobjectifnodataisavailableforthespecifiedcurrencyname. Kind:instancemethodofNinjaAPI Param Type Description name string Nameofthecurrency ninjaAPI.hasData([league])⇒boolean Returnstrueifanypoe.ninjadataisavailable. Thismeansthatithasbeenloadedorupdatedbeforecallingthismethod. Kind:instancemethodofNinjaAPI Param Type Description [league] string Bysettingaleague,truewillbereturnedifthere'sdataforthisleague ninjaAPI.getLeague()⇒string Returnstheleaguethatiscurrentlysetasdefault. Kind:instancemethodofNinjaAPI ninjaAPI.setLeague(league) Setsaleagueasdefault. Kind:instancemethodofNinjaAPI Param Type Description league string Leaguethatshouldbesetasdefault ninjaAPI.load()⇒Promise Loadspreviouslysaveddatafromfile. Kind:instancemethodofNinjaAPI Fulfil:boolean-trueifthedatawasloadedsuccessfully Reject:Error-Theerror.messagecontainsinformationaboutwhythepromisewasrejected ninjaAPI.save()⇒Promise Savesthecurrentlyloadedorupdateddatatofile. Kind:instancemethodofNinjaAPI Fulfil:boolean-trueifthedatawassavedsuccessfully Reject:Error-Theerror.messagecontainsinformationaboutwhythepromisewasrejected ninjaAPI.isUpdating()⇒boolean Returnstrueifdataiscurrentlybeingupdated Kind:instancemethodofNinjaAPI Keywordspoepathofexilepoe.ninjaapimanagerInstallnpmipoe-ninja-api-managerRepositoryGitgithub.com/klayveR/poe-ninja-api-managerHomepagegithub.com/klayveR/poe-ninja-api-manager#readmeDownloadsWeeklyDownloads32Version0.7.0LicenseMITUnpackedSize33.3kBTotalFiles6Lastpublish4yearsagoCollaboratorsTryonRunKitReportmalware
延伸文章資訊
- 1【攻略】【小馬】POE Ninja 忍者網使用教學『英文苦手也不怕 ...
善用大數據資源來找便宜又好玩的Bulids如果觀看人數破500再來補字幕,觀迎大家提問。 POE ninja: https://poe.ninja/.
- 2【POE教學】附魔看風向?丞相起風啦!POE NINJA風向觀測
- 3poe-ninja-api-manager - npm
Access item data easily and update, save and load data from poe.ninja with NodeJS. Latest version...
- 4poe ninja 中文
Welcome to poe.ninja! An economic and build overview of the action role-playing game Path of Exil...
- 5【心得】國際服poe.ninja 各種天賦參考- 使用教學 - 哈啦區