sj_sdk_testing

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

sj sdk testing

sj_sdk_testing #
A SDK to access XXX services such as login, sign-up, point exchange, ext..
This package is a Flutter implementation of

Android: via Jitpack
IOS: SkyJoyAuthSDK via Cocoapods

Setup #
Android #
Go to android/build.gradle and add this line inside repositories block:
repositories {
...
maven {
url = uri("https://jitpack.io")
}
}
copied to clipboard
and set kotlin version to 1.9.24 inside buildScript block:
ext.kotlin_version = '1.9.24'
copied to clipboard
Go to android/app/build.gradle and set minSdkVersion to 26
minSdkVersion 26
copied to clipboard
IOS #
This package set ios deployment target to 11.0. If your ios project is targeting below said version, you can adjust the Podfile file in ios module.
target.build_configurations.each do |config|
config.build_settings['IOS_DEPLOYMENT_TARGET'] = '11.0'
end
copied to clipboard
Config #
Create SjConfig object and provide required parameters
SjConfig(
clientId: <provide-your-clientid>,
language: <language> (default: Language.en),
environment: <environment> (default: Environment.uat),
);
copied to clipboard
All available languages:
Language.vn
Language.en
copied to clipboard
All supported environments:
Environment.dev
Environment.stg
Environment.uat /// (default)
Environment.prod
copied to clipboard
Initialize package by providing your created config object
await SjSdkTesting.init(config);
copied to clipboard
Usage #
SignIn / SignUp #
Call available signIn and signUp methods accordingly
await SjSdkTesting.instance.signIn();
await SjSdkTesting.instance.signUp();
copied to clipboard
Both methods return a map:
{
"accessToken": "",
"refreshToken": "",
"expiresIn": "",
}
copied to clipboard
User Profile #
Call userProfile method and provide member token from signIn or signUp method
await SjSdkTesting.instance.userProfile(token);
copied to clipboard
Method return a map that contains user profile:
{
"fullName": "",
"userName": "",
"phoneNumber": "",
...
}
copied to clipboard
Point Exchange #
Call pointExchange method and provide your phoneNumber and memberCode
await SjSdkTesting.instance.pointExchange(phoneNumber, memberCode);
copied to clipboard
Flight Redemption #
Call flightRedemption method and provide your token
await SjSdkTesting.instance.pointExchange(token);
copied to clipboard
Author #
Khang Huynh - @gj-khanghv on Github
License #
MIT. See the LICENSE file for details.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.