public final class DataObjectFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static AccountTotals |
createAccountTotals(JSONObject json) |
static AccountTotals |
createAccountTotals(java.lang.String rawJSON)
Constructs an AccountTotals object from rawJSON string.
|
static Category |
createCategory(JSONObject json) |
static Category |
createCategory(java.lang.String rawJSON)
Constructs a Category object from rawJSON string.
|
static DirectMessage |
createDirectMessage(JSONObject json) |
static DirectMessage |
createDirectMessage(java.lang.String rawJSON)
Constructs a DirectMessage object from rawJSON string.
|
static IDs |
createIDs(java.lang.String rawJSON)
Constructs a IDs object from rawJSON string.
|
static Location |
createLocation(JSONObject json) |
static Location |
createLocation(java.lang.String rawJSON)
Constructs a Location object from rawJSON string.
|
static java.lang.Object |
createObject(java.lang.String rawJSON)
Construct an object from rawJSON string.
|
static OEmbed |
createOEmbed(JSONObject json) |
static OEmbed |
createOEmbed(java.lang.String rawJSON)
Constructs an OEmbed object from rawJSON string.
|
static Place |
createPlace(JSONObject json) |
static Place |
createPlace(java.lang.String rawJSON)
Constructs a Place object from rawJSON string.
|
static java.util.Map<java.lang.String,RateLimitStatus> |
createRateLimitStatus(java.lang.String rawJSON)
Constructs a RateLimitStatus object from rawJSON string.
|
static RelatedResults |
createRelatedResults(JSONArray json) |
static RelatedResults |
createRelatedResults(java.lang.String rawJSON)
Constructs a RelatedResults object from rawJSON string.
|
static Relationship |
createRelationship(java.lang.String rawJSON)
Constructs a Relationship object from rawJSON string.
|
static SavedSearch |
createSavedSearch(JSONObject json) |
static SavedSearch |
createSavedSearch(java.lang.String rawJSON)
Constructs a SavedSearch object from rawJSON string.
|
static Status |
createStatus(JSONObject json) |
static Status |
createStatus(java.lang.String rawJSON)
Constructs a Status object from rawJSON string.
|
static Trend |
createTrend(JSONObject json) |
static Trend |
createTrend(java.lang.String rawJSON)
Constructs a Trend object from rawJSON string.
|
static Trends |
createTrends(java.lang.String rawJSON)
Constructs a Trends object from rawJSON string.
|
static User |
createUser(JSONObject json) |
static User |
createUser(java.lang.String rawJSON)
Constructs a User object from rawJSON string.
|
static UserList |
createUserList(JSONObject json) |
static UserList |
createUserList(java.lang.String rawJSON)
Constructs a UserList object from rawJSON string.
|
static java.lang.String |
getRawJSON(java.lang.Object obj)
Returns a raw JSON form of the provided object.
Note that raw JSON forms can be retrieved only from the same thread invoked the last method call and will become inaccessible once another method call |
public static java.lang.String getRawJSON(java.lang.Object obj)
obj - public static Status createStatus(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Status createStatus(JSONObject json) throws TwitterException
TwitterExceptionpublic static User createUser(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static User createUser(JSONObject json) throws TwitterException
TwitterExceptionpublic static AccountTotals createAccountTotals(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static AccountTotals createAccountTotals(JSONObject json) throws TwitterException
TwitterExceptionpublic static Relationship createRelationship(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Place createPlace(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Place createPlace(JSONObject json) throws TwitterException
TwitterExceptionpublic static SavedSearch createSavedSearch(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static SavedSearch createSavedSearch(JSONObject json) throws TwitterException
TwitterExceptionpublic static Trend createTrend(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Trend createTrend(JSONObject json) throws TwitterException
TwitterExceptionpublic static Trends createTrends(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static IDs createIDs(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static java.util.Map<java.lang.String,RateLimitStatus> createRateLimitStatus(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Category createCategory(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Category createCategory(JSONObject json) throws TwitterException
TwitterExceptionpublic static DirectMessage createDirectMessage(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static DirectMessage createDirectMessage(JSONObject json) throws TwitterException
TwitterExceptionpublic static Location createLocation(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static Location createLocation(JSONObject json) throws TwitterException
TwitterExceptionpublic static UserList createUserList(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static UserList createUserList(JSONObject json) throws TwitterException
TwitterExceptionpublic static RelatedResults createRelatedResults(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static RelatedResults createRelatedResults(JSONArray json) throws TwitterException
TwitterExceptionpublic static OEmbed createOEmbed(java.lang.String rawJSON) throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.public static OEmbed createOEmbed(JSONObject json) throws TwitterException
TwitterExceptionpublic static java.lang.Object createObject(java.lang.String rawJSON)
throws TwitterException
rawJSON - raw JSON form as StringTwitterException - when provided string is not a valid JSON string.