PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
785 stars 163 forks source link

Undocumented PubSub community-points-channel-v1 #452

Closed HawtDogFlvrWtr closed 3 months ago

HawtDogFlvrWtr commented 3 months ago

I'm in need of capturing community points, and though it's undocumented on the twitch api documentation, it's been available since 2020 as a client:read topic that can be subscribed to. If I created a pull request with the addition of this topic, would it be accepted or because it's undocumented, would it not be? I've seen mention of beta items not being added until they're final so my assumption is, it would be rejected because it's undocumented.

{
  "type": "MESSAGE",
  "data": {
    "topic": "community-points-channel-v1.35740817",
    "message": {
      "type": "community-goal-contribution",
      "data": {
        "timestamp": "2024-06-03T10:41:28.849510331Z",
        "contribution": {
          "channel_id": "35740817",
          "goal": {
            "id": "98e60be0-4010-4c76-be04-6369fc72ab14",
            "channel_id": "35740817",
            "title": "FOR CHARITY!!!!!!!!!!!!!!!!!!!",
            "description": "Spending channel points on this generates money for charity, even if you don't reach the goal it still happens! HAVE FUN SPENDING THEM POINTS! FOR CHARITY!!!",
            "goal_type": "CREATOR",
            "is_in_stock": true,
            "goal_amount": 18000000,
            "points_contributed": 701222,
            "small_contribution": 250,
            "per_stream_maximum_user_contribution": 2000,
            "status": "STARTED",
            "duration_days": 30,
            "started_at": "2024-06-02T10:06:28.056496186Z",
            "ended_at": "2024-07-02T10:06:28.056496186Z",
            "background_color": "#9147FF",
            "default_image": {
              "url_1x": "https://static-cdn.jtvnw.net/community-goal-images/default-1.png",
              "url_2x": "https://static-cdn.jtvnw.net/community-goal-images/default-2.png",
              "url_4x": "https://static-cdn.jtvnw.net/community-goal-images/default-4.png"
            },
            "image": null
          },
          "user": {
            "id": "739329628",
            "login": "grrgoyle",
            "display_name": "grrgoyle"
          },
          "amount": 2000,
          "stream_contribution": 2000,
          "total_contribution": 4000
        }
      }
    }
  }
}
chillymosh commented 3 months ago

This will not be accepted. We do not implemented any unofficial / undocumented endpoints.

Pubsub is going to be deprecated and enter a sunset period in the not too distant future in favour of eventsub by Twitch.