SHARE
TWEET

Untitled

a guest Oct 15th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. posts.add(new Post(
  2.            value.getInt("id"),
  3.            !value.getString("user_id").equals("null") ? value.getInt("user_id") : 0,
  4.            user.has("name") ? user.getString("name") : "null",
  5.            value.has("body") ? value.getString("body") : value.getString("product_description"),
  6.            user.has("name") ? user.getString("avatar") : "null",
  7.            value.has("media") ? value.getString("media") : value.getString("product_media"),
  8.            value.has("media_type") ? value.getString("media_type") : value.getString("product_media_type"),
  9.            user.getJSONObject("__meta__").getInt("following") != 0,
  10.            value.has("__meta__") && value.getJSONObject("__meta__").getInt("liked") != 0,
  11.            value.has("__meta__") ? value.getJSONObject("__meta__").getInt("likes_count") : 0,
  12.            !value.has("sponsored") || value.getInt("sponsored") != 0, //Type post
  13.            value.getJSONObject("user"),
  14.            value.getString("type")
  15.  ));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top