fork of indigo with slightly nicer lexgen
at main 559 B view raw
1package client 2 3import ( 4 "context" 5 "fmt" 6 7 appbsky "github.com/bluesky-social/indigo/api/bsky" 8 "github.com/bluesky-social/indigo/atproto/syntax" 9) 10 11func ExampleGet() { 12 13 ctx := context.Background() 14 15 c := APIClient{ 16 Host: "https://public.api.bsky.app", 17 } 18 19 endpoint := syntax.NSID("app.bsky.actor.getProfile") 20 params := map[string]any{ 21 "actor": "atproto.com", 22 } 23 var profile appbsky.ActorDefs_ProfileViewDetailed 24 if err := c.Get(ctx, endpoint, params, &profile); err != nil { 25 panic(err) 26 } 27 28 fmt.Println(profile.Handle) 29 // Output: atproto.com 30}