amoorion.methods.publish_method

Publish: one post on several platforms.

Classes

Publish([vault, view, inbox, dataset])

One post to several platforms.

PublishParams(*, text[, title, links, tags])

A post, and where it goes.

class amoorion.methods.publish_method.PublishParams(*, text, title=None, links=[], tags=[], to)[source]

Bases: Post

A post, and where it goes.

Parameters:
  • text (Annotated[str, MinLen(min_length=1)])

  • title (str | None)

  • links (list[str])

  • tags (list[str])

  • to (Annotated[list[str], MinLen(min_length=1)])

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class amoorion.methods.publish_method.Publish(vault=None, view=None, inbox=None, dataset=None)[source]

Bases: Method

One post to several platforms. One failing doesn’t stop the others.

Parameters:
Params

alias of PublishParams

run(params)[source]

One Result per platform, whatever happens on each of them.

Parameters:

params (PublishParams)

Return type:

list[Result]