Storyblok SDK for Android
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DEV
app
gradle/wrapper
library
.gitignore
CHANGELOG.md
CONTRIBUTORS.md
LICENSE
MIGRATION.md
README.md
build.gradle
gradle-jcenter-push.gradle
gradle-mvn-push.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Storyblok-Android-SDK

This is the Storyblok Android client for easy access of the publishing api.

More about Storyblok

Include in your project

Using Maven

compile "com.mikepenz:storyblok-android-sdk:0.3.0@aar"

How to use

Init client

Storyblok client = Storyblok.init("your-storyblok-token");

Load a story

client.getStory("fullSlug", new Storyblok.SuccessCallback<Story>() {
    @Override
    public void onResponse(final Result<Story> result) {
        //on success
    }
}, new Storyblok.ErrorCallback() {
     @Override
     public void onFailure(@Nullable IOException exception, @Nullable String response) {
         //on error
     }
});

Load a list of stories

client.getStories(startsWith, withTag, sortBy, perPage, page, new Storyblok.SuccessCallback<List<Story>>() {
    @Override
    public void onResponse(final Result<List<Story>> result) {
        //on success
    }
}, new Storyblok.ErrorCallback() {
     @Override
     public void onFailure(@Nullable IOException exception, @Nullable String response) {
         //on error
     }
});

Load a list of tags

client.getTags(startsWith, new Storyblok.SuccessCallback<List<Tag>>() {
    @Override
    public void onResponse(final Result<List<Tag>> result) {
        //on success
    }
}, new Storyblok.ErrorCallback() {
     @Override
     public void onFailure(@Nullable IOException exception, @Nullable String response) {
         //on error
     }
});

Load a map of links

client.getLinks(new Storyblok.SuccessCallback<Map<String, Link>>() {
    @Override
    public void onResponse(final Result<Map<String, Link>> result) {
        //on success
    }
}, new Storyblok.ErrorCallback() {
     @Override
     public void onFailure(@Nullable IOException exception, @Nullable String response) {
         //on error
     }
});

Load a list of datasources

client.getDatasource(datasource, new Storyblok.SuccessCallback<List<Datasource>>() {
    @Override
    public void onResponse(final Result<List<Datasource>> result) {
        //on success
    }
}, new Storyblok.ErrorCallback() {
    @Override
    public void onFailure(@Nullable IOException exception, @Nullable String response) {
        //on error
    }
});

Libs used in sample app:

Mike Penz:

Developed By

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 file for details.

License

Copyright 2017 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 at

   http://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.