Something went wrong. Try again.
Go client library for the Semble API
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177package semble
type URLType string
const ( URLTypeArticle URLType = "article" URLTypeLink URLType = "link" URLTypeBook URLType = "book" URLTypeResearch URLType = "research" URLTypeAudio URLType = "audio" URLTypeVideo URLType = "video" URLTypeSocial URLType = "social" URLTypeEvent URLType = "event" URLTypeSoftware URLType = "software")
type AccessType string
const ( AccessOpen AccessType = "OPEN" AccessClosed AccessType = "CLOSED")
type TargetType string
const ( TargetUser TargetType = "USER" TargetCollection TargetType = "COLLECTION")
type ConnectionType string
const ( ConnectionSupports ConnectionType = "SUPPORTS" ConnectionOpposes ConnectionType = "OPPOSES" ConnectionAddresses ConnectionType = "ADDRESSES" ConnectionHelpful ConnectionType = "HELPFUL" ConnectionLeadsTo ConnectionType = "LEADS_TO" ConnectionRelated ConnectionType = "RELATED" ConnectionSupplement ConnectionType = "SUPPLEMENT" ConnectionExplainer ConnectionType = "EXPLAINER")
type PageQuery struct { Page, Limit int SortBy, SortOrder string}
type Pagination struct { CurrentPage int `json:"currentPage,omitempty"` TotalPages int `json:"totalPages,omitempty"` TotalCount int `json:"totalCount,omitempty"` HasMore bool `json:"hasMore,omitempty"` Limit int `json:"limit,omitempty"` NextCursor string `json:"nextCursor,omitempty"`}
type User struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Handle string `json:"handle,omitempty"` AvatarURL string `json:"avatarUrl,omitempty"` BannerURL string `json:"bannerUrl,omitempty"` Description string `json:"description,omitempty"` IsFollowing bool `json:"isFollowing,omitempty"` FollowsYou bool `json:"followsYou,omitempty"` FollowerCount int `json:"followerCount,omitempty"` FollowingCount int `json:"followingCount,omitempty"` FollowedCollectionsCount int `json:"followedCollectionsCount,omitempty"` URLCardCount int `json:"urlCardCount,omitempty"` CollectionCount int `json:"collectionCount,omitempty"` ConnectionCount int `json:"connectionCount,omitempty"` ConnectionsByType map[string]int `json:"connectionsByType,omitempty"` Labels []any `json:"labels,omitempty"`}
type URLMetadata struct { URL string `json:"url,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Author string `json:"author,omitempty"` PublishedDate string `json:"publishedDate,omitempty"` SiteName string `json:"siteName,omitempty"` ImageURL string `json:"imageUrl,omitempty"` Type URLType `json:"type,omitempty"` RetrievedAt string `json:"retrievedAt,omitempty"` DOI string `json:"doi,omitempty"` ISBN string `json:"isbn,omitempty"`}
type URLView struct { URL string `json:"url,omitempty"` Metadata *URLMetadata `json:"metadata,omitempty"` URLLibraryCount int `json:"urlLibraryCount,omitempty"` URLConnectionCount int `json:"urlConnectionCount,omitempty"` URLInLibrary bool `json:"urlInLibrary,omitempty"` URLIsConnected bool `json:"urlIsConnected,omitempty"`}
type URLCard struct { Type string `json:"type,omitempty"` ID string `json:"id,omitempty"` URL string `json:"url,omitempty"` URI string `json:"uri,omitempty"` CardContent any `json:"cardContent,omitempty"` LibraryCount int `json:"libraryCount,omitempty"` URLLibraryCount int `json:"urlLibraryCount,omitempty"` URLInLibrary bool `json:"urlInLibrary,omitempty"` URLIsConnected bool `json:"urlIsConnected,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` Author *User `json:"author,omitempty"` Note *CardNote `json:"note,omitempty"` Collections []Collection `json:"collections,omitempty"` Libraries []User `json:"libraries,omitempty"`}
type Collection struct { ID string `json:"id,omitempty"` URI string `json:"uri,omitempty"` Name string `json:"name,omitempty"` Author *User `json:"author,omitempty"` Description string `json:"description,omitempty"` AccessType AccessType `json:"accessType,omitempty"` CardCount int `json:"cardCount,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` IsFollowing bool `json:"isFollowing,omitempty"` FollowerCount int `json:"followerCount,omitempty"`}
type Connection struct { ID string `json:"id,omitempty"` Type ConnectionType `json:"type,omitempty"` Note string `json:"note,omitempty"` CreatedAt string `json:"createdAt,omitempty"` UpdatedAt string `json:"updatedAt,omitempty"` Curator *User `json:"curator,omitempty"`}
type ConnectionView struct { Connection Connection `json:"connection"` Source URLView `json:"source"` Target URLView `json:"target"`}
type Page[T any] struct { Items []T `json:"items,omitempty"` Cards []T `json:"cards,omitempty"` Collections []T `json:"collections,omitempty"` Users []T `json:"users,omitempty"` URLs []T `json:"urls,omitempty"` Libraries []T `json:"libraries,omitempty"` Notes []T `json:"notes,omitempty"` Activities []T `json:"activities,omitempty"` Actors []T `json:"actors,omitempty"` Connections []T `json:"connections,omitempty"` Notifications []T `json:"notifications,omitempty"` Pagination Pagination `json:"pagination"` Sorting any `json:"sorting,omitempty"` UnreadCount int `json:"unreadCount,omitempty"`}
type CountResponse struct { Count int `json:"count"` UnreadCount int `json:"unreadCount,omitempty"`}
type IDResponse struct { CardID string `json:"cardId,omitempty"` CollectionID string `json:"collectionId,omitempty"` ConnectionID string `json:"connectionId,omitempty"` FollowID string `json:"followId,omitempty"` Success bool `json:"success,omitempty"` MarkedCount int `json:"markedCount,omitempty"`}