Hurriyet
Hurriyet Public API wrapper for Humans
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);
h.Articles.getAll({limit:4},newsCallback);
h.Articles.getAll({limit:4,select:"Description"},newsCallback);
Get single news from id
h.Articles.getFromId(40199111,newsCallback);
h.Articles.getFromId(40199111,{select:"Description"},newsCallback);
Columns
Get columns
h.Columns.getAll(newsCallback);
h.Columns.getAll({limit:4},newsCallback);
h.Columns.getAll({limit:4,select:"Fullname,Title"},newsCallback);
Get single column from id
h.Columns.getFromId(40190106,newsCallback);
h.Columns.getFromId(40190106,{select:"Text"},newsCallback);
Date
h.Date(newsCallback);
News Photo Gallery
Get galleries
h.NewsPhotoGallery.getAll(newsCallback);
h.NewsPhotoGallery.getAll({limit:3},newsCallback);
h.NewsPhotoGallery.getAll({limit:4,select:"Url,Title"},newsCallback);
Get single gallery from id
h.NewsPhotoGallery.getFromId(40190642,newsCallback);
h.NewsPhotoGallery.getFromId(40190642,{select:"Description"},newsCallback);
Writers
Get Writers
h.Writers.getAll(newsCallback);
h.Writers.getAll({limit:3},newsCallback);
h.Writers.getAll({limit:4,select:"Fullname"},newsCallback);
Get single writer from id
h.Writers.getFromId("55ea09f9f018fbaf449425c4",newsCallback);
h.Writers.getFromId("55ea09f9f018fbaf449425c4",{select:"Fullname"},newsCallback);
License
This is available as open source under the terms of the MIT License.