Documentation ¶
Overview ¶
Package webfonts provides access to the Google Fonts Developer API.
See https://developers.google.com/fonts/docs/developer_api
Usage example:
import "google.golang.org/api/webfonts/v1" ... webfontsService, err := webfonts.New(oauthHttpClient)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Webfonts *WebfontsService // contains filtered or unexported fields }
type Webfont ¶
type Webfont struct { // Category: The category of the font. Category string `json:"category,omitempty"` // Family: The name of the font. Family string `json:"family,omitempty"` // Files: The font files (with all supported scripts) for each one of // the available variants, as a key : value map. Files map[string]string `json:"files,omitempty"` // Kind: This kind represents a webfont object in the webfonts service. Kind string `json:"kind,omitempty"` // LastModified: The date (format "yyyy-MM-dd") the font was modified // for the last time. LastModified string `json:"lastModified,omitempty"` // Subsets: The scripts supported by the font. Subsets []string `json:"subsets,omitempty"` // Variants: The available variants for the font. Variants []string `json:"variants,omitempty"` // Version: The font version. Version string `json:"version,omitempty"` }
type WebfontList ¶
type WebfontsListCall ¶
type WebfontsListCall struct {
// contains filtered or unexported fields
}
func (*WebfontsListCall) Do ¶
func (c *WebfontsListCall) Do() (*WebfontList, error)
func (*WebfontsListCall) Fields ¶
func (c *WebfontsListCall) Fields(s ...googleapi.Field) *WebfontsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*WebfontsListCall) Sort ¶
func (c *WebfontsListCall) Sort(sort string) *WebfontsListCall
Sort sets the optional parameter "sort": Enables sorting of the list
Possible values:
"alpha" - Sort alphabetically "date" - Sort by date added "popularity" - Sort by popularity "style" - Sort by number of styles "trending" - Sort by trending
type WebfontsService ¶
type WebfontsService struct {
// contains filtered or unexported fields
}
func NewWebfontsService ¶
func NewWebfontsService(s *Service) *WebfontsService
func (*WebfontsService) List ¶
func (r *WebfontsService) List() *WebfontsListCall
List: Retrieves the list of fonts currently served by the Google Fonts Developer API
Click to show internal directories.
Click to hide internal directories.