webfonts

package
v0.0.0-...-c37129a Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2016 License: BSD-3-Clause Imports: 11 Imported by: 0

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

	Webfonts *WebfontsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

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 WebfontList struct {
	// Items: The list of fonts currently served by the Google Fonts API.
	Items []*Webfont `json:"items,omitempty"`

	// Kind: This kind represents a list of webfont objects in the webfonts
	// service.
	Kind string `json:"kind,omitempty"`
}

type WebfontsListCall

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

func (*WebfontsListCall) Do

func (c *WebfontsListCall) Do() (*WebfontList, error)

func (*WebfontsListCall) Fields

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

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

Jump to

Keyboard shortcuts

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