anime/id Does Not Work As Expected With Optional Authentication.

Issue #39 resolved
Andy Ibanez created an issue

The anime endpoint (anime/id) does not properly return an anime object with watched_status, watched_episodes, and score populated. They return with null values.

The values are populated if I request an anime via the user profile, but it's not an essential work around.

I'm attaching pictures to show that I am indeed setting the Authentication header. The anime with ID 232 is in my dummy account's (Coder) list.

Comments (12)

  1. Ratan Dhawtal

    hm, apparently you are using not using the mine parameter. After some investigation I found out that we didn't added that part in the documentation. This will give you more details: "anime/1?mine=1" (it will return personal info + anime details). You should provide the "mine" parameter with "1" as value.

    anyway you should use in your case: "http://malapi.fairese.com/anime/232?mine=1" if you want the personal details.

    I will update the documentation later today. Thanks for informing us.

  2. Andy Ibanez reporter

    Seems to be working fine. Thanks.

    When I want to update the MAL API on my server, should I just replace the old files with the new ones?

  3. Ratan Dhawtal

    If a new API has been released than you can just replace the old files.The older APIs will be supported in the new API. In case of commits on a non Develop branch which has been tagged before you can also replace it.

    Like API 2 will change some output formats but those will only be available with the "2/anime/1?mine=1". so if your app/plugin is using an older version it will make a request like "1/anime/1?mine=1" (or anime/1?mine=1). In that case the "1/anime" or "/anime" requests will return the old output. So your app isn't forced to use the new API and can just use the old one for the time being.

    Any old app will work and the new app with the new API will work just fine ^^

    Note: Do not use the Develop branch as an update, only tagged releases!

  4. Andy Ibanez reporter

    Heya, thanks a lot for your help and answers, I have one final question.

    I'm actually building an iOS framework that interacts with Atarashii. Is there a way to see what version of the framework I'm currently running on my server? Just so I can add compatibility notes when I release my framework.

  5. Ratan Dhawtal

    Sorry I and the other developer didn't knew what you meant. Could you explain it in a different way?

  6. Andy Ibanez reporter

    Heh, sorry about that. But I'm talking about software versioning. Ya know, Version 1.0.1, 1.0.1, 2.1.1, and so on.

  7. Michael Johnson

    Ideally, you shouldn't worry about the software version, only the API revision. Please note that API revision is not related to our software version very closely at the current time.

    If we make a change in a call or response, the API version will be changed. If we ever make a change and it affects the input or output of an API call on a stable API version, that is a bug and should be reported.

    Currently, we have two API versions in the code. In development, we are working on API 2.0. It's a major feature bump and cleanup of API 1.0. There is a strong possibility that portions of it will change before it's considered stable. If you use API 2, be prepared for that.

    For production use, we have API 1.0, which has quirks, but will not be changing in any way. API 1.0 is designed to be a drop-in replacement for the Unofficial MAL API written by Cheah Chu Yeow, so only changes made where API 1.0 breaks compatibility will be made.

    That said, the code usually gets tagged when it gets to a stable point. For instance, we have a tag "0.9" that represents the API software at a pretty stable point. Some bugfixes related to API 1 compatibility have gone in since then, but nothing that breaks functionality. If you're running a public API endpoint, you should follow the tags unless you have good reason not to.

  8. Andy Ibanez reporter

    Ah, that makes sense. How do I check the API version I'm using then?

    Last time I installed Atarashii on my server was this month. But I don't remember when exactly.

  9. Michael Johnson

    Note: I heavily edited my previous message.

    You can easily tell the API by the path you are using in your calls. If you're using bare paths like "/anime/19221" or a path beginning with "1" like "/1/anime/19221" then you're using API 1.0. If the paths begin with "/2" then you're using the unstable API 2.0. Paths without the API version will be dropped when API 2 is stable, so please make sure to use versioned paths.

    Depending on how you downloaded the API code, you may be able to find the code revision. If you did a checkout with git, run "git rev-parse HEAD" and you'll know the revision you checked out. If you used a snapshot from the downloads section, the name of the file downloaded will tell you what revision you got.

  10. Log in to comment