diff --git a/bluesky.go b/bluesky.go index 53a34c0..263df53 100644 --- a/bluesky.go +++ b/bluesky.go @@ -166,8 +166,10 @@ func (bluesky *Bluesky) DeleteRecord(args []string) *CommitResponse { return resp } -func (bluesky *Bluesky) FetchPost(did string, rkey string) *FetchedPost { - resp := &FetchedPost{} +func (bluesky *Bluesky) FetchPost(did string, rkey string) *[]FetchedPost { + resp := &struct { + Posts []FetchedPost `json:"posts"` + }{} params := struct { URIs string `url:"uris"` }{ @@ -175,5 +177,5 @@ func (bluesky *Bluesky) FetchPost(did string, rkey string) *FetchedPost { } bluesky.sling.New().Base("https://public.api.bsky.app"). Get("/xrpc/app.bsky.feed.getPosts").QueryStruct(¶ms).Receive(resp, resp) - return resp + return &resp.Posts }