Forum - View topicANN API new developer questions :)
|
Author | Message | |||
---|---|---|---|---|
FFGenerations
Posts: 3 |
|
|||
Hey guys, I'm a university student doing a software engineering final project. I'm interested in making a website application that permits user to search an anime database (such as ANN or MAL) and retrieve anime cover images (and anime info) as a response.
I'm a newbie to programming so I've been struggling a bit to get started FYI. Right now I'm looking into what anime databases/APIs are available to public use and just having a look at ANN in order to compare it with MAL and AniDB. Would anyone be able to please comment on your API for me or perhaps direct me to documentation page? I'm interested to know things like... 1) what programming language can I use or is recommended to use with your API? For instance, AniDB has a UDP API (although I don't know what that means yet!) and MAL Atarashii formats into JSON instead of XML but only supports PHP 2) what are the limitations or advantages of your API or ANN as a web service? for instance, a) are there any limitations to your API or functionality I might miss? b) I will have to be careful not to send to many requests to your website or I will get banned - how can i find out more about this? 3) How is your anime database maintained - is it a collaborative effort by staff moderating user input? How does your site compare to say MAL database? (I know this is a weird question but its interesting to know for my project and being able to justify decisions ) 4) What existing apps use ANN API? (obviously I'll have a search round the site and google regarding this and my other questions ) 5) Would you recommend that I develop using ANN API? I guess that is enough questions for now I have other questions as a newbie developer with regards to things like ... choice of programming language ... choice of framework ... choice of database ... how to increase performance (speed) of my website using things like Ajax requests, and how this might have an impact on my use of your API/resources? Thanks ever so much for reading. Send me a PM if you want or an angry message telling me that I should be reading X documentation etc (will go have a search around now) Really any help or tips at all would be awesome. Cheers Edit: just reading your FAQ/About page animenewsnetwork.com/faq#what_is_ann Edit2: Your API documentation page animenewsnetwork.com/encyclopedia/api.php is really small when compared to the AniDB documentation page(s) http://wiki.anidb.net/w/UDP_API_Definition I'm wondering if somebody with any technical understanding might be able to briefly explain the major difference between the two? |
||||
Tempest
I Run this place.
ANN Publisher Posts: 10419 Location: Do not message me for support. |
|
|||
I've pointed this question out to Dan.
-t |
||||
FFGenerations
Posts: 3 |
|
|||
Thanks dude. Answers to some questions become clearer as I progress slowly with the project research.. However I think I will definitely need to know if you impose any guidelines or regulations on the use of your API. It may be that since you're a large website that you don't have any traffic problems with people using your API and hence don't have any guidelines. I've sort of narrowed down choosing between you and Hummingbird - Hummingbird because the programmer staff are real friendly and ANN because your API looks really simple and straight-forward with good documentation and on a large reliable website. If someone could reply with a comment like "sure go ahead, ANN will be fine to work with" that'd be great (or the opposite) Today I'll be doing some project research/work, maybe get in contact with other developers, go back and read your documentation and check to see if I would need to be whitelisted etc, see if there is a risk of being accidentally banned and if getting unbanned is a fast process, and see if I can finalise my choice of API/website. Cheers! |
||||
Dan42
Chief Encyclopedist
Posts: 3781 Location: Montreal |
|
|||
1) The API just returns just XML data. If your programming language can process XML (i.e. all of them) that means you can use it.
2a) One limitation I can think of is that the API is read-only. You can't use it to submit data on behalf of users. 2b) We've never had to impose limits because we've never had problems. If someone uses the API in a way that causes the website performance issues then we'll add rate-limiting or something. As long as you don't use the API in a massively parallel fashion (ex. sending 10k requests simultaneously) I doubt there will be any problem. 3) It's a collaborative database. I have no idea about the MAL database so I can't make comparisons there. 4) I'm not keeping track of that 5) uh... yes?
|
||||
FFGenerations
Posts: 3 |
|
|||
Hi again, thanks for your responses last time. I'm back on this project after some downtime
I sent you a PM with this, Dan, but my sentbox appears empty so I thought I'd better post here just incase: I have a question about using your encyclopedia API. I want my website homepage to display to users the top 10 rated anime on your website along with their thumbnail images. I could have my website fetch/update a list of these on a daily/weekly basis and store the thumbnails myself. Is there a report I can use to retrieve this data? I am looking at animenewsnetwork.com/encyclopedia/reports.php?id=172&nskip=0&nlist=10 however this doesn't return the thumbnail url of the anime. I guess a good alternative option would be to send a 2nd request to gather the full details of each anime after fetching the anime IDs from the first report.. but I thought I should ask if its possible to get (anime title) + rating + thumbnail in one report (that's all the data i would need i believe) Also, what is "gid" here? animenewsnetwork.com/encyclopedia/reports.php?id=155 Thankyou! |
||||
Dan42
Chief Encyclopedist
Posts: 3781 Location: Montreal |
|
|||
Yes, if you want the thumbnail info, make a second request to get the anime details. That's what it's for.
The gid is the same value that you get in the <anime> tag
There's an anime#1234, a person#1234, a company#1234, but gid 2415734675 refers to one thing only, it's a global id. |
||||
bocahapi
Posts: 1 |
|
|||
hi, im try use API in PHP languange but i have error. can any want tell me about how to use API in PHP please
|
||||
Tempest
I Run this place.
ANN Publisher Posts: 10419 Location: Do not message me for support. |
|
|||
You'll have to describe your error in a bit more detail. |
||||
_INTER_
Posts: 1 |
|
|||
Sorry for shooting in between, but we might encounter the same error. I'm also using the API to extract some information with Python.
However for certain XML responses a "xml parsing mal formed error" occurs. Same with firefox. For example: cdn.animenewsnetwork.com/encyclopedia/api.xml?title=16816 there seems to be an invisible backspace control character before the first japanese character in the tag (which appears at least for the "official website" tag with gid=342673510) |
||||
gudvinr
Posts: 5 |
|
|||
curl gives me pretty normal result - http://pastebin.com/PxtkSxKB But as you can see, backspace char removes '>' after info tag on 10th string. I guess that you can solve your problem inside your parser. For example, it's possible to replace all U+0008 chars with empty string. |
||||
Dan42
Chief Encyclopedist
Posts: 3781 Location: Montreal |
|
|||
Ok I fixed the bad data in the Encyclopedia, but it'll take a little while for the cached page to renew.
It looks like it was the only entry that contained a 0x08 character, but honestly I'm flabbergasted that 1) someone managed to type a backspace character in the input field 2) it was not escaped by the regular htmlspecialchars function |
||||
pushrbx
Posts: 4 Location: United Kingdom |
|
|||
Just use lxml and get a parser with the recover flag set to true. example: https://pastebin.com/RergEsg3 |
||||
Shiroi Hane
Encyclopedia Editor
Posts: 7578 Location: Wales |
|
|||
Something I noticed looking at this (unrelated to the thread sorry) - the source given for the Japanese title was a page on the admin server. It is being displayed as the public (www.) server in the non-edit view, but with a double slash after the domain.
|
||||
All times are GMT - 5 Hours |
||
|
Powered by phpBB © 2001, 2005 phpBB Group