Skip to content

Commit

Permalink
More Twitter json changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frey, Kerry committed Sep 16, 2024
1 parent 04a4b5f commit 5ff0987
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,9 @@ public interface Tweet {
* Get the reposts of the tweet
*/
Reposts getReposts();

/**
* Get the edit history of the tweet
*/
List<String> getEditHistoryTweetIds();
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ public String getSource() {
return null;
}

@Override
public List<String> getEditHistoryTweetIds() {
LOGGER.error(NOT_IMPLEMENTED_EXCEPTION);
return Collections.emptyList();
}

@Override
public List<MediaEntityV1> getMedia() {
if (entities != null) {
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/io/github/redouane59/twitter/dto/tweet/TweetV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ public String getSource() {
return data.getSource();
}

@Override
public List<String> getEditHistoryTweetIds() {
if (data == null) {
return null;
}
return data.getEditHistoryTweetIds();
}

@Override
public Entities getEntities() {
if (data == null) {
Expand Down Expand Up @@ -299,6 +307,8 @@ public static class TweetData implements Tweet {
private Geo geo;
private String source;
private AdditionalProperties additionalProperties;
@JsonProperty("edit_history_tweet_ids")
private List<String> editHistoryTweetIds;



Expand Down

0 comments on commit 5ff0987

Please sign in to comment.