Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement fetching of most positive/negative/replied/retweeted tweets per slug #4490

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

IvanIvanoff
Copy link
Member

@IvanIvanoff IvanIvanoff commented Nov 27, 2024

Changes

tweetType is one of: MOST_POSTIVE, MOST_NEGATIVE, MOST_REPLIES, MOST_RETWEETS.

The API returns the top size number of tweets in the specified range, ordered according to tweetType in descending order.

{
  getMostTweets(
    tweetType: MOST_POSITIVE
    selector: {slugs: ["bitcoin", "ethereum"]}
    from: "2024-11-25T00:00:00Z"
    to: "2024-11-27T00:00:00Z"
    size: 2) {
      slug
      tweets {
        datetime
        text
        screenName
        sentimentPositive
        sentimentNegative
        repliesCount
        retweetsCount
      }
  }
}
{
  "data": {
    "getMostTweets": [
      {
        "slug": "bitcoin",
        "tweets": [
          {
            "datetime": "2024-11-26T18:21:30Z",
            "repliesCount": 0,
            "retweetsCount": 0,
            "screenName": "take_gains",
            "sentimentNegative": 0.0171372827,
            "sentimentPositive": 0.9828627173,
            "text": "Whipsaw wick completed, lets continue. \n\n$BTC https://t.co/e8mH8RUKjO"
          },
          {
            "datetime": "2024-11-26T19:07:51Z",
            "repliesCount": 0,
            "retweetsCount": 0,
            "screenName": "IIICapital",
            "sentimentNegative": 0.0222001588,
            "sentimentPositive": 0.9777998412,
            "text": "Incredible podcast with two of the sharpest minds in bitcoin.\n\nThank you both for the time @Excellion and @dhruvbansal.\n\nTune in and comment whether you think bitcoin was an invention or discovery!"
          }
        ]
      },
      {
        "slug": "ethereum",
        "tweets": [
          {
            "datetime": "2024-11-26T17:07:36Z",
            "repliesCount": 0,
            "retweetsCount": 0,
            "screenName": "koeppelmann",
            "sentimentNegative": 0.0269591219,
            "sentimentPositive": 0.9730408781,
            "text": "Thanks for hosting this debate @laurashin! While I think Justin and I share a similar vision of what Ethereum should ideally become in a couple of years, he thinks we are on track for it - I believe decisive action is needed now to achieve that vision."
          },
          {
            "datetime": "2024-11-26T03:54:46Z",
            "repliesCount": 0,
            "retweetsCount": 0,
            "screenName": "AssetsNorris",
            "sentimentNegative": 0.0434526837,
            "sentimentPositive": 0.9565473163,
            "text": "While #BTC correcting, #ETH showing strength.\n\nFinally a fresh new impulse on ETH/BTC pairing chart.\n\nWould be perfect to follow this up with another one after. https://t.co/FBkRhnkagq"
          }
        ]
      }
    ]
  }
}

Ticket

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have tried to find clearer solution before commenting hard-to-understand parts of code
  • I have added tests that prove my fix is effective or that my feature works

@IvanIvanoff IvanIvanoff force-pushed the add-pos-neg-tweets branch 3 times, most recently from f3b032c to cc5cad2 Compare November 27, 2024 15:29
@IvanIvanoff IvanIvanoff merged commit 289cbf7 into master Nov 28, 2024
4 checks passed
@IvanIvanoff IvanIvanoff deleted the add-pos-neg-tweets branch November 28, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants