Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eventregistry

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventregistry

Package containing wrapper functions for Event Registry API

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
657
increased by3.63%
Maintainers
1
Weekly downloads
 
Created
Source

Accessing Event Registry data through JS

This library contains classes that allow one to easily access the event and article information from Event Registry (http://eventregistry.org).

Most of the package is quite similar to Event Registry Python so for all who are already acquainted with the Python version there shouldn't be any problems with using this package.

Installation

Event Registry package can be installed using the NodeJS Package Manager. Type the following in the command line:

npm install eventregistry

and the package should be installed. Alternatively, you can also clone the package from the GitHub repository. After cloning it, open the command line and run:

npm build

Validating installation

To ensure that the package has been properly installed type the following in you JS file:

import { EventRegistry } from "eventregistry";

If this doesn't produce any kind of error messages then your installation has been successful.

Updating the package

As features are added to the package you will need at some point to update it. In case you have downloaded the package from GitHub simply do a git pull. If you have installed it using the npm command, then simply run:

npm update eventregistry

Authentication and API key

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

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

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

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). In order to avoid these restrictions please contact us about the available plans.

FAQs

Package last updated on 11 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc