xmjw / News-API-ruby

Our officially supported Ruby client library for accessing News API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

News API SDK for Ruby

Installation

gem install news-api

Usage

Initilisation

require 'news-api'

n = News.new("api_key")

Sources

n.get_sources(country: 'us', language: 'en')

Everything

n.get_everything(q: "apple", from: "2018-01-05&to=2018-01-05", sortBy: "popularity")

Top Headlines

n.get_top_headlines(sources: "bbc-news")

About

Our officially supported Ruby client library for accessing News API.

License:MIT License


Languages

Language:Ruby 100.0%