December 16, 2024
I’m excited to announce the release of a new library: Pinata for Android! This library is designed to simplify your integration with Pinata’s platform, providing an efficient way to interact with its APIs directly in your Android/Kotlin apps.
After developing the Pinata Ruby Library to enhance backend workflows, I realized the mobile community could benefit from a similar tool. Whether you’re managing file uploads, retrieving metadata, or integrating with Pinata’s infrastructure, this library provides the tools you need.
Android developers can now avoid the hassle of tedious API calls. The Pinata Android Library offers clean abstractions and a modern API design, specifically tailored for Kotlin and Java projects.
Adding the library to your Android project is straightforward. Head over to the GitHub repository for installation instructions, detailed documentation, and code samples.
Here’s a quick example to showcase how easy it is to upload a file:
val pinataClient = PinataClient.get(YOUR_PINATA_JWT_TOKEN, YOUR_PINATA_GATEWAY)
val result = pinataClient.files.upload(file)
result.onSuccess { response ->
println("File CID: ${response.cid}")
}
This library aims to make Pinata’s API more accessible to mobile, providing Kotlin-friendly extensions and abstractions for Android developers. Currently, the library supports the Files API, but will continue to evolve to support more of Pinata’s functionality over time.
For full documentation, visit the GitHub repository: Pinata Android on GitHub. To learn more about the Files API, refer to the official Pinata API docs.
I hope you find this library useful for your projects! Contributions are always welcome!
— Onyx