All Projects → StarryBlueSky → Penicillin

StarryBlueSky / Penicillin

Licence: MIT license
Modern powerful Twitter API wrapper for Kotlin Multiplatform. #PureKotlin

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Penicillin

GraphiPy
GraphiPy: Universal Social Data Extractor
Stars: ✭ 61 (-32.97%)
Mutual labels:  twitter-api, api-wrapper
kotlin-everywhere
Kotlin/Everywhere Beijing 2019
Stars: ✭ 31 (-65.93%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
Splitties
A collection of hand-crafted extensions for your Kotlin projects.
Stars: ✭ 1,945 (+2037.36%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
mobius.kt
Kotlin Multiplatform framework for managing state evolution and side-effects
Stars: ✭ 39 (-57.14%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
KMP-NativeCoroutines
Library to use Kotlin Coroutines from Swift code in KMP apps
Stars: ✭ 502 (+451.65%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
Notflix
Kotlin Multiplatform playground
Stars: ✭ 272 (+198.9%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
tv-maniac
Tv-Maniac is a Multiplatform app (Android & iOS) for viewing TV Shows from TMDB.
Stars: ✭ 55 (-39.56%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
sweekt
🍭 Some sugar to sweeten Kotlin development.
Stars: ✭ 35 (-61.54%)
Mutual labels:  kotlin-coroutines, kotlin-multiplatform
TDDWeatherApp
Android App trying to apply TDD and using MVVM, Kotlin Coroutines
Stars: ✭ 38 (-58.24%)
Mutual labels:  kotlin-coroutines
twitter-stream
A Go wrapper for Twitter's V2 Filtered Stream API
Stars: ✭ 26 (-71.43%)
Mutual labels:  twitter-api
Broadcast
🗣 A write-only Twitter client
Stars: ✭ 36 (-60.44%)
Mutual labels:  twitter-api
openfoodfacts-ruby
Open Food Facts API Wrapper
Stars: ✭ 27 (-70.33%)
Mutual labels:  api-wrapper
PostcodesioR
API wrapper around postcodes.io - free UK postcode lookup and geocoder
Stars: ✭ 36 (-60.44%)
Mutual labels:  api-wrapper
kmp mobile template
Template for the development of native iOS and Android apps with shared business-logic using KMP, Redux architecture and XcodeGen.
Stars: ✭ 21 (-76.92%)
Mutual labels:  kotlin-multiplatform
zoho-crm-php
An API wrapper library for Zoho CRM, written in PHP.
Stars: ✭ 15 (-83.52%)
Mutual labels:  api-wrapper
Dads
*BA DUM TSSS*
Stars: ✭ 240 (+163.74%)
Mutual labels:  kotlin-multiplatform
KmLogging
Kotlin multiplatform logging. High performance, composable and simple to use.
Stars: ✭ 21 (-76.92%)
Mutual labels:  kotlin-multiplatform
discord-twitter-webhooks
🤖 Stream tweets to Discord
Stars: ✭ 47 (-48.35%)
Mutual labels:  twitter-api
mpp-example
This project is a minimum example of Kotlin Multiplatform Project.
Stars: ✭ 32 (-64.84%)
Mutual labels:  kotlin-multiplatform
kotlin-multiplatform-libsodium
A kotlin multiplatform wrapper for libsodium, using directly built libsodium for jvm and native, and libsodium.js for js targets.
Stars: ✭ 38 (-58.24%)
Mutual labels:  kotlin-multiplatform

Penicillin: Modern powerful Twitter API wrapper for Kotlin Multiplatform

Kotlin GitHub release (latest by date) GitHub Workflow Status license issues pull requests

  • Supports Java 8 or later, Android (API level 24 or higher), JavaScript target.
  • Supports all of Twitter's v1.1 public APIs and some v2 public and private APIs.
  • All endpoint parameters can be represented by named parameters.
  • There are model classes for response JSON, which can be accessed type-safely.
  • Paging APIs can be handled by Flow.

Documentation is available at GitHub Pages.

Quick Example

suspend fun main() {
    // Create new PenicillinClient.
    PenicillinClient {
        account {
            application("ConsumerKey", "ConsumerSecret")
            token("AccessToken", "AccessToken Secret")
        }
    }.use { client ->
        // Retrieve up to 100 tweets from @POTUS.
        val timeline = client.timeline.userTimelineByScreenName(screenName = "POTUS", count = 100).execute()

        // The return value of the timeline is `JsonArrayResponse<Status>`. It implements `Iterable<T>`, which allows iterative operations.
        timeline.forEach { status ->
            // Print unescaped status text. If you want to get the raw html reference characters, you can use `textRaw`.
            println(status.text)
        }
    }
}

Other examples can be found at Wiki. If you have any questions, please let us know at Issue.

Get Started

Penicillin is now available in the Maven Central since version 6.1.0. The previous Bintray repository is no longer available.

GitHub release (latest by date)

Gradle

build.gradle.kts:

dependencies {
    implementation("blue.starry:penicillin:$PenicillinVersion")
    
    // Choose your favorite engine from https://ktor.io/clients/http-client/engines.html
    // The version should match the version of Ktor that Penicillin is using.
    implementation("io.ktor:ktor-client-apache:1.6.8")
    implementation("io.ktor:ktor-client-cio:1.6.8")
}

License

Penicillin is provided under the MIT license.

Copyright (c) 2017-2022 StarryBlueSky.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].