Forum Settings
Forums

API does not return correct results after updating list

New
Jun 21, 2012 9:00 AM
#1

Offline
Aug 2007
171
I'm working on an Android application, and I've noticed that the API does not return correct results for your list after you've made an update to an entry. This is a huge problem. I have come up with a work-around for my purposes, but here is how to observe the problem:

1. Update an entry in the usual fashion:

curl -u user:password -d data="XML" http://myanimelist.net/api/animelist/update/21.xml

2. Observe and refresh the XML data being returned from the user's list after the update. If you refresh a few times, you'll notice the values go back and forth from the old values to the new ones for about a whole minute, then finally stop and settle on the correct value you updated the entry with.

http://myanimelist.net/malappinfo.php?u=username&status=all&type=anime

This means that you can't do your update and request a fresh list for more accurate syncing with the server, you have to keep track of the changes locally, and hope that the user doesn't do something within the time frame to cause a refresh of the data in your app, or else they might become confused when the entry they just updated doesn't appear to have been updated, but then another moment later it is.

Oddly, viewing your list page on the server always shows the correct values you updated the entry with. It's just the API that seems really flaky. Is this because there is some convoluted process going on in the background to do the updates through the API? Why not just simply push the update to the database directly so the results are always accurate when requested shortly afterwards?

It just seems kind of dumb. Nothing I can't deal with... But extra work always kind of stinks. It lowers the reliability quite a bit for the app (or whatever else you are using the API for).
Jun 26, 2012 3:15 PM
#2

Offline
Jan 2010
10
Oddly, this also happens when you try to update your custom css on the site (the changes only stabilize a couple of minutes after the update) so I don't think the problem is really the API, unless the site uses an extension of the API to update the list styles (oh god wat).

It's a shame there's so little support to the API. So much potential and yet... Still, it's better than the AniDB one.

Please Admins, I know you guys don't owe us anything but can you please at least look into the matter, even slightly? Is there really nothing that can be done to correct issues like these on the API side? =(
Jun 26, 2012 3:28 PM
#3

Offline
Aug 2007
171
Just think I should say this, just in case.

Don't get me wrong, I don't have a sense of entitlement or anything, far from it. I appreciate that they're providing an API for us to use at all, it's a wonderful thing. It's just kind of too bad that it's got lots of potential as you say, but that it's also so broken... At least when it comes to the issue I mentioned above.

It does work, it just seems rather unstable, like there's something going on in the background to handle the updates that maybe isn't necessary, and is just adding complication to the whole process, and maybe even unnecessary overhead.
Jun 26, 2012 7:57 PM
#4

Offline
Nov 2007
3402
MAL may have fixed its time traveling lag issues but in terms of overall master->slave server syncing, updates around various critical points of the site still take a bit of time to refresh. The most obvious case of this has been profile pictures.

MAL's development isn't dead but it's certainly "slow" to put it nicely. I know it's frustrating but a work around on your end is probably the only solution at this point in time. The laundry list for bugs/features isn't pretty and only Xinil and Crave can do anything about it.
Jul 2, 2012 4:07 PM
#5
Overlord

Offline
Nov 2004
5752
This problem stems from the amount of data returning from malappinfo.php. The bigger the file, the more fickle the caching is. My suggestion (at least in an attempt to lessen the hate) is to be as specific as you can with the 'status.' Caching small amounts of data is the best bet to getting a new piece of cache.

How do you guys feel about a RESTful GET of an anime in your list? That would fix this particular issue wouldn't it?

[NOTE: THIS IS NOT YET ACTIVE] Something like: http://myanimelist.net/api/animelist/info/21.xml (this will get you all info relating to anime ID 21, for your animelist.)
Jul 2, 2012 4:52 PM
#6

Offline
Jan 2010
10
Well, that's all I needed to ear. If you guys have your hands full at the moment, I'll just have to continue doing what I can on my end. I just needed to know that development was still ongoing.

Also, there's no hate here. We love you guys, we just can't help but feel a little frustrated when no responses are given. At least I can't.

Anyways, thanks for the heads up =)
Aug 15, 2012 5:51 PM
#7

Offline
Aug 2007
171
Hey no worries, and no hate :) It's neat knowing the reasons behind why it is the way it is. I'm doing as you suggested and am doing some caching now, so things at least for what I'm working on are all good now.
Aug 15, 2012 10:24 PM
#8

Offline
Aug 2007
171
I know I'm bumping but:

"Xinil" said:
How do you guys feel about a RESTful GET of an anime in your list? That would fix this particular issue wouldn't it?

[NOTE: THIS IS NOT YET ACTIVE] Something like: http://myanimelist.net/api/animelist/info/21.xml (this will get you all info relating to anime ID 21, for your animelist.)


That would be amazing. Do you think something like that could be done for anime/manga info as well, akin to what we get when we search? Only instead of searching for a title and having to find the right ID in the results, we could just use an ID to get the exact info we need?

More topics from this board

» MAL friend suddenly had their account deleted...?

SmugSatoko - Oct 11

2 by Fluffygreygrass »»
Oct 11, 9:15 PM

» App Not Working

Reecey91 - Oct 7

16 by 1bubb1 »»
Oct 11, 1:11 PM

Sticky: » Club President Request Thread ( 1 2 3 4 5 ... Last Page )

Kineta - Aug 7, 2010

784 by meowyy23 »»
Oct 11, 12:22 PM

» Why is Myanimelist not working in Dubai?

ConstantReader - Oct 11

0 by ConstantReader »»
Oct 11, 4:08 AM

» How do I transfer all my Anime onto a different account?

REKT - Dec 10, 2014

15 by Thunder_lol »»
Oct 10, 2:58 PM
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login