https://github.com/j5ik2o/scala-rakuten-api
This product is a Scala library for Rakuten API.
https://github.com/j5ik2o/scala-rakuten-api
akka-http rakuten scala scala-library
Last synced: about 2 months ago
JSON representation
This product is a Scala library for Rakuten API.
- Host: GitHub
- URL: https://github.com/j5ik2o/scala-rakuten-api
- Owner: j5ik2o
- License: mit
- Created: 2017-03-02T11:12:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:09:08.000Z (over 1 year ago)
- Last Synced: 2025-02-16T00:28:29.924Z (4 months ago)
- Topics: akka-http, rakuten, scala, scala-library
- Language: Scala
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scala-rakuten-api
This product is a Scala library for Rakuten API.
## Installation
Add the following to your sbt build (Scala 2.11.x, 2.12.x):
### Release Version
```scala
resolvers += "Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/"libraryDependencies += "com.github.j5ik2o" %% "scala-rakuten-item-search-api" % "1.0.3"
```### Snapshot Version
```scala
resolvers += "Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/"libraryDependencies += "com.github.j5ik2o" %% "scala-rakuten-item-search-api" % "1.0.4-SNAPSHOT"
```## Usage
The supported API is Item Search API only. Please refer to the following code.
```scala
import scala.concurrent.duration._implicit val system = ActorSytem()
val config = RakutenItemSearchAPIConfig(
endPoint = "app.rakuten.co.jp",
timeoutForToStrict = 10 seconds,
applicationId = ???
)val client = new RakutenItemSearchAPI(config)
val future = client.search(
keyword = Some("楽天"),
genreId = Some(559887),
genreInformationFlag = Some(true)
tagInformationFlag = Some(true)
)
// If the value is obtained from Future, call Await.result.
// You should call it as necessary as minimum to avoid frequent blocking.
val result = Await.result(future, Duration.Inf)
```