Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. public JSONObject deleteAllAlerts(String hash) {
  2.         int[] array = getAlertsId(hash);
  3.  
  4.         JSONObject jsonObject = new JSONObject();
  5.  
  6.         for (int i : array) {
  7.             setPriceAlertId(i);
  8.  
  9.             try {
  10.                 Response response = new CreateRequest().execute(METHOD_DELETE_ALERT, this.collection);
  11.                 this.json = new JSONObject(response.body().string());
  12.  
  13.             } catch (IOException e) {
  14.                 e.printStackTrace();
  15.             }
  16.  
  17.             jsonObject.put("alert_id=" + String.valueOf(i), this.json);
  18.         }
  19.  
  20.         return this.json = jsonObject;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement