comparison tests/test_silos_bluesky.py @ 48:486affad656e

Rewrite posting process with card system and more structured API - The basic posting process is more opinionated so that silos have less code to write, and dry-run posting is handled by default. - Add "card" system where SiloRider is able to fetch the page of a post to check for any custom summary or featured image. This is how Twitter, Facebook, Discord, and many others come up with their "preview card" when a link is posted.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 08 Oct 2023 13:47:28 -0700
parents ac5911e76ef2
children d65f6dced79f
comparison
equal deleted inserted replaced
47:4be321bd5ed4 48:486affad656e
165 165
166 def upload_blob(self, tmpfile, desc): 166 def upload_blob(self, tmpfile, desc):
167 self.blobs.append((tmpfile, desc)) 167 self.blobs.append((tmpfile, desc))
168 return len(self.blobs) 168 return len(self.blobs)
169 169
170 def send_post(self, text, embed=None, facets=None): 170 def send_post(self, text, post_datetime=None, embed=None, facets=None):
171 self.posts.append((text, embed, facets)) 171 self.posts.append((text, embed, facets))
172 172
173 173
174 class BlueskyMockUtil: 174 class BlueskyMockUtil:
175 def installCredentials(self, cli, silo_name): 175 def installCredentials(self, cli, silo_name):