Skip to content

Endpoints

Elliott Richmond edited this page Jan 25, 2024 · 2 revisions

API Endpoints Documentation

Overview

This document outlines the available endpoints for the mammoth Mastodon API.

Endpoints

  • Base URL: https://backend.newsmast.org

All Communities timeline

  • Endpoint: /api/v1/timelines/newsmast/public/all_communities/

  • Method: GET

  • Description: Retrieve information about all communities, including endpoints for those communities

  • Parameters:

    • exclude_replies: Boolean { true | false }.
  • Returns:

    {
        "id": "111816692031344098",
        "community_id": 79,
        "community_name": "Music",
        "community_slug": "music",
        "created_at": "2024-01-25T12:55:02.000Z",
        "in_reply_to_id": null,
        "in_reply_to_account_id": null,
        "sensitive": false,
        "spoiler_text": "",
        "visibility": "public",
        "language": "de",
        "is_only_for_followers": false,
        // ...
    }

Community timeline

  • Endpoint: /api/v1/timelines/newsmast/public/community

  • Method: GET

  • Description: Retrieve information about mammoth communities.

  • Parameters:

    • exclude_replies: Boolean { true | false }.
  • Returns:

    {
        "id": "111817438318258678",
        "community_id": 32,
        "community_name": "Hunger, Disease & Water",
        "community_slug": "hunger_disease_water",
        "created_at": "2024-01-25T16:04:24.000Z",
        "in_reply_to_id": null,
        "in_reply_to_account_id": null,
        "sensitive": false,
        "spoiler_text": "",
        "visibility": "public",
        "language": "en",
        "is_only_for_followers": false,

        // ...
    }

Specific Community timeline

  • Endpoint: /api/v1/timelines/newsmast/community/recommended?slug=technology&exclude_replies=true

  • Method: GET

  • Description: Retrieve information about community timelines based on slug.

  • Parameters:

    • exclude_replies: Boolean { true | false }.
  • Returns:

    {
        "id": "111816732496113723",
        "community_id": "",
        "community_name": "",
        "community_slug": "",
        "created_at": "2024-01-25T13:00:00.000Z",
        "in_reply_to_id": null,
        "in_reply_to_account_id": null,
        "sensitive": false,
        "spoiler_text": "",
        "visibility": "public",
        "language": "en",
        "is_only_for_followers": false,
        // ...
    }