Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planning for E7DB API v2 #43

Open
RaphaelDDL opened this issue Mar 27, 2020 · 15 comments
Open

Planning for E7DB API v2 #43

RaphaelDDL opened this issue Mar 27, 2020 · 15 comments

Comments

@RaphaelDDL
Copy link

RaphaelDDL commented Mar 27, 2020

Hello there @Zarroc2762 :)

Would like to give you a notice, not sure if you have seen yet (notice has been on the meta of v1 for a while), but E7DB api is being upgraded to version 2, and it brings changes on the json format because the data is now being acquired from game. That means correct data (no mistakes when doing v1 jsons manually) and also multi-language support, in case you are interested in adding.

v1: https://api.epicsevendb.com/api/hero/yufine

v2: https://api.epicsevendb.com/hero/yufine ( example of another language https://api.epicsevendb.com/hero/yufine?lang=jp )

Documentation for v2 is https://api.epicsevendb.com/ (missing a few endpoints, I'll add them to Swagger soon)

Still not 100% complete (missing few things here and there like hero relations but we working to add them) but letting you know that v1 won't be updated anymore (that's why you might have seen a few 404's for images or heroes missing). The website itself will be upgraded this weekend to use v2 as well.

Let me know if you see anything you need missing on the new json format so I can work on it.

Best,
Raphael

@ellesde
Copy link
Contributor

ellesde commented Mar 27, 2020

@Zarroc2762

Currently working on changes based on the discussion I had with @RaphaelDDL in his repo. The json is quite different but working through it.

@ellesde
Copy link
Contributor

ellesde commented Mar 28, 2020

@RaphaelDDL I can't seem to find soulburn modifiers.

Here is an example of Cermia s3 using v1
code

Here is an example of Cermia s3 using v2
code

I did a search for 1.65 but nothing came up.

@ellesde ellesde mentioned this issue Mar 28, 2020
@Zarroc2762
Copy link
Owner

Hello @RaphaelDDL !

Thank you very much for reminding me of the API upgrade :) I had already noticed it in meta of V1 but last time I checked the stats for lvl 50/60 awakened/not awakened were missing so I thought I'd wait a bit.

@ellesde

Thanks for your work on this. I appreciate it!

@RaphaelDDL
Copy link
Author

RaphaelDDL commented Mar 30, 2020

Thanks for letting me know of the missing soulburn. We'll check here.

Also @Zarroc2762 if you'd like to implement the status yourself (so it configure a hero for any level awakening, see RaphaelDDL/e7db-api#2 (comment) )

@RaphaelDDL
Copy link
Author

Soul atk and pow will be soul_pow and soul_att_rate

image

Will update API soon to add them, working atm on the translation script for the SC skill tree and SC quests, as well as relationships, so I upload all at once

@KillerBotK
Copy link

Thank you all for your work on this. I genuinely don't think I would enjoy the game anywhere near as much if it wasn't for the optimizer and the API that allows it to work. @Zarroc2762 do you have any idea when you plan to implement the latest API? I realise that in these uncertain times you're attention may be elsewhere and I hope you and your loved ones are all safe.

@RaphaelDDL
Copy link
Author

RaphaelDDL commented Apr 15, 2020

I've updated API to also return object assets with the full URL of all images needed.

So hero have assets with it's 3 images, each skill has it's assets with icon, buffs have also, same for artifacts, items and ex equips :)

Should be easier to handle now since you don't need to manually mount it

@Zarroc2762
Copy link
Owner

Zarroc2762 commented Apr 17, 2020

@KillerBotK Switched to the new V2 API in the latest update.

@RaphaelDDL Thanks for your updates on this! I'll leave this Issue open for a while in case of new API developments

@RaphaelDDL
Copy link
Author

RaphaelDDL commented Apr 17, 2020

Awesome, thanks for the hard work @ellesde and @Zarroc2762

Dim made a commit with latest patch which changed a few int and strings into floats when they are numbers

https://github.com/EpicSevenDB/gamedatabase/commit/f407dbfe36325eccbaebb4e2c9bab4b811ec13cf

So for example, att_rate changed from 1 to "att_rate": 1.0, but for 1.X-ish was already float, so was just a standardization.cSame for zodiac tree upgrades (e.g., speed awaken):

            "stats": [
                {
                    "stat": "speed",
-                    "value": 2,
+                    "value": 2.0,
                },

V1 used to have int being flat and float being %, but now that we have stat separation from flat to percent, that is, att is flat, att_rate (and all other _rate) are percentage, I guess this change won't hurt.

But just want to run by you if you see any issues before I update the database.

Edit:

Also, if you'd like to support other languages, you can add the querystring ?lang={language} to the calls, where {language} is one of these: ['en','de','es','fr','jp','ko','pt','cn'], examples:

https://api.epicsevendb.com/hero?lang=ko | https://api.epicsevendb.com/hero/alencia?lang=jp | https://api.epicsevendb.com/artifact?lang=de | https://api.epicsevendb.com/artifact/abyssal-crown?lang=fr and so on

@Zarroc2762
Copy link
Owner

Thanks for the heads-up. All stat values are converted to float in the optimizer already, so this change should not affect the optimizer.

@Perpetuous
Copy link

Roana, LQC and a few other heroes still are not showing up for me even after the api update. Are they still not supposed to be available or is this a bug?

@RaphaelDDL
Copy link
Author

Roana was added a few minutes ago https://api.epicsevendb.com/hero/roana but LQC is been there for a while https://api.epicsevendb.com/hero/little-queen-charlotte

Zarroc updated optimizer again few hours ago (v2.8.4) to clear the cache, maybe you are still seeing cache? Not sure if there's a "clear cache" button to try download latest from E7DB since I can't run optimizer on Mac xD

@ellesde
Copy link
Contributor

ellesde commented Apr 18, 2020

Roana, LQC and a few other heroes still are not showing up for me even after the api update. Are they still not supposed to be available or is this a bug?

Do you have Cache data from epicsevendb.com checked in the General tab? If you do you'll need to click Clear cache. This will force the optimizer to download the latest heroes.

image

image

The optimizer probably will show a big red X for the portrait as the assets for the newest heroes are still missing.

@RaphaelDDL
Copy link
Author

@ellesde talking of assets, now every hero (and skills, specialty, etc), buff, item, artifact has an assets object:

image

So you can now rely on those URLs instead of the manually mounted with the _id as previously in v1. That's because now I have the asset->image mapping, so I don't need to manually rename all files.

@Perpetuous
Copy link

Roana, LQC and a few other heroes still are not showing up for me even after the api update. Are they still not supposed to be available or is this a bug?

Do you have Cache data from epicsevendb.com checked in the General tab? If you do you'll need to click Clear cache. This will force the optimizer to download the latest heroes.

image

image

The optimizer probably will show a big red X for the portrait as the assets for the newest heroes are still missing.

I cleared the cache and can now see LCQ, Roana is still not appearing in the list though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants