Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zio/interop-twitter
https://github.com/zio/interop-twitter
scala zio
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zio/interop-twitter
- Owner: zio
- License: apache-2.0
- Created: 2019-06-09T16:46:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-09T02:47:50.000Z (10 months ago)
- Last Synced: 2024-04-23T05:29:22.970Z (10 months ago)
- Topics: scala, zio
- Language: Scala
- Homepage: https://zio.dev/zio-interop-twitter
- Size: 204 KB
- Stars: 14
- Watchers: 8
- Forks: 18
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Twitter Interop
[![Project stage][Stage]][Stage-Page]
![CI][Badge-CI]
[![Releases][Badge-SonatypeReleases]][Link-SonatypeReleases]
[![Snapshots][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots]This library provides capability to convert Twitter `Future` into ZIO `Task`.
### Example
```scala
import com.twitter.util.Future
import zio.{ App, Task }
import zio.console._
import zio.interop.twitter._object Example extends App {
def run(args: List[String]) = {
val program =
for {
_ <- putStrLn("Hello! What is your name?")
name <- getStrLn
greeting <- Task.fromTwitterFuture(greet(name))
_ <- putStrLn(greeting)
} yield ()program.exitCode
}private def greet(name: String): Future[String] = Future.value(s"Hello, $name!")
}
```[Badge-CI]: https://github.com/zio/interop-twitter/workflows/CI/badge.svg
[Badge-SonatypeReleases]: https://img.shields.io/nexus/r/https/oss.sonatype.org/dev.zio/zio-interop-twitter_2.12.svg "Sonatype Releases"
[Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/dev.zio/zio-interop-twitter_2.12.svg "Sonatype Snapshots"
[Link-Circle]: https://circleci.com/gh/zio/interop-twitter/tree/master
[Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/dev/zio/zio-interop-twitter_2.12/ "Sonatype Releases"
[Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/dev/zio/zio-interop-twitter_2.12/ "Sonatype Snapshots"
[Stage]: https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg
[Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages