<uses-permission android:name="android.permission.INTERNET"/>
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.uguraltinsoy:MultiJSON:1.0.1'
}
Java
MultiJSON.init().load("<Source Url>").setOnListener(new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
MultiJSON.init().load("<Source Url>").setOnListener(object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Java
HashMap<String, String> property = new HashMap<>();
property.put("X-PCK", "API_KEY");
property.put("User-Agent", "Mozilla/5.0");
property.put("Content-type", "application/json");
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
val property = HashMap<String, String>()
property["X-PCK"] = "API_KEY"
property["User-Agent"] = "Mozilla/5.0"
property["Content-type"] = "application/json"
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Java
MultiJSON.init().load("<Source Url>").setOnListener(true, new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
MultiJSON.init().load("<Source Url>").setOnListener(true, object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Java
HashMap<String, String> property = new HashMap<>();
property.put("X-PCK", "API_KEY");
property.put("User-Agent", "Mozilla/5.0");
property.put("Content-type", "application/json");
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(true, new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
val property = HashMap<String, String>()
property["X-PCK"] = "API_KEY"
property["User-Agent"] = "Mozilla/5.0"
property["Content-type"] = "application/json"
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(true, object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Java
// JSON OBJECT
JSONObject json = new JSONObject();
json.put("param", "value");
json.put("param", "value");
json.put("param", "value");
OR
// JSON ARRAY
JSONArray json = new JSONArray();
json.put("param", "value");
json.put("param", "value");
json.put("param", "value");
MultiJSON.init().load("<Source Url>").setOnListener(true, json, new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
// JSON OBJECT
val json = JSONObject()
json.put("param", "value")
json.put("param", "value")
json.put("param", "value")
OR
// JSON ARRAY
val jsonArray = JSONArray()
json.put("param", "value")
json.put("param", "value")
json.put("param", "value")
MultiJSON.init().load("<Source Url>").setOnListener(true, json, object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Java
HashMap<String, String> property = new HashMap<>();
property.put("X-PCK", "API_KEY");
property.put("User-Agent", "Mozilla/5.0");
property.put("Content-type", "application/json");
AND
// JSON OBJECT
JSONObject json = new JSONObject();
json.put("param", "value");
json.put("param", "value");
json.put("param", "value");
OR
// JSON ARRAY
JSONArray json = new JSONArray();
json.put("param", "value");
json.put("param", "value");
json.put("param", "value");
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(true, json, new RequestCreator.JsonObject() {
@Override
public void Result(JSONObject jsonObject, String json) throws JSONException {
}
@Override
public void Error(String error) {
}
});
Kotlin
val property = HashMap<String, String>()
property["X-PCK"] = "API_KEY"
property["User-Agent"] = "Mozilla/5.0"
property["Content-type"] = "application/json"
AND
// JSON OBJECT
val json = JSONObject()
json.put("param", "value")
json.put("param", "value")
json.put("param", "value")
OR
// JSON ARRAY
val jsonArray = JSONArray()
json.put("param", "value")
json.put("param", "value")
json.put("param", "value")
MultiJSON.init().load("<Source Url>").addProperty(property).setOnListener(true, json, object : JsonObject {
@Throws(JSONException::class)
override fun Result(jsonObject: JSONObject, json: String) {
}
override fun Error(error: String) {
}
})
Uğur Altınsoy
BTC : 1N7V3wX4xvGfwgBP1zQrcMSxohKKfiDxyH
ETH : 0x0df6da87e219fb4854e933f1071ad91d17afa517
XRP : rEb8TK3gBgk5auZkwc6sHnwrGVJH8DuaLh
DOGE : DKKmSHAa8GhAE5HNjmCXzkXPKTjpybY3mq
DENT : 0x0df6da87e219fb4854e933f1071ad91d17afa517