npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hurriyet

v0.3.1

Published

Hurriyet Public API wrapper

Downloads

293

Readme

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

News Photo Gallery

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
Get single gallery from id
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.