Beta Test of War Data API (Full Version)

All Forums >> [Artix Entertainment Games] >> [DragonFable] >> DragonFable Guides



Message


Captain Rhubarb -> Beta Test of War Data API (8/3/2022 13:16:55)

Warning: This information is for advanced coders building tools like Discord Bots.

DragonFable War Data API

Simple method
Retrieve data for one character:
(replace 99999 with the character ID)

URL: https://account.dragonfable.com/charpage/war?id=99999

There is a limit on how often you can call this web API.
Just use for testing your bot on your own or a few test character IDs.



Advanced Data:


Step 1: Register your player guild:

Call using JSON data in the BODY of your HTTPS request:
POST
URL: https://account.dragonfable.com/api/playerguild/register
BODY:
{
    "leader": 100,
    "members": [
        100,
        101,
        102
    ],
    "guild": "myguildname",
    "secret": "mys3cretpassphrase"
}


Replace all the numbers with the character IDs of the players in your group/guild/etc.
You can register up to 250 characters in your virtual player guild.

You can update your member list by calling register again. Use the same guild name and secret value.
Define the members list with your updated list of char ids.


Important: Be sure all your server calls include setting a UserAgent string.


Step 2: Retrieve War Data

GET
URL: https://account.dragonfable.com/api/playerguild/war
BODY:
{
    "guild": "myguildname",
    "secret": "mys3cretpassphrase"
}



There is a limit on how often you can call these web APIs.
War data doesn't change too fast. I recommend pulling your info about once every 5 minutes.






Captain Rhubarb -> RE: Beta Test of War Data API (8/3/2022 13:24:16)

If you have any questions or bug reports, please post them here in this thread.




ruleofnine -> RE: Beta Test of War Data API (8/3/2022 17:16:00)

Really cool feature, set it up for the discord server i make discord bots for. Would be neat if you could select a specific war to grab stats for since without an active war it just says 'peacetime', also would be cool for some other APIs like for character pages. Also as a side note I know i told cheese wizard, but all the character pages have had captchas on them since may 31st so the character page discord features don't work. Just thought I'd bring it up again in case it was forgotten. But all in all very cool feature I'm looking forward to messing with it and any other new tools that are put out for the community :)




Silver -> RE: Beta Test of War Data API (8/4/2022 4:34:45)

This is really cool and will definitely be super helpful. Thanks Rhubarb!

I do have a question though: I get the response "peacetime" when hitting the guild details GET API. This is helpful if checking if there is an ongoing war or not, but could you show us a sample API response when there is an ongoing war so that we could update our scripts accordingly?




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
0.09375