All Projects → yigitozkavci → hurriyet-ruby

yigitozkavci / hurriyet-ruby

Licence: MIT license
Ruby Wrapper for Hurriyet API - http://developers.hurriyet.com.tr/

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to hurriyet-ruby

unity sdk
Voximplant SDK for adding messaging, voice calling, video chat, and live streaming to Unity apps
Stars: ✭ 17 (+41.67%)
Mutual labels:  client-sdk
unleash-client-java
Unleash client SDK for Java
Stars: ✭ 86 (+616.67%)
Mutual labels:  client-sdk
Gmusicapi
An unofficial client library for Google Music.
Stars: ✭ 2,543 (+21091.67%)
Mutual labels:  client-lib

hurriyet-ruby

Gem Version Test Coverage Travis CI

Unofficial Ruby Wrapper for Hurriyet API - http://developers.hurriyet.com.tr/

Getting Started

Installation

$ gem install hurriyet

Usage

require 'hurriyet'

client = Hurriyet::Client.new(<YOUR_API_KEY>)
client.articles.all

Table of Contents

Resources

Other

Resources

Articles

# Get all articles
client.articles.all
# Get a single article
client.articles.single(40220736)

Columns

# Get all columns
client.columns.all
# Get a single column
client.columns.single(40220397)

News Photo Galleries

# Get all galleries
client.news_photo_galleries.all
# Get a single gallery
client.news_photo_galleries.single(40220735)

Pages

# Get all pages
client.pages.all
# Get a single page
client.pages.single('55e861bc6534652c108afa2f')

Paths

# Get all paths
client.paths.all
# Get a single path
client.paths.single('563cddcc67b0a934e44ee2d7')

Writers

# Get all writers
client.writers.all
# Get a single writer
client.writers.single('570167e867b0a90bdc503452')

Parameters

Hurriyet API allows you to filter, select and limit the resources you fetch. Here is how:

  • $select: Select only 1 column from incoming resources.
  • $top: Limit response resources.
  • $filter: Filter incoming resources. See here for more info.
# Takes 3 articles.
client.articles.all top: 3

# Takes 3 articles of which path equals to 'gundem'
client.articles.all top: 4, filter: 'Path eq \'gundem\''

# Selects title of articles of which title contains word 'Istanbul'
client.articles.all filter: 'contains(Title, \'Istanbul\')', select: 'Title'

LICENSE

This project is licensed under the terms of the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].