You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 24, 2018. It is now read-only.
* Makes a request to the api and returns the result as a JSONObject Object.
48
+
* Makes a requests to the vHack Api, with the params format, data data and to the file php and returns the result, which is json, as a JSONObject Object.<br>
49
+
* Errors are thrown if user/password is wrong and (possibly) if the api url changed.<br>
50
+
* It is similar to {@link Utils#StringRequest(String, String, String)} but differs from it in that does processing with the obtained data.<br>
51
+
* it returns the result as json Object and performs checks for any (known) errors.
52
+
* @param format Lists the params that will be passed to the api endpoint. The names are separated with "::::".<br>
53
+
* Every request, except the very first one, should include "user::::pass::::uhash".<br>
54
+
* Example: "user::::pass::::uhash::::global" (taken from Console.getIP)
55
+
* @param data The data for the params that you passed in. They are also separated by "::::". You can just concatanate the parts of this.<br>
* @param php This is the api endpoint that the request will be sent to. In the case of the vHackAPI it are php documents.<br>
58
+
* Example "vh_network.php"
59
+
* @return The resulte Json as a JSONObject. Errors are thrown if user/password is wrong and (possibly) if the api url changed. null is returned if there are other errors.
@@ -54,8 +75,21 @@ else if (jsonText.length() == 1) {
54
75
json = newJSONObject(jsonText);
55
76
returnjson;
56
77
}
57
-
78
+
58
79
//it'll just do the request without any checks
80
+
/**
81
+
* Makes a request to the api and returns the result as a String.
82
+
* Makes a requests to the vHack Api, with the params format, data data and to the file php and returns the result, which is json, as a String Object.<br>
83
+
* It is similar to {@link Utils#JSONRequest(String, String, String)} but differs from it in the form that it returns and String and doesn't perform checks.
84
+
* @param format Lists the params that will be passed to the api endpoint. The names are separated with "::::".<br>
85
+
* Every request, except the very first one, should include "user::::pass::::uhash".<br>
86
+
* Example: "user::::pass::::uhash::::global" (taken from Console.getIP)
87
+
* @param data The data for the params that you passed in. They are also separated by "::::". You can just concatanate the parts of this.<br>
* Generates a url to where a request has to be made.
219
+
* Generates the complete url a request has to be done to, to achieve a certain action (E.g. upgrade a Botnet Computer).<br>
220
+
* Needed for this are the username, the password, the uHash and any additional parameters. The time is also neede but you dont need to supply it because the programm get the time by it itself.<br>
221
+
* It is used by {@link Utils#JSONRequest(String, String, String)} and {@link Utils#StringRequest(String, String, String)}.
222
+
* @param format Lists the params that will be passed to the api endpoint. The names are separated with "::::".<br>
223
+
* Every request, except the very first one, should include "user::::pass::::uhash".<br>
224
+
* Example: "user::::pass::::uhash::::global" (taken from Console.getIP)
225
+
* @param data The data for the params that you passed in. They are also separated by "::::". You can just concatanate the parts of this.<br>
0 commit comments