lens

package
v0.0.0-...-476b611 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthResponse

type AuthResponse struct {
	Data *struct {
		Authenticate *struct {
			AccessToken  string `json:"accessToken"`
			RefreshToken string `json:"refreshToken"`
		} `json:"authenticate"`
	} `json:"data"`
	Error *string `json:"error"`
}

type DefaultProfileByAddressResponse

type DefaultProfileByAddressResponse struct {
	Data *struct {
		DefaultProfile *User `json:"defaultProfile"`
	} `json:"data"`
	Error *string `json:"error"`
}

type LensAPI

type LensAPI struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(httpClient *http.Client) *LensAPI

func (*LensAPI) AuthenticateWithSignature

func (n *LensAPI) AuthenticateWithSignature(ctx context.Context, address persist.Address, sig string) (string, string, error)

func (*LensAPI) DefaultProfileByAddress

func (n *LensAPI) DefaultProfileByAddress(ctx context.Context, address persist.Address) (User, error)

func (*LensAPI) RefreshAccessToken

func (n *LensAPI) RefreshAccessToken(ctx context.Context, refreshToken string) (string, string, error)

type RefreshResponse

type RefreshResponse struct {
	Data *struct {
		Refresh *struct {
			AccessToken  string `json:"accessToken"`
			RefreshToken string `json:"refreshToken"`
		} `json:"Refresh"`
	} `json:"data"`
	Error *string `json:"error"`
}

type User

type User struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Bio       string `json:"bio"`
	IsDefault bool   `json:"isDefault"`
	Picture   struct {
		Optimized struct {
			URL      string `json:"url"`
			MimeType string `json:"mimeType"`
		} `json:"optimized"`
		URI string `json:"uri"`
	} `json:"picture"`
	Handle  string `json:"handle"`
	OwnedBy string `json:"ownedBy"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL