GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    【Ξnigmatico】:misskey: (enigmatico@mk.absturztau.be)'s status on Saturday, 08-Feb-2025 04:36:35 JST【Ξnigmatico】:misskey:【Ξnigmatico】:misskey:

    I'm writting a bot (again), and while browsing through my old code to remind me of how the API works, I've been reminded of that time I wrote a bot using the Mastodon API wrapper for Python. But the bot was hosted on a Pleroma instance (our pleroma).

    Turns out, Pleroma doesn't (or didn't at the time) have a streaming API like Mastodon does. So what I did was to create a class that simulated a streaming API, by constantly reading the notifications and checking if there were new notifications since the last time checked, and then using a callback passing the notification to it.

    All because I didn't want to write my own API wrapper and I wanted to stick to Mastodon.py. But it worked.

    https://gitlab.com/enigmatico/maira-bot/-/blob/main/MastoAPI.py?ref_type=heads

    In conversationabout 3 months ago from mk.absturztau.bepermalink

    Attachments


    1. Domain not in remote thumbnail source whitelist: gitlab.com
      MastoAPI.py · main · Enigmatico / Maira Bot · GitLab
      Fedi bot
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.