https://github.com/seratch/hackernews4s
HackerNews API Client in Scala
https://github.com/seratch/hackernews4s
Last synced: 3 months ago
JSON representation
HackerNews API Client in Scala
- Host: GitHub
- URL: https://github.com/seratch/hackernews4s
- Owner: seratch
- License: mit
- Created: 2014-10-08T00:54:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-08T09:59:57.000Z (almost 8 years ago)
- Last Synced: 2025-03-24T04:22:08.094Z (over 1 year ago)
- Language: Scala
- Size: 30.3 KB
- Stars: 8
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# HackerNews API Client in Scala
[](https://travis-ci.org/seratch/hackernews4s)
[](https://maven-badges.herokuapp.com/maven-central/com.github.seratch/hackernews4s_2.11)
This library is made for Scala hackers.
## HackerNews API?
- http://blog.ycombinator.com/hacker-news-api
- https://hacker-news.firebaseio.com/
- https://github.com/HackerNews/API
## How to use
```scala
libraryDependencies += "com.github.seratch" %% "hackernews4s" % "0.6.0"
```
## APIs
See the scaladocs: [hackernews4s.v0.HackerNews](https://oss.sonatype.org/service/local/repositories/releases/archive/com/github/seratch/hackernews4s_2.11/0.6.0/hackernews4s_2.11-0.6.0-javadoc.jar/!/index.html#hackernews4s.v0.HackerNews)
## Examples
```scala
import hackernews4s.v0._
val topStories: Seq[Item] = HackerNews.getTopStories()
topStories.foreach(println)
```
See [HackerNews.scala](https://github.com/seratch/hackernews4s/blob/master/src/main/scala/hackernews4s/v0/HackerNews.scala) for details:
You can try the code examples in comments. We confirm they're valid code by using [sbt-doctest](https://github.com/tkawachi/sbt-doctest).
## License
The MIT License