Revolt API Wrapper

An intuitive and lightweight Kotlin wrapper for the Revolt API.

Table of Contents

Installation

implementation 'com.github.ted3x:revolt-kotlin-api:v0.0.1-beta'

Features

  • Seamless integration with the Revolt platform.
  • Supports all major authentication methods including MFA.
  • Efficient error handling with comprehensive messages.
  • Lazy initialization for better performance.
  • Modular design for easy maintenance and updates.

Usage

Authentication

// Sample code to illustrate authentication
val api = RevoltApi(API_KEY)
api.auth.login("username", "password")

Fetching Data

// Sample code to illustrate how to fetch data using the wrapper
val user = api.auth.account.fetchSelf()

Error Handling

Our wrapper provides intuitive error messages to ease the debugging process. In case of an error, the library will throw a RevoltApiException with a detailed message.

try {
    val user = api.auth.account.fetchSelf()
} catch (e: RevoltApiException) {
    println(e.message)
}

Contributing

We welcome contributions! Please see our CONTRIBUTING.md file for details.

License

This project is licensed under the MIT License. See the LICENSE.md file for details.