パッケージ twitter4j
クラス TwitterObjectFactory
java.lang.Object
twitter4j.TwitterObjectFactory
- 導入されたバージョン:
- Twitter4J 4.0.0
-
メソッドの概要
修飾子とタイプメソッド説明static AccountTotalscreateAccountTotals(String rawJSON) Constructs an AccountTotals object from rawJSON string.static DirectMessagecreateDirectMessage(String rawJSON) Constructs a DirectMessage object from rawJSON string.static IDsConstructs a IDs object from rawJSON string.static LocationcreateLocation(String rawJSON) Constructs a Location object from rawJSON string.static ObjectcreateObject(String rawJSON) Construct an object from rawJSON string.static OEmbedcreateOEmbed(String rawJSON) Constructs an OEmbed object from rawJSON string.static PlacecreatePlace(String rawJSON) Constructs a Place object from rawJSON string.static Map<String,RateLimitStatus> createRateLimitStatus(String rawJSON) Constructs a RateLimitStatus object from rawJSON string.static RelationshipcreateRelationship(String rawJSON) Constructs a Relationship object from rawJSON string.static SavedSearchcreateSavedSearch(String rawJSON) Constructs a SavedSearch object from rawJSON string.static StatuscreateStatus(String rawJSON) Constructs a Status object from rawJSON string.static TrendcreateTrend(String rawJSON) Constructs a Trend object from rawJSON string.static TrendscreateTrends(String rawJSON) Constructs a Trends object from rawJSON string.static UsercreateUser(String rawJSON) Constructs a User object from rawJSON string.static UserListcreateUserList(String rawJSON) Constructs a UserList object from rawJSON string.static StringgetRawJSON(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
-
メソッドの詳細
-
getRawJSON
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- パラメータ:
obj- target object to retrieve JSON- 戻り値:
- raw JSON
- 導入されたバージョン:
- Twitter4J 2.1.7
-
createStatus
Constructs a Status object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Status
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createUser
Constructs a User object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- User
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createAccountTotals
Constructs an AccountTotals object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- AccountTotals
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.9
-
createRelationship
Constructs a Relationship object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Relationship
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createPlace
Constructs a Place object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Place
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createSavedSearch
Constructs a SavedSearch object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- SavedSearch
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createTrend
Constructs a Trend object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Trend
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createTrends
Constructs a Trends object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Trends
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createIDs
Constructs a IDs object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- IDs
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createRateLimitStatus
public static Map<String,RateLimitStatus> createRateLimitStatus(String rawJSON) throws TwitterException Constructs a RateLimitStatus object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- RateLimitStatus
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createDirectMessage
Constructs a DirectMessage object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- DirectMessage
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createLocation
Constructs a Location object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- Location
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createUserList
Constructs a UserList object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- UserList
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.7
-
createOEmbed
Constructs an OEmbed object from rawJSON string.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- OEmbed
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 3.0.2
-
createObject
Construct an object from rawJSON string. This method may be called when you do not know what a given raw JSON string contains. It will do the work of determining what type of object the JSON represents, and constructing the respective object type. For example, if the JSON contents represents a Status, then a Status will be returned. If it represents a deletion notice, then a StatusDeletionNotice will be returned. The caller can simply use instanceof to handle the returned object as applicable. NOTE: the raw JSONObject will be returned in cases where there isn't a discrete respective object type that can be constructed. That way, the caller can at least have access to the JSON itself.- パラメータ:
rawJSON- raw JSON form as String- 戻り値:
- the respective constructed object, or the JSONObject in the case where we cannot determine the object type.
- 例外:
TwitterException- when provided string is not a valid JSON string.- 導入されたバージョン:
- Twitter4J 2.1.9
-