Socket
Socket
Sign inDemoInstall

guardian-news

Package Overview
Dependencies
75
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    guardian-news

Guardian News API node module.


Version published
Weekly downloads
1
Maintainers
1
Install size
4.86 MB
Created
Weekly downloads
 

Readme

Source

Guardian News API NodeJS Module

This module can be used to query the Guardian's API. This module provides a thin wrapper around request.js to Guardian's API. All functions return promises. To learn more about the API, and which parameters can be passed to each function you can use the API explorer or the documentation.

Examples

Searching Content

var guardian = require('guardian-news');

guardian.config({
  apiKey : 'API-KEY'
});

guardian.content({
  q : 'clowns',
  fromDate : '2010-01-19'
}).then(function(response){
  console.log(response);
}, function(err){
  console.log(err);
});

Searching Sections

guardian.sections({
  q : 'sports'
}).then(function(response){
  
});

Searching Tags

guardian.sections({
  q : 'sports/tennis',
  page : 2
}).then(function(response){
  
});

Keywords

FAQs

Last updated on 14 Jul 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc