Popularity
1.9
Growing
Activity
0.0
Stable
1
3
0

Monthly Downloads: 7
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Network    
Latest version: v0.2

hurriyet alternatives and similar packages

Based on the "Networking" category.
Alternatively, view hurriyet alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of hurriyet or a related project?

Add another 'Networking' Package

README

hurriyet-haskell

Haskell bindings for Hurriyet API - http://developers.hurriyet.com.tr/

Getting Started

This section provides just enough material to get you started. For a more sophisticated illustration of the library, visit https://hackage.haskell.org/package/hurriyet for documentation.

To get started, do the following steps:

  • Install the package $ cabal install hurriyet
  • Go and get your api key from http://developers.hurriyet.com.tr/ while the package is being installed
  • And start using it! See below for examples

Examples

Get the list of articles

import Hurriyet
import Hurriyet.Services

client :: Client
client = getClient "<API KEY>"

main = do
  response <- withClient client getArticles
  case response of
    Left  err      -> print err
    Right articles -> print articles

Get the metadata of the first file of the first article

import Hurriyet
import Hurriyet.Services
import Hurriyet.Services.Article
import Hurriyet.Services.File

client :: Client
client = getClient "<API KEY>"

main = do
  response <- withClient client getArticles
  case response of
    Left  err         -> print err
    Right (article:_) -> print . metadata . head $ files article

Note that in order to use any accessor method for any of the services, you should import the relative service. See here for more detailed information regarding services.

Contributing

This library is currently maintained by me, and appreciate any contributions even if they just update the docs. There are beginner-friendly issues in here, and I encourage you to see if you can contribute in any way.

LICENSE

[MIT License](LICENSE)


*Note that all licence references and agreements mentioned in the hurriyet README section above are relevant to that project's source code only.