Minter user profile (https://testnet.console.minter.network) sdk library
DEPRECATED SDK
Gradle root build.gradle
allprojects {
repositories {
// ... some repos
maven { url "https://dl.bintray.com/minterteam/android" }
}
}
project build.gradle
ext {
minterProfileSDK = "0.2.6"
}
dependencies {
// for testnet use suffix "-testnet"
implementation "network.minter.android:minter-android-profile-testnet:${minterProfileSDK}"
// for main net
implementation "network.minter.android:minter-android-profile:${minterProfileSDK}"
}
// some api requires auth token to get personal data
// this callback will called only when it required
//
// so save authorization bearer token after login/register in your secret storage to use it later
MinterProfileApi.initialize(new CallbackProvider<String>{
@Override
public String get() {
return MySecretStorage.getSavedAuthToken();
}
});
SDK uses retrofit http client see
// get auth (or other) repository
ProfileAuthRepository profileRepo = MinterProfileApi.getInstance().auth();
// login
LoginData loginData = new LoginData();
// ... fill data
// and send request
profileRepo.login(loginData).enqueue(new Callback<ProfileResult<User>>() {
@Override
public void onResponse(Call<ProfileResult<User>> call, Response<ProfileResult<User>> response) {
// do something with response
}
@Override
public void onFailure(Call<ProfileResult<User>> call, Throwable t) {
// handle error
}
});
For more examples, see our wallet app
TODO (javadocs available)
TODO
TODO
See Release notes
This software is released under the MIT License.
© 2018 MinterTeam edward.vstock@gmail.com, All rights reserved.