Giter Club home page Giter Club logo

android-sdk's Introduction

Everless SDK Android

Android SDK untuk platform Everless

Getting Started

SDK ini digunakan untuk membantu penggunaan Everless pada platform Android.

Prerequisites

Sebelum menggunakan SDK ini, diharapkan telah mengerti teknologi dibawah:

Java
REST API
Android SDK

Installing

Berikut tahap untuk menggunakan SDK

Pada root build.gradle tambahkan baris berikut

repositories {
    maven {
        url  "https://dl.bintray.com/riochr17/everlesdk-alpha" 
    }
}

Lalu pada bagian project build.gradle tambahkan baris berikut

compile 'org.rio.pilottestsdk:everlesssdk:0.0.5'

Everless API General

Sebelum mulai menggunakan fitur SDK, lakukan inisialisasi SDK

SDK Initialization

private String BASE_URL = "<Everless base URL>";
private String CLIENT_KEY = "<your Client Key>";
private String CLIENT_SECRET = "<your Client Secret>";

constructor(){

    // Init SDK
    AnimalRunner.init(BASE_URL, CLIENT_KEY, CLIENT_SECRET);
}

Berikut daftar fitur yang terdapat pada SDK. Setiap method yang terdapat pada SDK menggunakan sistem asynchronous dengan implementasi callback.

Everless API User Authentication

terdiri dari Login dan Logout

Login

Login menggunakan username dan password

AnimalRunner.AuthUser.login(String username, String password, LoginCallback callback)

Logout

AnimalRunner.AuthUser.logout(LogoutCallback callback)

Everless API Collection

terdiri dari Create, Retrieve, Update, Delete collection

Collection

Kelas Collection memiliki empat method yaitu create(), retrieve(), update(), dan delete().

Collection clx = AnimalRunner.Ref.collection(String collectionName);
Create
clx.create(EVPair body, CollectionCallback callback);                 // create collection variasi 1
clx.create(String uniqueID, EVPair body, CollectionCallback callback) // create collection variasi 2
Retrieve
clx.retrieve(CollectionCallback callback)                             // retrieve collection
Update
clx.update(EVPair body, CollectionCallback callback)                  // update collection variasi 1
clx.update(String uniqueID, EVPair body, CollectionCallback callback) // update collection variasi 2
Delete
clx.delete(CollectionCallback callback)                               // delete collection

Child Collection

Pada kelas Collection terdapat child collection yang mengembalikan kelas Collection. Fitur ini digunakan untuk mengakses child path dari collection tersebut.

Collection childClx = clx.child(String child);

Everless API Storage

terdiri dari Upload, Get File URL, Delete storage

Storage

Kelas Storage memiliki empat method yaitu upload(), directDownloadFile(), getFileURL(), dan delete().

Storage stg = AnimalRunner.Ref.storage();
Upload
stg.upload(final String fileName, final File file, final StorageCallback callback)
Direct File Download

Direct alamat url berkas akan mengunduh berkas menggunakan Download Manager yang tersedia pada device versi Gingerbread atau lebih terbaru. Metode ini mengembalikan Exception jika Download Manager tidak tersedia pada device yang digunakan.

stg.directDownloadFile(Context context, String fileUrl) throws Exception;
Get File URL

Method ini mengembalikan url berdasarkan UUID berkas tersebut.

stg.getFileURL(final String uuid, final StorageCallback callback);
Delete
stg.delete(final String uid, final StorageCallback callback)

Everless API Geo

Geo

Kelas Geo memiliki tiga method yaitu saveLocation(), getLocation(), dan getLocationByRadius(). Pada Geo terdapat dua jenis model data yaitu Geo dan ListGeo, ListGeo merupakan data berisi list dari Geo.

Geo geo = AnimalRunner.Ref.geo();
Save Location
geo.saveLocation(final EVPair body, final GeoCallback callback)
Get Location Specific
geo.getLocation(final String uuid, final GeoCallback callback)
Get Location By Radius
geo.getLocationByRadius(final Double radius, final ListGeoCallback callback)

Built With

  • Gradle - Adaptable, fast automation for all
  • Maven - Dependency Management

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details

Acknowledgments

  • Everless, Bandung Digital Valey, Telkom Indonesia, Gegerkalong, Bandung

android-sdk's People

Contributors

riochr17 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mochadwi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.