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

hurriyet

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hurriyet

Hurriyet Public API wrapper

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Hurriyet

Hurriyet Public API wrapper for Humans

npm version Build Status Codacy Badge

https://www.npmjs.com/package/hurriyet

Installation

Install using npm

npm install hurriyet

Usage

Get an API key from https://developers.hurriyet.com.tr

var Hurriyet = require('hurriyet');
var h = new Hurriyet('api token');
Callback Function
var newsCallback = function(err, data)
  if (err)
    console.log(err);
  console.log(data);
};

Articles

Get daily news
h.Articles.getAll(newsCallback); // Get daily news
h.Articles.getAll({limit:4},newsCallback); // Get top 4 daily news
h.Articles.getAll({limit:4,select:"Description"},newsCallback); // Get top 4 daily news' descriptions
Get single news from id
h.Articles.getFromId(40199111,newsCallback); // Get news from id = 40199111
h.Articles.getFromId(40199111,{select:"Description"},newsCallback); // Get news' description from id = 40199111

Columns

Get columns
h.Columns.getAll(newsCallback); // Get columns
h.Columns.getAll({limit:4},newsCallback); // Get 4 columns
h.Columns.getAll({limit:4,select:"Fullname,Title"},newsCallback); // Get 4 columns' writer and title
Get single column from id
h.Columns.getFromId(40190106,newsCallback); // Get column from id = 40190106
h.Columns.getFromId(40190106,{select:"Text"},newsCallback); // Get column's text from id = 40190106

Date

h.Date(newsCallback); // Get date - type RFC 1123
Get galleries
h.NewsPhotoGallery.getAll(newsCallback); // Get galleries
h.NewsPhotoGallery.getAll({limit:3},newsCallback); // Get 3 galleries
h.NewsPhotoGallery.getAll({limit:4,select:"Url,Title"},newsCallback); // Get galleries' url and title
h.NewsPhotoGallery.getFromId(40190642,newsCallback); // Get gallery from id = 40190642
h.NewsPhotoGallery.getFromId(40190642,{select:"Description"},newsCallback); // Get gallery's description from id = 40190642

Writers

Get Writers
h.Writers.getAll(newsCallback); // Get writers
h.Writers.getAll({limit:3},newsCallback); // Get 3 writers
h.Writers.getAll({limit:4,select:"Fullname"},newsCallback); // Get writers' fullname
Get single writer from id
h.Writers.getFromId("55ea09f9f018fbaf449425c4",newsCallback); // Get writer from id = 55ea09f9f018fbaf449425c4
h.Writers.getFromId("55ea09f9f018fbaf449425c4",{select:"Fullname"},newsCallback); // Get writer's fullname from id = 55ea09f9f018fbaf449425c4

License

This is available as open source under the terms of the MIT License.

Keywords

FAQs

Package last updated on 25 Sep 2016

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