https://github.com/mikepenz/storyblok-mp-sdk
Storyblok Kotlin Multiplatform SDK (Android, JVM, JS, iOS, ...)
https://github.com/mikepenz/storyblok-mp-sdk
android hacktoberfest kotlin kotlin-multiplatform kotlin-native storyblok storyblok-client
Last synced: about 2 months ago
JSON representation
Storyblok Kotlin Multiplatform SDK (Android, JVM, JS, iOS, ...)
- Host: GitHub
- URL: https://github.com/mikepenz/storyblok-mp-sdk
- Owner: mikepenz
- License: apache-2.0
- Created: 2019-12-25T09:10:10.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-26T19:09:10.000Z (about 2 months ago)
- Last Synced: 2025-04-26T20:19:50.635Z (about 2 months ago)
- Topics: android, hacktoberfest, kotlin, kotlin-multiplatform, kotlin-native, storyblok, storyblok-client
- Language: Kotlin
- Homepage: https://www.storyblok.com/
- Size: 644 KB
- Stars: 23
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
Storyblok-mp-SDK
... a Storyblok Client SDK written using Kotlin Multiplatform. (Android, JVM, JS, iOS, ...)
-------
What's included 🚀 •
About Storyblok •
Setup 🛠️ •
Usage 🛠️ •
License 📓-------
### What's included 🚀
- Super simple setup
- Cross-platform ready
- Lightweight-------
## About Storyblok
- **WEBSITE** https://www.storyblok.com/
- **API DOC** https://www.storyblok.com/docs/api/content-delivery/v2-------
## Setup
### Using Gradle
Multiplatform
For multiplatform projects specify this single dependency
via [Maven Central](https://search.maven.org/artifact/com.mikepenz/storyblok-mp-sdk):```kotlin
dependencies {
implementation("com.mikepenz:storyblok-mp-sdk:${version}")
}
```JVM
To use the Storyblok SDK on JVM, you have to include:
```kotlin
dependencies {
implementation("com.mikepenz:storyblok-mp-sdk-jvm:${version}")
}
```Android
For Android a special dependency is provided:
```kotlin
dependencies {
implementation("com.mikepenz:storyblok-mp-sdk-android:${version}")
}
```iOS
For iOS you will have to use the Kotlin Native [support](https://github.com/JetBrains/kotlin-native)
and use the following dependency:```kotlin
dependencies {
implementation("com.mikepenz:storyblok-mp-sdk-ios:${version}")
}
```JS
For JS (node-js) applications you will have to use the Kotlin
JS [support](https://kotlinlang.org/docs/tutorials/javascript/kotlin-to-javascript/kotlin-to-javascript.html)
and the following dependency:```kotlin
dependencies {
implementation("com.mikepenz:storyblok-mp-sdk-js:${version}")
}
```-------
## Usage
### Init client
```kotlin
val client = Storyblok("your-storyblok-token")
```### General
This Kotlin multi platform library uses Kotlin coroutines for the requests (similar to the ktor
API).
All fetch methods are suspending functions, and need to be called respectively.### Load a story
```kotlin
client.fetchStory("full_slug:id:uuid")
// All Storyblok params are supported, see javadoc for more information
```### Load a list of stories
```kotlin
client.fetchStories()
// All Storyblok params are supported, see javadoc for more information
```### Load current space
```kotlin
client.fetchCurrentSpace()
```### Load a list of datasources
```kotlin
client.fetchDatasources()
// All Storyblok params are supported, see javadoc for more information
```### Load a map of datasource entries
```kotlin
client.fetchDatasourceEntries()
// All Storyblok params are supported, see javadoc for more information
```### Load a list of map of links with their uuid as key
```kotlin
client.fetchLinks()
// All Storyblok params are supported, see javadoc for more information
```### Load a list of tags
```kotlin
client.fetchTags()
// All Storyblok params are supported, see javadoc for more information
```## Libs used in android sample app:
Mike Penz:
- AboutLibraries https://github.com/mikepenz/AboutLibraries
# Developed By
- Mike Penz
- [mikepenz.dev](https://mikepenz.dev) - [blog.mikepenz.dev](https://blog.mikepenz.dev)
- [paypal.me/mikepenz](http://paypal.me/mikepenz)## Contributors
This free, open source software was also made possible by a group of volunteers that put many hours
of hard work into it. See the [CONTRIBUTORS.md](CONTRIBUTORS.md) file for details.## License
Copyright 2025 Mike Penz
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.