Community's

Berichten van community ophalen

GET /v1/communities/{community_id}/tweets reads 2 credits

Berichten in een community, gerangschikt op relevantie of nieuwste eerst.

Queryparameters

QueryparameterTypeBetekenis
countint 1–100 = 40Gevraagde paginagrootte; X behandelt dit als een hint
cursorstringUit next_cursor van de vorige pagina; een cursor die niet kan worden gedecodeerd is 400
rankingRelevance | Recency = RelevanceRelevance voor topberichten, Recency voor de nieuwste

antwoord

Het community-id, een pagina met berichten en een cursor voor de volgende pagina (null aan het einde). Een onbekende of niet-beschikbare community is 404.

Status: 200, 400, 404, 422, 429, 502

verzoek
curl https://api.xsignalfeed.com/v1/communities/1493446837214187523/tweets?count=20&ranking=Recency \
  -H "Authorization: Bearer xsf_your_key"
antwoord · 200 / 400
{
  "community_id": "1493446837214187523",
  "tweets": [
    {
      "id": 2097713756054704513,
      "created_ms": 1788968907737,
      "user_id": 2729705040,
      "user": "buildinpublic",
      "name": "Build in Public",
      "text": "today we're launching DEALS 🎁✨ …",
      "lang": "en",
      "reply_to": null,
      "reply_to_status_id": null,
      "reply_to_user_id": null,
      "conversation_id": "2097713756054704513",
      "is_rt": false,
      "rt_of": null,
      "is_quote": false,
      "quoted": null,
      "media": [
        "https://pbs.twimg.com/media/….jpg"
      ],
      "media_items": [
        {
          "type": "photo",
          "url": "https://pbs.twimg.com/media/….jpg",
          "expanded_url": "https://x.com/buildinpublic/status/2097713756054704513/photo/1",
          "width": 1600,
          "height": 900
        }
      ],
      "urls": [
        "https://…"
      ],
      "views": "18422",
      "counts": {
        "reply": 41,
        "rt": 12,
        "like": 210,
        "quote": 3,
        "bookmark": 55
      },
      "source": "<a href=\"https://mobile.twitter.com\" rel=\"nofollow\">Twitter Web App</a>"
    },
    {
      "…": "…"
    }
  ],
  "next_cursor": "DAABCgABHSYyKLN__-kKAAIdJidkM5rByQgAAwAAAAIAAA"
}