本文整理了Java中twitter4j.Status.getInReplyToStatusId()
方法的一些代码示例,展示了Status.getInReplyToStatusId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Status.getInReplyToStatusId()
方法的具体详情如下:
包路径:twitter4j.Status
类名称:Status
方法名:getInReplyToStatusId
[英]Returns the in_reply_tostatus_id
[中]返回in_reply_tostatus_id
代码示例来源:origin: apache/flume
private Record extractRecord(String idPrefix, Schema avroSchema, Status status) {
User user = status.getUser();
Record doc = new Record(avroSchema);
doc.put("id", idPrefix + status.getId());
doc.put("created_at", formatterTo.format(status.getCreatedAt()));
doc.put("retweet_count", status.getRetweetCount());
doc.put("retweeted", status.isRetweet());
doc.put("in_reply_to_user_id", status.getInReplyToUserId());
doc.put("in_reply_to_status_id", status.getInReplyToStatusId());
addString(doc, "source", status.getSource());
addString(doc, "text", status.getText());
MediaEntity[] mediaEntities = status.getMediaEntities();
if (mediaEntities.length > 0) {
addString(doc, "media_url_https", mediaEntities[0].getMediaURLHttps());
addString(doc, "expanded_url", mediaEntities[0].getExpandedURL());
}
doc.put("user_friends_count", user.getFriendsCount());
doc.put("user_statuses_count", user.getStatusesCount());
doc.put("user_followers_count", user.getFollowersCount());
addString(doc, "user_location", user.getLocation());
addString(doc, "user_description", user.getDescription());
addString(doc, "user_screen_name", user.getScreenName());
addString(doc, "user_name", user.getName());
return doc;
}
代码示例来源:origin: stackoverflow.com
RelatedResults results = t.getRelatedResults(tweetId);
List<Status> conversations = results.getTweetsWithConversation();
/////////
Status originalStatus = t.showStatus(tweetId);
if (conversations.isEmpty()) {
conversations = results.getTweetsWithReply();
}
if (conversations.isEmpty()) {
conversations = new ArrayList<Status>();
Status status = originalStatus;
while (status.getInReplyToStatusId() > 0) {
status = t.showStatus(status.getInReplyToStatusId());
conversations.add(status);
}
}
// show the current message in the conversation, if there's such
if (!conversations.isEmpty()) {
conversations.add(originalStatus);
}
代码示例来源:origin: eshioji/trident-tutorial
private void extractRepliedToStatus(Status tweet, Set<Content> contents) {
long statusId = tweet.getInReplyToStatusId();
if (statusId > 0) {
Content replyStatus = newBase(tweet);
replyStatus.setContentName(String.valueOf(statusId));
replyStatus.setContentType("reply_to_status");
contents.add(replyStatus);
}
}
代码示例来源:origin: stackoverflow.com
if (tweet.getInReplyToStatusId() == id)
all.add(tweet);
代码示例来源:origin: org.apache.flume.flume-ng-sources/flume-twitter-source
private Record extractRecord(String idPrefix, Schema avroSchema, Status status) {
User user = status.getUser();
Record doc = new Record(avroSchema);
doc.put("id", idPrefix + status.getId());
doc.put("created_at", formatterTo.format(status.getCreatedAt()));
doc.put("retweet_count", status.getRetweetCount());
doc.put("retweeted", status.isRetweet());
doc.put("in_reply_to_user_id", status.getInReplyToUserId());
doc.put("in_reply_to_status_id", status.getInReplyToStatusId());
addString(doc, "source", status.getSource());
addString(doc, "text", status.getText());
MediaEntity[] mediaEntities = status.getMediaEntities();
if (mediaEntities.length > 0) {
addString(doc, "media_url_https", mediaEntities[0].getMediaURLHttps());
addString(doc, "expanded_url", mediaEntities[0].getExpandedURL());
}
doc.put("user_friends_count", user.getFriendsCount());
doc.put("user_statuses_count", user.getStatusesCount());
doc.put("user_followers_count", user.getFollowersCount());
addString(doc, "user_location", user.getLocation());
addString(doc, "user_description", user.getDescription());
addString(doc, "user_screen_name", user.getScreenName());
addString(doc, "user_name", user.getName());
return doc;
}
代码示例来源:origin: jcustenborder/kafka-connect-twitter
.put("Source", status.getSource())
.put("Truncated", status.isTruncated())
.put("InReplyToStatusId", status.getInReplyToStatusId())
.put("InReplyToUserId", status.getInReplyToUserId())
.put("InReplyToScreenName", status.getInReplyToScreenName())
内容来源于网络,如有侵权,请联系作者删除!