models

package
v0.0.0-...-a480b2e Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticsSnapshot

type AnalyticsSnapshot struct {

	// Top browsers, e.g. "Chrome"; sorted by (descending) click counts. Only present if this data is available.
	Browsers []*StringCount `json:"browsers"`

	// Top countries (expressed as country codes), e.g. "US" or "DE"; sorted by (descending) click counts. Only present if this data is available.
	Countries []*StringCount `json:"countries"`

	// Number of clicks on all goo.gl short URLs pointing to this long URL.
	LongURLClicks int64 `json:"longUrlClicks,omitempty"`

	// Top platforms or OSes, e.g. "Windows"; sorted by (descending) click counts. Only present if this data is available.
	Platforms []*StringCount `json:"platforms"`

	// Top referring hosts, e.g. "www.google.com"; sorted by (descending) click counts. Only present if this data is available.
	Referrers []*StringCount `json:"referrers"`

	// Number of clicks on this short URL.
	ShortURLClicks int64 `json:"shortUrlClicks,omitempty"`
}

AnalyticsSnapshot analytics snapshot swagger:model AnalyticsSnapshot

func (*AnalyticsSnapshot) Validate

func (m *AnalyticsSnapshot) Validate(formats strfmt.Registry) error

Validate validates this analytics snapshot

type AnalyticsSummary

type AnalyticsSummary struct {

	// Click analytics over all time.
	AllTime *AnalyticsSnapshot `json:"allTime,omitempty"`

	// Click analytics over the last day.
	Day *AnalyticsSnapshot `json:"day,omitempty"`

	// Click analytics over the last month.
	Month *AnalyticsSnapshot `json:"month,omitempty"`

	// Click analytics over the last two hours.
	TwoHours *AnalyticsSnapshot `json:"twoHours,omitempty"`

	// Click analytics over the last week.
	Week *AnalyticsSnapshot `json:"week,omitempty"`
}

AnalyticsSummary analytics summary swagger:model AnalyticsSummary

func (*AnalyticsSummary) Validate

func (m *AnalyticsSummary) Validate(formats strfmt.Registry) error

Validate validates this analytics summary

type StringCount

type StringCount struct {

	// Number of clicks for this top entry, e.g. for this particular country or browser.
	Count int64 `json:"count,omitempty"`

	// Label assigned to this top entry, e.g. "US" or "Chrome".
	ID string `json:"id,omitempty"`
}

StringCount string count swagger:model StringCount

func (*StringCount) Validate

func (m *StringCount) Validate(formats strfmt.Registry) error

Validate validates this string count

type URL

type URL struct {

	// A summary of the click analytics for the short and long URL. Might not be present if not requested or currently unavailable.
	Analytics *AnalyticsSummary `json:"analytics,omitempty"`

	// Time the short URL was created; ISO 8601 representation using the yyyy-MM-dd'T'HH:mm:ss.SSSZZ format, e.g. "2010-10-14T19:01:24.944+00:00".
	Created string `json:"created,omitempty"`

	// Short URL, e.g. "http://goo.gl/l6MS".
	ID string `json:"id,omitempty"`

	// The fixed string "urlshortener#url".
	Kind *string `json:"kind,omitempty"`

	// Long URL, e.g. "http://www.google.com/". Might not be present if the status is "REMOVED".
	LongURL string `json:"longUrl,omitempty"`

	// Status of the target URL. Possible values: "OK", "MALWARE", "PHISHING", or "REMOVED". A URL might be marked "REMOVED" if it was flagged as spam, for example.
	Status string `json:"status,omitempty"`
}

URL Url swagger:model Url

func (*URL) Validate

func (m *URL) Validate(formats strfmt.Registry) error

Validate validates this Url

type URLHistory

type URLHistory struct {

	// A list of URL resources.
	Items []*URL `json:"items"`

	// Number of items returned with each full "page" of results. Note that the last page could have fewer items than the "itemsPerPage" value.
	ItemsPerPage int32 `json:"itemsPerPage,omitempty"`

	// The fixed string "urlshortener#urlHistory".
	Kind *string `json:"kind,omitempty"`

	// A token to provide to get the next page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Total number of short URLs associated with this user (may be approximate).
	TotalItems int32 `json:"totalItems,omitempty"`
}

URLHistory Url history swagger:model UrlHistory

func (*URLHistory) Validate

func (m *URLHistory) Validate(formats strfmt.Registry) error

Validate validates this Url history

Jump to

Keyboard shortcuts

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