nickelc / modio-rs

🦀 Rust interface for integrating https://mod.io - a modding API for game developers
Apache License 2.0
15 stars 5 forks source link

Missing field `monetisation_options` #8

Closed valentinegb closed 1 year ago

valentinegb commented 1 year ago

In my project which uses anyhow, this bit of code:

// get subscribed mods
let mut subscriptions = modio
    .user()
    .subscriptions(mods::filters::GameId::_in(BONELAB_GAME_ID))
    .collect()
    .await?;

returns this error:

error decoding response body: missing field `monetisation_options` at line 1 column 8458: missing field `monetisation_options` at line 1 column 8458

My theory is that mod.io must've updated their API recently with a breaking change, because I haven't made any changes to my entire program in 2 weeks and it worked back then.

As far as I'm aware, every version of this library is currently broken for everybody. This needs to be fixed ASAP!

nickelc commented 1 year ago

Thanks for reporting.

Can you test the workaround I pushed into the hotfix branch?

valentinegb commented 1 year ago

Can you test the workaround I pushed into the hotfix branch?

Yeah, sorry, busy at the moment, but I'll have tested it in about 20 minutes.

valentinegb commented 1 year ago

Tested it, all good 👍

nickelc commented 1 year ago

I'll prepare a new patch release.

valentinegb commented 1 year ago

I'll prepare a new patch release.

My project uses the fork of this project I made for my previous pull request, so this fix needs to be pulled into the master branch for me to be able to sync my fork and take advantage of it.

nickelc commented 1 year ago

The changes will land on master.

I'm aware of your pull request. I didn't have time to reply but I've picked up the rewrite I started some time ago and will honor your feature request.

nickelc commented 1 year ago

Release a new version and pushed the changes.

valentinegb commented 1 year ago

Great, thanks. Feel free to close this issue if you'd like to.

nickelc commented 1 year ago

We've updated monetisation to monetization in our API for consistency - the rest of our API uses American English.

Since these attributes haven't been officially released, they're subject to change, so it's best to not rely on them just yet.

I got this response from mod.io. This basically means that docs.mod.io is not reliable.

Sorry for the inconvenience.

nickelc commented 1 year ago

I had to push more changes to fix deserialization issues.