Currently there is no easy way to quickly alias the returned labels. The best way at the moment is to create a custom data table which makes your query to TMDB and transforms the result (with Javascript, in an <execute>
block) to whatever you want it to be.
For example, I created a quick custom table for you which returns the results with your labels of choice (name
and year
). It also removes the parentheses from around the year. To give it a test run, use:
use "store://github.com/tmdb-jp" as tmdb;
select * from tmdb where movieid="27205"
With the resulting JSON having the following structure (within the usual YQL response):
"movie": {
"title": "Inception",
"year": "2010"
}
If you want to have a go at creating a data table yourself, or just see what's involved, then the source is on my github. Also (it might be useful) you can query for multiple movies at once:
use "store://github.com/tmdb-jp" as tmdb;
select * from tmdb where movieid in ("27205","9802")
P.S. The store://
URLs just mean that the data table is being stored in Yahoo!'s "cloud" for speed and reliability. You can of course use a normal http://
URL (e.g. by github one) instead.