GithubHelp home page GithubHelp logo

yigitozkavci / hurriyet-ruby Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 26 KB

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

License: MIT License

Ruby 100.00%
hurriyet-api api wrapper client-lib client-sdk

hurriyet-ruby's Introduction

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.

hurriyet-ruby's People

Contributors

enderahmetyurt avatar yigitozkavci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

enderahmetyurt

hurriyet-ruby's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.