UserList asUserList(JSONObject json) throws TwitterException { UserList userList = new UserListJSONImpl(json); if (CONF.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(userList, json); } return userList; }
Status asStatus(JSONObject json) throws TwitterException { Status status = new StatusJSONImpl(json); if (CONF.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(status, json); } return status; }
/*package*/StatusJSONImpl(JSONObject json, Configuration conf) throws TwitterException { super(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(this, json); } }
User asUser(JSONObject json) throws TwitterException { User user = new UserJSONImpl(json); if (CONF.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(user, json); } return user; }
/*package*/ RelationshipJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { this(res, res.asJSONObject()); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, res.asJSONObject()); } }
/*package*/StatusJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, json); } }
static Map<String, RateLimitStatus> createRateLimitStatuses(HttpResponse res, Configuration conf) throws TwitterException { JSONObject json = res.asJSONObject(); Map<String, RateLimitStatus> map = createRateLimitStatuses(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(map, json); } return map; }
/*package*/ IDsJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); String json = res.asString(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, json); } }
/*package*/ TrendJSONImpl(JSONObject json, boolean storeJSON) { this.name = ParseUtil.getRawString("name", json); this.url = ParseUtil.getRawString("url", json); this.query = ParseUtil.getRawString("query", json); this.tweetVolume = ParseUtil.getInt("tweet_volume", json); if (storeJSON) { TwitterObjectFactory.registerJSONObject(this, json); } }
/*package*/ AccountSettingsJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { this(res, res.asJSONObject()); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, res.asJSONObject()); } }
/*package*/ AccountTotalsJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { this(res, res.asJSONObject()); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, res.asJSONObject()); } }
/*package*/ PlaceJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, json); } }
/*package*/ OEmbedJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, json); } }
DirectMessage asDirectMessage(JSONObject json) throws TwitterException { try { JSONObject dmJSON = json.getJSONObject("direct_message"); DirectMessage directMessage = new DirectMessageJSONImpl(dmJSON); if (CONF.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(directMessage, dmJSON); } return directMessage; } catch (JSONException jsone) { throw new TwitterException(jsone); } }
/*package*/ UserListJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); } JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(this, json); } }
/*package*/UserJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); } JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(this, json); } }
/*package*/ SavedSearchJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); } JSONObject json = res.asJSONObject(); init(json); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(this, json); } }
TrendsJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); init(res.asString(), conf.isJSONStoreEnabled()); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, res.asString()); } }
/*package*/DirectMessageJSONImpl(HttpResponse res, Configuration conf) throws TwitterException { super(res); JSONObject json = res.asJSONObject(); try { JSONObject event = json.getJSONObject("event"); init(event); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); TwitterObjectFactory.registerJSONObject(this, event); } } catch (JSONException jsone) { throw new TwitterException(jsone); } }
static ResponseList<Category> createCategoriesList(JSONArray array, HttpResponse res, Configuration conf) throws TwitterException { try { if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.clearThreadLocalMap(); } ResponseList<Category> categories = new ResponseListImpl<Category>(array.length(), res); for (int i = 0; i < array.length(); i++) { JSONObject json = array.getJSONObject(i); Category category = new CategoryJSONImpl(json); categories.add(category); if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(category, json); } } if (conf.isJSONStoreEnabled()) { TwitterObjectFactory.registerJSONObject(categories, array); } return categories; } catch (JSONException jsone) { throw new TwitterException(jsone); } }