-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from rees46/chore/java-to-kotlin-description
Chore/java to kotlin description
- Loading branch information
Showing
5 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,17 +51,22 @@ curl -d "shop_id=SHOPID&shop_secret=SHOP_SECRET&email=EMAIL&fieldname=FIELDVALUE | |
} | ||
``` | ||
|
||
```java | ||
HashMap<String, String> params = new HashMap<>(); | ||
params.put("email", "[email protected]"); | ||
<%= config[:android_sdk_package_name]%>.profile(params); | ||
//With callback | ||
<%= config[:android_sdk_package_name]%>.profile(params, new Api.OnApiCallbackListener() { | ||
@Override | ||
public void onSuccess(JSONObject response) { | ||
Log.i(TAG, "Response: " + response.toString()); | ||
} | ||
}); | ||
```kotlin | ||
// Create a map of parameters | ||
val params = hashMapOf( | ||
"email" to "[email protected]" | ||
) | ||
|
||
// Use the SDK to update the profile | ||
sdk.profile(params) | ||
|
||
// With callback | ||
sdk.profile(params, object : Api.OnApiCallbackListener { | ||
override fun onSuccess(response: JSONObject) { | ||
Log.i(TAG, "Response: ${response.toString()}") | ||
} | ||
}) | ||
|
||
``` | ||
|
||
```jsx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters