demo mode
This commit is contained in:
committed by
Eric Bailey
parent
c34c67e4df
commit
91f9bc7ccb
@@ -0,0 +1,20 @@
|
||||
import {type AppBskyFeedDefs, type BskyAgent} from '@atproto/api'
|
||||
|
||||
import {DEMO_FEED} from '#/lib/demo'
|
||||
import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||
|
||||
export class DemoFeedAPI implements FeedAPI {
|
||||
agent: BskyAgent
|
||||
|
||||
constructor({agent}: {agent: BskyAgent}) {
|
||||
this.agent = agent
|
||||
}
|
||||
|
||||
async peekLatest(): Promise<AppBskyFeedDefs.FeedViewPost> {
|
||||
return DEMO_FEED.feed[0]
|
||||
}
|
||||
|
||||
async fetch(): Promise<FeedAPIResponse> {
|
||||
return DEMO_FEED
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user