anybody interested in developing HTTP API?
Posted: Thu Nov 16, 2006 11:29 am
does anidb has any plans for a http based API? namely through http get and post. despite the work being done on the udp API, I feel that it will be a lot more flexible in the long run.
For those who may not understand, basically, the client will make a http request maybe like
http://anidb.info/perl-bin/anime.php?id=979
The anime.php is a php script that will generate the JSON, while the query indicates which anime we are requesting.
a sample JSON reply will be:
I'm using JSON here cos it is much leaner and easier to read than XML. Greatly reduces the amount of data being transferred and parsed. Of course, there will be other scripts for querying other things like perhaps companies, individuals, genres etc. Having such a framework will also make anidb AJAX ready which will release the full power of the browser allowing the web pages to rival any standalone app.
If there isn't atm, wonder if anybody is interested and if anidb admin is supportive? I am interested in such a project, particularly in the design of the data exchange and services, but I an not a php/pl programmer (Works in C++, javascript mostly). However, the things that I am looking at the moment should be very straight forward as it mirrors what can be accessed from http manually. In fact, for a hack, we can actually parse the current htmls directly (very very messy and will break if the web format changes).
This is just the first step I'm looking at. The next step will be coming up with a generic anime information data structure that is server independent and coming up with proper abstraction that will allow anime data of different structure (e.g. from other anime sites) be transformed into a common format that can be used in a web client or standalone client. The advantage is that the clients will see only ONE generic format while the actual transforms etc will be provided by development team dedicated to each site/data source. It will certainly make future maintenance easier imo.
After that is done, what I hope to achieve is something like animelamp (an anime collection manager), where it can double as a anime collection organizer, which can query online databases to fill up info for a new anime, as well as provide links to the online files/cds/dvds while indicating those that are offline. specialized filters may be created to synchronize the applicable information between the client and the anidb lists.
Well, those are just some of the possibilities
Looking forward to replies from the admin as well as interested parties.
For those who may not understand, basically, the client will make a http request maybe like
http://anidb.info/perl-bin/anime.php?id=979
The anime.php is a php script that will generate the JSON, while the query indicates which anime we are requesting.
a sample JSON reply will be:
Code: Select all
{
infotype: "anime_info"
, animeid: 979
, coverimage : {type:"url", url:"http://www.sonymusic.co.jp/Animation/hagaren/"}
, title: {
full: "Hagane no Renkinjutsushi"
, kana: "鋼の錬金術師"
, english: "Fullmetal Alchemist"
, synonym: ["Full Metal Alchemist", "Metalinis Alchemikas"]
, short : ["FMA", "Fullmetal", "HagaRen", "HagaRen TV", "HnR", "fma tv", "fmatv"]
}
, genre: [[2,"Adventure"], [4,"Drama"], [14,"Magic"], [30,"Shounen"]]
, type: "TV Series"
, episodes : 51
, year : "04.10.2003-02.10.2004"
, companies : [
[292,"Arakawa Hiroshi"], [47,"Aniplex"], [39,"BONES"], [282,"MBS"]
]
, url : "http://www.sonymusic.co.jp/Animation/hagaren/"
, relations : {
sequel:[
[2359, "Gekijouban Hagane no Renkinjutsushi: Shambala o Yuku Mono"]
]
}
}
If there isn't atm, wonder if anybody is interested and if anidb admin is supportive? I am interested in such a project, particularly in the design of the data exchange and services, but I an not a php/pl programmer (Works in C++, javascript mostly). However, the things that I am looking at the moment should be very straight forward as it mirrors what can be accessed from http manually. In fact, for a hack, we can actually parse the current htmls directly (very very messy and will break if the web format changes).
This is just the first step I'm looking at. The next step will be coming up with a generic anime information data structure that is server independent and coming up with proper abstraction that will allow anime data of different structure (e.g. from other anime sites) be transformed into a common format that can be used in a web client or standalone client. The advantage is that the clients will see only ONE generic format while the actual transforms etc will be provided by development team dedicated to each site/data source. It will certainly make future maintenance easier imo.
After that is done, what I hope to achieve is something like animelamp (an anime collection manager), where it can double as a anime collection organizer, which can query online databases to fill up info for a new anime, as well as provide links to the online files/cds/dvds while indicating those that are offline. specialized filters may be created to synchronize the applicable information between the client and the anidb lists.
Well, those are just some of the possibilities
Looking forward to replies from the admin as well as interested parties.