Comparing version 0.3.2 to 0.3.3
@@ -9,3 +9,3 @@ { | ||
"description": "The newsQuery NPM package provides a simple interface to BBC News Labs APIs", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"main": "./lib/newsquery.js", | ||
@@ -12,0 +12,0 @@ "keywords": [ |
newsQuery | ||
========= | ||
The newsQuery module provides easy to consume access to the BBC News Labs APIs. | ||
The newsQuery module provides easy-to-consume access to the BBC News Labs APIs. | ||
The APIs let you query a database of 40+ news sources, including content from the BBC but also other publications including The Guardian, The Mirror, The Huffington Post and others. | ||
The majority of our content is articles but we also have images, video and tweets from a select range of sources. | ||
The BBC News Labs API's are experimental and are cheifly intended for use by R&D teams in news orgs and in universities. If you'd like to more more or have any feedback about them, you can get in touch with @BBC_News_Labs on Twitter. | ||
@@ -35,2 +39,6 @@ | ||
You need to get a definative URI for a concept before you can search for articles that mention it. | ||
A concept is typically a person, place, organisation or theme (e.g. "law", "economics"). These correspond to entries in dbpedia, which uses an ontology derived from data in Wikipedia. | ||
An example that returns the first 5 concepts matching the term "Rooney": | ||
@@ -47,3 +55,3 @@ | ||
The response from getConcepts() is an array of concepts: | ||
The response from getConcepts() is an array of concepts, each with a unique URI (and possibly an image): | ||
@@ -63,3 +71,3 @@ ``` javascript | ||
For example, to get concepts related to "Ukraine": | ||
To get concepts related to "Ukraine": | ||
@@ -77,7 +85,11 @@ ``` javascript | ||
i.e. how much times both concepts have been mentioned in the same article, tagged in one image, mentioned in a video, etc. | ||
``` javascript | ||
[ name: 'Russia', | ||
[ { name: 'Russia', | ||
uri: 'http://dbpedia.org/resource/Russia', | ||
occurrences: 9530, | ||
image: 'http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Russia.svg/200px-Flag_of_Russia.svg.png' ] | ||
image: 'http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Russia.svg/200px-Flag_of_Russia.svg.png' | ||
} | ||
] | ||
```` | ||
@@ -84,0 +96,0 @@ |
26864
193