class FeedGenerator

A feed generator that can be followed to receive posts.

Constructor

constructor(data, bot)

Parameters

data: FeedGeneratorData

Feed generator data.

bot: Bot

The active Bot instance.

Properties

displayName: string

The feed generator's name.

uri: string

The feed generator's AT URI.

cid: string

The feed generator's CID.

did: string

The feed generator's DID.

creator: Profile

The feed generator's creator.

description?: string

The feed generator's description.

descriptionFacets?: Facet[]

Any facets associated with the feed generator's description.

avatar?: string

The feed generator's avatar.

isOnline?: boolean

Whether the feed generator is currently online.

likeUri?: string

The URI of the feed generator's like record, if the viewer has liked the feed generator.

indexedAt: Date

The time the feed generator was indexed by the App View.

Methods

like()

Like the feed generator.

Returns

Promise<string>

The like record's AT URI.

unlike()

Unlike the feed generator.

getPosts(options?)

Get a feed of posts from the feed generator.

Parameters

options: FeedGeneratorGetPostsOptions = {}

Options for fetching the feed.

Returns

Promise<{ cursor: string | undefined; posts: Post[]; }>

The posts and a cursor for pagination.

fromView(view, bot)

Constructs an instance from a GeneratorView.

Parameters

view: AppBskyFeedDefs.GeneratorView

The GeneratorView to construct from.

bot: Bot

The active Bot instance.