class JSONImplFactory extends java.lang.Object implements ObjectFactory
Modifier and Type | Field and Description |
---|---|
private Configuration |
conf |
private static long |
serialVersionUID |
Constructor and Description |
---|
JSONImplFactory(Configuration conf) |
private static final long serialVersionUID
private final Configuration conf
public JSONImplFactory(Configuration conf)
public Status createStatus(JSONObject json) throws TwitterException
createStatus
in interface ObjectFactory
TwitterException
public User createUser(JSONObject json) throws TwitterException
createUser
in interface ObjectFactory
TwitterException
public UserList createAUserList(JSONObject json) throws TwitterException
createAUserList
in interface ObjectFactory
TwitterException
public java.util.Map<java.lang.String,RateLimitStatus> createRateLimitStatuses(HttpResponse res) throws TwitterException
createRateLimitStatuses
in interface ObjectFactory
TwitterException
public Status createStatus(HttpResponse res) throws TwitterException
createStatus
in interface ObjectFactory
TwitterException
public ResponseList<Status> createStatusList(HttpResponse res) throws TwitterException
createStatusList
in interface ObjectFactory
TwitterException
static GeoLocation createGeoLocation(JSONObject json) throws TwitterException
json
- JSONObject to be parsedTwitterException
- when coordinates is not included in geo element (should be an API side issue)static GeoLocation[][] coordinatesAsGeoLocationArray(JSONArray coordinates) throws TwitterException
TwitterException
public static RateLimitStatus createRateLimitStatusFromResponseHeader(HttpResponse res)
public Trends createTrends(HttpResponse res) throws TwitterException
createTrends
in interface ObjectFactory
TwitterException
public User createUser(HttpResponse res) throws TwitterException
createUser
in interface ObjectFactory
TwitterException
public ResponseList<User> createUserList(HttpResponse res) throws TwitterException
createUserList
in interface ObjectFactory
TwitterException
public ResponseList<User> createUserListFromJSONArray(HttpResponse res) throws TwitterException
createUserListFromJSONArray
in interface ObjectFactory
TwitterException
public ResponseList<User> createUserListFromJSONArray_Users(HttpResponse res) throws TwitterException
createUserListFromJSONArray_Users
in interface ObjectFactory
TwitterException
public QueryResult createQueryResult(HttpResponse res, Query query) throws TwitterException
createQueryResult
in interface ObjectFactory
TwitterException
public IDs createIDs(HttpResponse res) throws TwitterException
createIDs
in interface ObjectFactory
TwitterException
public PagableResponseList<User> createPagableUserList(HttpResponse res) throws TwitterException
createPagableUserList
in interface ObjectFactory
TwitterException
public UserList createAUserList(HttpResponse res) throws TwitterException
createAUserList
in interface ObjectFactory
TwitterException
public PagableResponseList<UserList> createPagableUserListList(HttpResponse res) throws TwitterException
createPagableUserListList
in interface ObjectFactory
TwitterException
public ResponseList<UserList> createUserListList(HttpResponse res) throws TwitterException
createUserListList
in interface ObjectFactory
TwitterException
public ResponseList<Category> createCategoryList(HttpResponse res) throws TwitterException
createCategoryList
in interface ObjectFactory
TwitterException
public DirectMessage createDirectMessage(HttpResponse res) throws TwitterException
createDirectMessage
in interface ObjectFactory
TwitterException
public ResponseList<DirectMessage> createDirectMessageList(HttpResponse res) throws TwitterException
createDirectMessageList
in interface ObjectFactory
TwitterException
public Relationship createRelationship(HttpResponse res) throws TwitterException
createRelationship
in interface ObjectFactory
TwitterException
public ResponseList<Friendship> createFriendshipList(HttpResponse res) throws TwitterException
createFriendshipList
in interface ObjectFactory
TwitterException
public AccountTotals createAccountTotals(HttpResponse res) throws TwitterException
createAccountTotals
in interface ObjectFactory
TwitterException
public AccountSettings createAccountSettings(HttpResponse res) throws TwitterException
createAccountSettings
in interface ObjectFactory
TwitterException
public SavedSearch createSavedSearch(HttpResponse res) throws TwitterException
createSavedSearch
in interface ObjectFactory
TwitterException
public ResponseList<SavedSearch> createSavedSearchList(HttpResponse res) throws TwitterException
createSavedSearchList
in interface ObjectFactory
TwitterException
public ResponseList<Location> createLocationList(HttpResponse res) throws TwitterException
createLocationList
in interface ObjectFactory
TwitterException
public Place createPlace(HttpResponse res) throws TwitterException
createPlace
in interface ObjectFactory
TwitterException
public ResponseList<Place> createPlaceList(HttpResponse res) throws TwitterException
createPlaceList
in interface ObjectFactory
TwitterException
public SimilarPlaces createSimilarPlaces(HttpResponse res) throws TwitterException
createSimilarPlaces
in interface ObjectFactory
TwitterException
public TwitterAPIConfiguration createTwitterAPIConfiguration(HttpResponse res) throws TwitterException
createTwitterAPIConfiguration
in interface ObjectFactory
TwitterException
public ResponseList<HelpResources.Language> createLanguageList(HttpResponse res) throws TwitterException
createLanguageList
in interface ObjectFactory
TwitterException
public <T> ResponseList<T> createEmptyResponseList()
createEmptyResponseList
in interface ObjectFactory
public OEmbed createOEmbed(HttpResponse res) throws TwitterException
createOEmbed
in interface ObjectFactory
TwitterException
public static HashtagEntity createHashtagEntity(int start, int end, java.lang.String text)
public static UserMentionEntity createUserMentionEntity(int start, int end, java.lang.String name, java.lang.String screenName, long id)
public static URLEntity createUrlEntity(int start, int end, java.lang.String url, java.lang.String expandedURL, java.lang.String displayURL)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object