Created
August 21, 2014 00:29
-
-
Save miguelpeixe/0da7f864967e32a196b6 to your computer and use it in GitHub Desktop.
freebasil
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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§ion=1 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment