eventregistry
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -5,3 +5,3 @@ { | ||
"description": "Package containing wrapper functions for Event Registry API", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "main": "./dist/index.js", |
@@ -35,1 +35,55 @@ ## Accessing Event Registry data through JS | ||
When making queries to Event Registry you will have to use an API key that you can obtain for free. | ||
### Three simple examples to make you interested | ||
**Print a list of recently added articles mentioning George Clooney** | ||
``` typescript | ||
import {EventRegistry, QueryArticlesIter} from "eventregistry"; | ||
const er = new EventRegistry({apiKey: "YOUR_API_KEY"}); | ||
er.getConceptUri("George Clooney").then((conceptUri) => { | ||
const q = new QueryArticlesIter(er, {conceptUri: conceptUri, sortBy: "date"}); | ||
q.execQuery((items) => { | ||
for(const item of items) { | ||
console.info(item); | ||
} | ||
}) | ||
}); | ||
``` | ||
**Search for latest events related to Star Wars** | ||
``` typescript | ||
import {EventRegistry, QueryEvents, RequestEventsInfo} from "eventregistry"; | ||
const er = new EventRegistry({apiKey: "YOUR_API_KEY"}); | ||
er.getConceptUri("Star Wars").then((conceptUri) => { | ||
const q = new QueryEvents({conceptUri: conceptUri}); | ||
const requestEventsInfo = new RequestEventsInfo({sortBy: "date", count: 10}); | ||
q.addRequestedResult(requestEventsInfo); | ||
return er.execQuery(q); | ||
}).then((response) => { | ||
console.info(response); | ||
}); | ||
``` | ||
**What are the currently trending topics** | ||
``` typescript | ||
import {EventRegistry, GetTrendingConcepts} from "eventregistry"; | ||
const er = new EventRegistry({apiKey: "YOUR_API_KEY"}); | ||
const q = new GetTrendingConcepts({source: "news", count: 10}); | ||
er.execQuery(q).then((response) => { | ||
console.info(response); | ||
}); | ||
``` | ||
## Data access and usage restrictions | ||
Event Registry is a commercial service but it allows also unsubscribed users to perform a certain number of operations. Free users are not allowed to use the obtained data for any commercial purposes (see the details on our [Terms of Service page](http://eventregistry.org/terms)). In order to avoid these restrictions please contact us about the [available plans](http://eventregistry.org/pricing). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
634017
88