Skip to content

Instantly share code, notes, and snippets.

@miguelpeixe
Created August 21, 2014 00:29
Show Gist options
  • Save miguelpeixe/0da7f864967e32a196b6 to your computer and use it in GitHub Desktop.
Save miguelpeixe/0da7f864967e32a196b6 to your computer and use it in GitHub Desktop.
freebasil
var request = require('request');
var _ = require('underscore');
var query = [{
"type": "/film/film",
"country": "Brazil",
"name": [{}],
"tagline": [{}],
"key": [{}],
"limit": 2000
}];
request.get('https://www.googleapis.com/freebase/v1/mqlread?query=' + JSON.stringify(query), function(error, response, body) {
var data = JSON.parse(body).result;
console.log(data.length);
});
/*
* Testes com apis externas
* IMDB: http://www.myapifilms.com/tmdb/movieInfoImdb?idIMDB=tt0317248&language=pt&images=1
* Wikipedia:
* http://pt.wikipedia.org/w/api.php?action=parse&page=Bye_Bye_Brasil&format=json&prop=sections
* http://pt.wikipedia.org/w/api.php?action=parse&page=Bye_Bye_Brasil&format=json&prop=text&section=1
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment