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

dbpedia-sparql-client

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dbpedia-sparql-client

A simple DBpedia SPARQL client

  • 0.9.7
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

dbpedia-sparql-client

A promisified DBpedia SPARQL client that keeps it simple.

Install

npm install dbpedia-sparql-client

Note:

Requires fetch when running in a browser. If fetch is not available, install a fetch polyfill

Use

ES2015

import dps from 'dbpedia-sparql-client';
const query = `SELECT DISTINCT ?Concept WHERE {[] a ?Concept} LIMIT 10`;

dps
  .client() 
  .query(query)
  .timeout(15000) // optional, defaults to 10000
  .asJson()       // or asXml()
  .then(r => { /* handle success */})
  .catch(e => { /* handle error */});

ES5

var dps = require('dbpedia-sparql-client').default;
var query = 'SELECT DISTINCT ?Concept WHERE {[] a ?Concept} LIMIT 10';

dps.client()
  .query(query)
  .timeout(15000) // optional, defaults to 10000
  .asJson() // or asXml()
  .then(function(r) { /* handle success */ })
  .catch(function(e) { /* handle error */ });

License

MIT

Keywords

FAQs

Package last updated on 26 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