Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
URL string `json:"url"`
Discovery bool `json:"discovery,omitempty"`
Schemes []string `json:"schemes,omitempty"`
}
Endpoint contains single endpoint to check against
type Info ¶
type Info struct {
Status int `json:"-"`
Type string `json:"type,omitempty"`
CacheAge uint64 `json:"cache_age,omitempty"`
URL string `json:"url,omitempty"`
ProviderURL string `json:"provider_url,omitempty"`
ProviderName string `json:"provider_name,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Width uint64 `json:"width,omitempty"`
Height uint64 `json:"height,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth uint64 `json:"thumbnail_width,omitempty"`
ThumbnailHeight uint64 `json:"thumbnail_height,omitempty"`
AuthorName string `json:"author_name,omitempty"`
AuthorURL string `json:"author_url,omitempty"`
HTML string `json:"html,omitempty"`
}
Info returns information for embedding website
func (*Info) FillFromJSON ¶
FillFromJSON fills the structure from provided Oembed JSON
func (*Info) MergeWith ¶
MergeWith adds missing data to the structure from another oembed.Info structure
type Item ¶
type Item struct {
IsEndpointURLComplete bool
EndpointURL string
ProviderName string
ProviderURL string
// contains filtered or unexported fields
}
Item contains data for a schema
func (*Item) ComposeURL ¶
ComposeURL returns url of oembed resource ready to be queried
func (*Item) FetchOembed ¶
FetchOembed return oembed info from an url containing it
type Oembed ¶
type Oembed struct {
// contains filtered or unexported fields
}
Oembed contains list of available oembed items (official endpoints)
Click to show internal directories.
Click to hide internal directories.