Multiplatform Kotlin library to interact with the pastebin.com API.

Overview

KPastebin Maven Central Awesome Kotlin Badge

License Discord Test & Deploy | develop Test & Deploy | master Coverage

Multiplatform Kotlin library to interact with the pastebin.com API.

Setup

  1. Add the lib to your project's dependencies:
  • Groovy (replace $kpastebin_version with the version you want):
 // universal dependency for Gradle 5.3 and above
 // in case of multiplatform project, just specify the dependency for commonMain/commonTest source set
 implementation "net.pearx.kpastebin:kpastebin:$kpastebin_version" 
 // for Gradle versions below 5.3:
 implementation "net.pearx.kpastebin:kpastebin-metadata:$kpastebin_version" // for Common
 // or
 implementation "net.pearx.kpastebin:kpastebin-jvm:$kpastebin_version" // for JVM
 // or
 implementation "net.pearx.kpastebin:kpastebin-js:$kpastebin_version" // for JS
 // or
 implementation "net.pearx.kpastebin:kpastebin-android:$kpastebin_version" // for Android
 // or
 implementation "net.pearx.kpastebin:kpastebin-PLATFORM_YOU_WANT:$kpastebin_version" // for Native
  • Kotlin (replace $kpastebinVersion with the version you want):
 // universal dependency for Gradle 5.3 and above
 // in case of multiplatform project, just specify the dependency for commonMain/commonTest source set
 implementation("net.pearx.kpastebin:kpastebin:$kpastebinVersion") 
 // for Gradle versions below 5.3:
 implementation("net.pearx.kpastebin:kpastebin-metadata:$kpastebinVersion") // for Common
 // or
 implementation("net.pearx.kpastebin:kpastebin-jvm:$kpastebinVersion") // for JVM
 // or
 implementation("net.pearx.kpastebin:kpastebin-js:$kpastebinVersion") // for JS
 // or
 implementation("net.pearx.kpastebin:kpastebin-android:$kpastebinVersion") // for Android
 // or
 implementation("net.pearx.kpastebin:kpastebin-PLATFORM_YOU_WANT:$kpastebinVersion") // for Native
  1. Add kotlinx.coroutines and any Ktor client engine to your project's dependencies.

  2. Use the library and have fun! See net.pearx.kpastebin.PastebinClient class KDoc for more info.

Examples

runBlocking {
    // see KDoc for more info
    val client = PastebinClient("your dev key") // create a PastebinClient instance. You can get your dev key here: https://pastebin.com/doc_api#1
    client.getPaste("0b42rwhf") // getting a paste
    
    client.login("username", "password") // logging in
    client.getUserDetails().accountType // getting current user account type
}
You might also like...
EduApp is a mini e-learning platform based on udemy's public api. It has 4 main navigation destinations (Home, Search, Wishlist, Cart). Users can search courses from different categories and get real-time results from the api using Chips for a smooth filtering experience. It has different theme for dark mode. Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

 KMMT : Kotlin Multiplatform Mobile Template
KMMT : Kotlin Multiplatform Mobile Template

Kotlin Multiplatform Mobile App Template

SSU u-saint parser with Kotlin-Multiplatform and Ktor.

kusaint Soongsil University(SSU) u-Saint Parser with Kotlin Multiplatform. Prerequisites JVM !!IMPORTANT!! To run kusaint as a library in JVM environm

Simple and extendable code highlighter in Kotlin Multiplatform

Kighlighter Simple and extendable code highlighter in Kotlin Multiplatform with a composable output to display the code highlighted on Android and Des

Compile-time dependency injection for Kotlin Multiplatform

Kinzhal Kinzhal is a Kotlin Multiplatform library for compile-time dependency injection. The goal is to emulate basic features of Dagger to achieve si

A simple MVI framework for Kotlin Multiplatform and Android
A simple MVI framework for Kotlin Multiplatform and Android

Orbit Multiplatform Get in touch What is Orbit Orbit is a Redux/MVI-like library - but without the baggage. It's so simple we think of it as MVVM+. Si

Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on.

JavierSC Kotlin template Create libraries for all types of Kotlin projects: android, JVM, Multiplatform, Gradle plugins, and so on. Features Easy to p

Kotlin Multiplatform + Pizza = <3
Kotlin Multiplatform + Pizza = 3

KMPizza This repository accompanies a series of blog posts on the process of building an app with Kotlin Multiplatform. What is Kotlin Multiplatform?

Releases(v1.0.0)
Owner
PearX Team
PearX Team
Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP)

Mockative Mocking for Kotlin/Native and Kotlin Multiplatform using the Kotlin Symbol Processing API (KSP). Installation Mockative uses KSP to generate

Mockative 121 Dec 26, 2022
This Kotlin Multiplatform library is for accessing the TMDB API to get movie and TV show content. Using for Android, iOS, and JS projects.

Website | Forum | Documentation | TMDb 3 API Get movie and TV show content from TMDb in a fast and simple way. TMDb API This library gives access to T

Moviebase 37 Dec 29, 2022
MMKV for Kotlin Multiplatform is a wrapper for MMKV using Kotlin API

MMKV for Kotlin Multiplatform is a wrapper for MMKV using Kotlin API

Ctrip, Inc. 65 Dec 29, 2022
intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

?? Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

Pedro Henrique 1 Nov 30, 2021
intera.kt is a Kotlin library for interacting with the Discord Interactions API through a gateway service or a REST API.

?? Overview ⚠️ WARNING: intera.kt is a work in progress. It is not yet ready for use. You may encounter bugs and other issues, but please report if yo

Pedro Henrique 1 Nov 30, 2021
FlowExt is a Kotlin Multiplatform library, that provides many operators and extensions to Kotlin Coroutines Flow

FlowExt | Kotlinx Coroutines Flow Extensions | Kotlinx Coroutines Flow Extensions. Extensions to the Kotlin Flow library | kotlin-flow-extensions | Coroutines Flow Extensions | Kotlin Flow extensions | kotlin flow extensions | Flow extensions

Petrus Nguyễn Thái Học 151 Jan 1, 2023
Kotlin Multiplatform String markup library

Thistle Kotlin multiplatform String markup library, inspired by SRML. Thistle is a common parser which produces an AST that can be rendered to a varie

Copper Leaf 52 Dec 30, 2022
Integration Testing Kotlin Multiplatform Kata for Kotlin Developers. The main goal is to practice integration testing using Ktor and Ktor Client Mock

This kata is a Kotlin multiplatform version of the kata KataTODOApiClientKotlin of Karumi. We are here to practice integration testing using HTTP stub

Jorge Sánchez Fernández 29 Oct 3, 2022
Kotlin-phoenix - A set of tools aimed to bridge Phoenix with the Kotlin Multiplatform world

Kotlin Phoenix This project is aimed to allow developers to work with Phoenix Ch

Adrien Jacquier Bret 5 Sep 21, 2022
Postman-API-Fest-22 - Project for Postman API Fest 22

Project for Postman API Fest 22 Team Moon With only two members on the board, we

Pradumna Saraf 9 Nov 27, 2022