Documentation
¶
Index ¶
- type Author
- type AuthorProfile
- type BatchResponseContentListItem
- type Comment
- type CommentData
- type CommentProperty
- type Content
- type ContentListItem
- type ContentProperty
- type CreateCommentOptions
- type CreateCommentRequest
- type CreateCommentResponse
- type CreateLikeRequest
- type CreateOrUpdateContentResponse
- type DeleteLikeRequest
- type Execution
- type FindOrCreateContentRequest
- type FindOrCreateProfileParameters
- type FindOrCreateProfileRequest
- type FollowRequest
- type GetCommentByIdResponse
- type GetCommentRepliesOptions
- type GetCommentsOptions
- type GetCommentsResponse
- type GetContentResponse
- type GetContentsByBatchIDsResponse
- type GetContentsOption
- type GetContentsResponse
- type GetContentsSortDirection
- type GetFollowersResponse
- type GetFollowingResponse
- type GetFollowingWhoFollowResponse
- type GetSuggestedProfilesResponse
- type Profile
- type ProfileDetails
- type ProfileResponse
- type RequestingProfileSocialInfo
- type SocialCounts
- type SuggestedProfileValue
- type TapestryClient
- func (c *TapestryClient) AddFollower(ctx context.Context, startID, endID string) error
- func (c *TapestryClient) CreateComment(ctx context.Context, options CreateCommentOptions) (*CreateCommentResponse, error)
- func (c *TapestryClient) CreateLike(ctx context.Context, contentID string, profile Profile) error
- func (c *TapestryClient) DeleteComment(ctx context.Context, commentID string) error
- func (c *TapestryClient) DeleteContent(ctx context.Context, contentId string) error
- func (c *TapestryClient) DeleteLike(ctx context.Context, contentID string, profile Profile) error
- func (c *TapestryClient) FindOrCreateContent(ctx context.Context, profileId, id string, properties []ContentProperty) (*CreateOrUpdateContentResponse, error)
- func (c *TapestryClient) FindOrCreateProfile(ctx context.Context, params FindOrCreateProfileParameters) (*ProfileResponse, error)
- func (c *TapestryClient) GetCommentByID(ctx context.Context, commentID string, requestingProfileID string) (*GetCommentByIdResponse, error)
- func (c *TapestryClient) GetCommentReplies(ctx context.Context, commentID string, options GetCommentRepliesOptions) (*GetCommentsResponse, error)
- func (c *TapestryClient) GetComments(ctx context.Context, options GetCommentsOptions) (*GetCommentsResponse, error)
- func (c *TapestryClient) GetContentByID(ctx context.Context, contentId string) (*GetContentResponse, error)
- func (c *TapestryClient) GetContents(ctx context.Context, opts ...GetContentsOption) (*GetContentsResponse, error)
- func (c *TapestryClient) GetContentsByBatchIDs(ctx context.Context, batchIDs []string) (*GetContentsByBatchIDsResponse, error)
- func (c *TapestryClient) GetFollowers(ctx context.Context, profileID string) (*GetFollowersResponse, error)
- func (c *TapestryClient) GetFollowing(ctx context.Context, profileID string) (*GetFollowingResponse, error)
- func (c *TapestryClient) GetFollowingWhoFollow(ctx context.Context, profileID string, requestorID string) (*GetFollowingWhoFollowResponse, error)
- func (c *TapestryClient) GetProfileByID(ctx context.Context, id string) (*ProfileResponse, error)
- func (c *TapestryClient) GetSuggestedProfiles(ctx context.Context, address string, ownAppOnly bool) (*GetSuggestedProfilesResponse, error)
- func (c *TapestryClient) RemoveFollower(ctx context.Context, startID, endID string) error
- func (c *TapestryClient) UpdateComment(ctx context.Context, commentID string, properties []CommentProperty) (*UpdateCommentResponse, error)
- func (c *TapestryClient) UpdateContent(ctx context.Context, contentId string, properties []ContentProperty) (*CreateOrUpdateContentResponse, error)
- func (c *TapestryClient) UpdateProfile(ctx context.Context, id string, reqData UpdateProfileParameters) error
- type UnixTimestamp
- type UpdateCommentRequest
- type UpdateCommentResponse
- type UpdateContentRequest
- type UpdateProfileParameters
- type UpdateProfileRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorProfile ¶
type AuthorProfile struct { ID string `json:"id"` Username string `json:"username"` Bio string `json:"bio"` Image string `json:"image"` CreatedAt UnixTimestamp `json:"created_at"` }
type BatchResponseContentListItem ¶ added in v0.2.1
type BatchResponseContentListItem struct { Content Content `json:"content"` SocialCounts SocialCounts `json:"socialCounts"` }
type Comment ¶
type Comment struct { Namespace string `json:"namespace"` CreatedAt UnixTimestamp `json:"created_at"` Text string `json:"text"` ID string `json:"id"` }
type CommentData ¶
type CommentData struct { Comment Comment `json:"comment"` ContentID string `json:"contentId"` Author Author `json:"author"` SocialCounts SocialCounts `json:"socialCounts"` RequestingProfileSocialInfo map[string]interface{} `json:"requestingProfileSocialInfo"` RecentReplies []CommentData `json:"recentReplies,omitempty"` }
type CommentProperty ¶
type Content ¶
type Content struct { Namespace string `json:"namespace"` ID string `json:"id"` Description string `json:"description"` Title string `json:"title"` CreatedAt UnixTimestamp `json:"created_at"` }
type ContentListItem ¶
type ContentListItem struct { AuthorProfile AuthorProfile `json:"authorProfile"` Content Content `json:"content"` SocialCounts SocialCounts `json:"socialCounts"` RequestingProfileSocialInfo RequestingProfileSocialInfo `json:"requestingProfileSocialInfo"` }
type ContentProperty ¶
type CreateCommentOptions ¶
type CreateCommentOptions struct { ContentID string `json:"contentId"` ProfileID string `json:"profileId"` Text string `json:"text"` CommentID string `json:"commentId"` Properties []CommentProperty `json:"properties"` }
type CreateCommentRequest ¶
type CreateCommentRequest struct { CreateCommentOptions Execution string `json:"execution"` }
type CreateCommentResponse ¶
type CreateCommentResponse struct {
Comment
}
type CreateLikeRequest ¶
type CreateOrUpdateContentResponse ¶
type CreateOrUpdateContentResponse struct{ Content }
type DeleteLikeRequest ¶
type DeleteLikeRequest struct {
StartId string `json:"startId"`
}
type FindOrCreateContentRequest ¶ added in v0.1.1
type FindOrCreateContentRequest struct { ProfileID string `json:"profileId"` ID string `json:"id,omitempty"` Properties []ContentProperty `json:"properties"` }
type FindOrCreateProfileRequest ¶
type FindOrCreateProfileRequest struct { FindOrCreateProfileParameters Execution string `json:"execution,omitempty"` Blockchain string `json:"blockchain,omitempty"` }
type FollowRequest ¶ added in v0.1.2
type GetCommentByIdResponse ¶
type GetCommentByIdResponse struct {
CommentData
}
type GetCommentRepliesOptions ¶ added in v0.2.2
type GetCommentsOptions ¶
type GetCommentsResponse ¶
type GetCommentsResponse struct {
Comments []CommentData `json:"comments"`
}
type GetContentResponse ¶
type GetContentResponse struct { Content Content `json:"content"` SocialCounts SocialCounts `json:"socialCounts"` }
type GetContentsByBatchIDsResponse ¶ added in v0.2.1
type GetContentsByBatchIDsResponse struct { Successful []BatchResponseContentListItem `json:"successful"` Failed []struct { ID string `json:"id"` Error string `json:"error"` } `json:"failed"` }
type GetContentsOption ¶
type GetContentsOption func(*getContentsParams)
Option pattern for configurable parameters
func WithOrderBy ¶
func WithOrderBy(field string, direction GetContentsSortDirection) GetContentsOption
func WithPagination ¶
func WithPagination(page, pageSize string) GetContentsOption
func WithProfileID ¶
func WithProfileID(profileID string) GetContentsOption
func WithRequestingProfileID ¶
func WithRequestingProfileID(requestingProfileID string) GetContentsOption
type GetContentsResponse ¶
type GetContentsResponse struct { Contents []ContentListItem `json:"contents"` Page int `json:"page"` PageSize int `json:"pageSize"` }
type GetContentsSortDirection ¶
type GetContentsSortDirection string
const ( GetContentsSortDirectionAsc GetContentsSortDirection = "ASC" GetContentsSortDirectionDesc GetContentsSortDirection = "DESC" )
type GetFollowersResponse ¶ added in v0.1.2
type GetFollowersResponse struct {
Profiles []ProfileDetails `json:"profiles"`
}
type GetFollowingResponse ¶ added in v0.1.2
type GetFollowingResponse struct {
Profiles []ProfileDetails `json:"profiles"`
}
type GetFollowingWhoFollowResponse ¶ added in v0.1.2
type GetFollowingWhoFollowResponse struct {
Profiles []ProfileDetails `json:"profiles"`
}
type GetSuggestedProfilesResponse ¶ added in v0.1.2
type GetSuggestedProfilesResponse struct {
Profiles map[string]SuggestedProfileValue
}
type ProfileDetails ¶ added in v0.1.2
type ProfileDetails struct { ID string `json:"id"` Username string `json:"username"` Bio string `json:"bio,omitempty"` Image string `json:"image,omitempty"` CreatedAt UnixTimestamp `json:"created_at"` }
type ProfileResponse ¶
type RequestingProfileSocialInfo ¶
type RequestingProfileSocialInfo struct {
HasLiked bool `json:"hasLiked"`
}
type SocialCounts ¶
type SuggestedProfileValue ¶ added in v0.1.2
type SuggestedProfileValue struct { Namespaces []struct { Name string `json:"name"` ReadableName string `json:"readableName,omitempty"` FaviconURL string `json:"faviconURL,omitempty"` } `json:"namespaces"` Profile ProfileDetails `json:"profile"` Wallet struct { Address string `json:"address"` } `json:"wallet"` }
type TapestryClient ¶
type TapestryClient struct {
// contains filtered or unexported fields
}
func NewTapestryClient ¶
func NewTapestryClient(apiKey string, tapestryApiBaseUrl string, execution Execution, blockchain string) TapestryClient
func (*TapestryClient) AddFollower ¶ added in v0.1.2
func (c *TapestryClient) AddFollower(ctx context.Context, startID, endID string) error
func (*TapestryClient) CreateComment ¶
func (c *TapestryClient) CreateComment(ctx context.Context, options CreateCommentOptions) (*CreateCommentResponse, error)
func (*TapestryClient) CreateLike ¶
func (*TapestryClient) DeleteComment ¶
func (c *TapestryClient) DeleteComment(ctx context.Context, commentID string) error
func (*TapestryClient) DeleteContent ¶
func (c *TapestryClient) DeleteContent(ctx context.Context, contentId string) error
func (*TapestryClient) DeleteLike ¶
func (*TapestryClient) FindOrCreateContent ¶
func (c *TapestryClient) FindOrCreateContent(ctx context.Context, profileId, id string, properties []ContentProperty) (*CreateOrUpdateContentResponse, error)
func (*TapestryClient) FindOrCreateProfile ¶
func (c *TapestryClient) FindOrCreateProfile(ctx context.Context, params FindOrCreateProfileParameters) (*ProfileResponse, error)
func (*TapestryClient) GetCommentByID ¶
func (c *TapestryClient) GetCommentByID(ctx context.Context, commentID string, requestingProfileID string) (*GetCommentByIdResponse, error)
func (*TapestryClient) GetCommentReplies ¶ added in v0.2.2
func (c *TapestryClient) GetCommentReplies(ctx context.Context, commentID string, options GetCommentRepliesOptions) (*GetCommentsResponse, error)
func (*TapestryClient) GetComments ¶
func (c *TapestryClient) GetComments(ctx context.Context, options GetCommentsOptions) (*GetCommentsResponse, error)
func (*TapestryClient) GetContentByID ¶
func (c *TapestryClient) GetContentByID(ctx context.Context, contentId string) (*GetContentResponse, error)
func (*TapestryClient) GetContents ¶
func (c *TapestryClient) GetContents(ctx context.Context, opts ...GetContentsOption) (*GetContentsResponse, error)
func (*TapestryClient) GetContentsByBatchIDs ¶ added in v0.2.1
func (c *TapestryClient) GetContentsByBatchIDs(ctx context.Context, batchIDs []string) (*GetContentsByBatchIDsResponse, error)
func (*TapestryClient) GetFollowers ¶ added in v0.1.2
func (c *TapestryClient) GetFollowers(ctx context.Context, profileID string) (*GetFollowersResponse, error)
func (*TapestryClient) GetFollowing ¶ added in v0.1.2
func (c *TapestryClient) GetFollowing(ctx context.Context, profileID string) (*GetFollowingResponse, error)
func (*TapestryClient) GetFollowingWhoFollow ¶ added in v0.1.2
func (c *TapestryClient) GetFollowingWhoFollow(ctx context.Context, profileID string, requestorID string) (*GetFollowingWhoFollowResponse, error)
func (*TapestryClient) GetProfileByID ¶
func (c *TapestryClient) GetProfileByID(ctx context.Context, id string) (*ProfileResponse, error)
func (*TapestryClient) GetSuggestedProfiles ¶ added in v0.1.2
func (c *TapestryClient) GetSuggestedProfiles(ctx context.Context, address string, ownAppOnly bool) (*GetSuggestedProfilesResponse, error)
func (*TapestryClient) RemoveFollower ¶ added in v0.1.2
func (c *TapestryClient) RemoveFollower(ctx context.Context, startID, endID string) error
func (*TapestryClient) UpdateComment ¶
func (c *TapestryClient) UpdateComment(ctx context.Context, commentID string, properties []CommentProperty) (*UpdateCommentResponse, error)
func (*TapestryClient) UpdateContent ¶
func (c *TapestryClient) UpdateContent(ctx context.Context, contentId string, properties []ContentProperty) (*CreateOrUpdateContentResponse, error)
func (*TapestryClient) UpdateProfile ¶
func (c *TapestryClient) UpdateProfile(ctx context.Context, id string, reqData UpdateProfileParameters) error
type UnixTimestamp ¶ added in v0.1.5
type UnixTimestamp int64
UnixTimestamp represents a unix timestamp that can be unmarshaled from either an integer or a 64 bit integer representation in object format
func (*UnixTimestamp) UnmarshalJSON ¶ added in v0.1.5
func (t *UnixTimestamp) UnmarshalJSON(data []byte) error
type UpdateCommentRequest ¶
type UpdateCommentRequest struct {
Properties []CommentProperty `json:"properties"`
}
type UpdateCommentResponse ¶
type UpdateCommentResponse struct {
Comment
}
type UpdateContentRequest ¶
type UpdateContentRequest struct {
Properties []ContentProperty `json:"properties"`
}
type UpdateProfileParameters ¶
type UpdateProfileRequest ¶
type UpdateProfileRequest struct { UpdateProfileParameters Execution string `json:"execution,omitempty"` }
Click to show internal directories.
Click to hide internal directories.