パッケージ twitter4j
クラス TwitterObjectFactory
java.lang.Object
twitter4j.TwitterObjectFactory
- 導入されたバージョン:
- Twitter4J 4.0.0
-
メソッドの概要
修飾子とタイプメソッド説明static AccountTotals
createAccountTotals
(String rawJSON) Constructs an AccountTotals object from rawJSON string.static DirectMessage
createDirectMessage
(String rawJSON) Constructs a DirectMessage object from rawJSON string.static IDs
Constructs a IDs object from rawJSON string.static Location
createLocation
(String rawJSON) Constructs a Location object from rawJSON string.static Object
createObject
(String rawJSON) Construct an object from rawJSON string.static OEmbed
createOEmbed
(String rawJSON) Constructs an OEmbed object from rawJSON string.static Place
createPlace
(String rawJSON) Constructs a Place object from rawJSON string.static Map<String,
RateLimitStatus> createRateLimitStatus
(String rawJSON) Constructs a RateLimitStatus object from rawJSON string.static Relationship
createRelationship
(String rawJSON) Constructs a Relationship object from rawJSON string.static SavedSearch
createSavedSearch
(String rawJSON) Constructs a SavedSearch object from rawJSON string.static Status
createStatus
(String rawJSON) Constructs a Status object from rawJSON string.static Trend
createTrend
(String rawJSON) Constructs a Trend object from rawJSON string.static Trends
createTrends
(String rawJSON) Constructs a Trends object from rawJSON string.static User
createUser
(String rawJSON) Constructs a User object from rawJSON string.static UserList
createUserList
(String rawJSON) Constructs a UserList object from rawJSON string.static String
getRawJSON
(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
-