newsapi

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

AYLIEN News API

AYLIEN News API is the most powerful way of sourcing, searching and syndicating analyzed and enriched news content.

Sign up at https://newsapi.aylien.com/.

For more documentation see https://newsapi.aylien.com/docs/.

Bug Reports

If you've got a bug report, please contact us at support@aylien.com.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
}

func (*APIClient) CallAPI

func (c *APIClient) CallAPI(path string, method string,
	headerParams map[string]string,
	queryParams []QueryParams,
	formParams []FormParams) (*http.Response, error)

func (*APIClient) ParameterToString

func (c *APIClient) ParameterToString(obj interface{}) string

func (*APIClient) SelectHeaderAccept

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the api operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Author

type Author struct {

	// A unique identification for the author
	Id int64 `json:"id,omitempty"`

	// The extracted author full name
	Name string `json:"name,omitempty"`

	// A URL which points to the author avatar
	AvatarUrl string `json:"avatar_url,omitempty"`
}

type Autocomplete

type Autocomplete struct {

	// ID of the autocomplete
	Id string `json:"id,omitempty"`

	// Text of the autocomplete
	Text string `json:"text,omitempty"`
}

type Autocompletes

type Autocompletes struct {

	// An array of autocompletes
	Autocompletes []Autocomplete `json:"autocompletes,omitempty"`
}

type AutocompletesParams

type AutocompletesParams struct {
	Type     string
	Term     string
	Language string
	PerPage  int32
}

type Category

type Category struct {

	// The ID of the category
	Id string `json:"id,omitempty"`

	// The taxonomy of the category
	Taxonomy string `json:"taxonomy,omitempty"`

	// The level of the category
	Level int32 `json:"level,omitempty"`

	// The score of the category
	Score float64 `json:"score,omitempty"`

	// It defines whether the extracted category is confident or not
	Confident bool `json:"confident,omitempty"`

	// Related links for the category
	Links CategoryLinks `json:"links,omitempty"`
}
type CategoryLinks struct {

	// A URL pointing to the category
	Self string `json:"self,omitempty"`

	// A URL pointing to the parent category
	Parent string `json:"parent,omitempty"`
}

type Configuration

type Configuration struct {
	UserName     string            `json:"userName,omitempty"`
	Password     string            `json:"password,omitempty"`
	APIKeyPrefix map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey       map[string]string `json:"APIKey,omitempty"`

	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	Timeout       int               `json:"timeout,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     APIClient         `json:"APIClient,omitempty"`
	// contains filtered or unexported fields
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

func (*Configuration) GetAPIKeyWithPrefix

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() string

func (*Configuration) GetDebug

func (c *Configuration) GetDebug() bool

func (*Configuration) SetDebug

func (c *Configuration) SetDebug(enable bool)

type Coverages

type Coverages struct {

	// The input story title
	StoryTitle string `json:"story_title,omitempty"`

	// The input story body
	StoryBody string `json:"story_body,omitempty"`

	// The input story published date
	StoryPublishedAt time.Time `json:"story_published_at,omitempty"`

	// The input story language
	StoryLanguage string `json:"story_language,omitempty"`

	// An array of coverages for the input story
	Coverages []Story `json:"coverages,omitempty"`

	// An array of clusters
	Clusters []StoryCluster `json:"clusters,omitempty"`
}

type CoveragesParams

type CoveragesParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	PublishedAtStart               string
	PublishedAtEnd                 string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	Cluster                        string
	ClusterAlgorithm               string
	Return                         []string
	StoryId                        int64
	StoryUrl                       string
	StoryTitle                     string
	StoryBody                      string
	StoryPublishedAt               time.Time
	StoryLanguage                  string
	PerPage                        int32
}

type DefaultApi

type DefaultApi struct {
	Configuration Configuration
}

func NewDefaultApi

func NewDefaultApi() *DefaultApi

func NewDefaultApiWithBasePath

func NewDefaultApiWithBasePath(basePath string) *DefaultApi

func (DefaultApi) ListAutocompletes

func (a DefaultApi) ListAutocompletes(params *AutocompletesParams) (*Autocompletes, *APIResponse, error)

*

  • List autocompletes
  • This endpoint is used for getting list of autocompletes by providing a specific term and type. *
  • @param params This is an AutocompletesParams struct which accepts following parameters: ** @param Type This parameter is used for defining the type of autocompletes. ** @param Term This parameter is used for finding autocomplete objects that contain the specified value. ** @param Language This parameter is used for autocompletes whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. ** @param PerPage This parameter is used for specifying number of items in each page.
  • @return *Autocompletes

func (DefaultApi) ListCoverages

func (a DefaultApi) ListCoverages(params *CoveragesParams) (*Coverages, *APIResponse, error)

*

func (DefaultApi) ListHistograms

func (a DefaultApi) ListHistograms(params *HistogramsParams) (*Histograms, *APIResponse, error)

*

  • List histograms
  • This endpoint is used for getting histograms based on the `field` parameter passed to the API. *
  • @param params This is an HistogramsParams struct which accepts following parameters: ** @param Id This parameter is used for finding stories by story id. ** @param NotId This parameter is used for excluding stories by story id. ** @param Title This parameter is used for finding stories whose title contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). ** @param Body This parameter is used for finding stories whose body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). ** @param Text This parameter is used for finding stories whose title or body contains a specfic keyword. It supports [boolean operators](https://newsapi.aylien.com/docs/boolean-operators). ** @param Language This parameter is used for finding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. ** @param NotLanguage This parameter is used for excluding stories whose language is the specified value. It supports [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language codes. ** @param PublishedAtStart This parameter is used for finding stories whose published at time is greater than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). ** @param PublishedAtEnd This parameter is used for finding stories whose published at time is less than the specified value. [Here](https://newsapi.aylien.com/docs/working-with-dates) you can find more information about how [to work with dates](https://newsapi.aylien.com/docs/working-with-dates). ** @param CategoriesTaxonomy This parameter is used for defining the type of the taxonomy for the rest of the categories queries. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param CategoriesConfident This parameter is used for finding stories whose categories are confident. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param CategoriesId This parameter is used for finding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param NotCategoriesId This parameter is used for excluding stories by categories id. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param CategoriesLevel This parameter is used for finding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param NotCategoriesLevel This parameter is used for excluding stories by categories level. You can read more about working with categories [here](https://newsapi.aylien.com/docs/working-with-categories). ** @param EntitiesTitleText This parameter is used to find stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesTitleText This parameter is used to exclude stories based on the specified entities `text` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param EntitiesTitleType This parameter is used to find stories based on the specified entities `type` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesTitleType This parameter is used to exclude stories based on the specified entities `type` in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param EntitiesTitleLinksDbpedia This parameter is used to find stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesTitleLinksDbpedia This parameter is used to exclude stories based on the specified entities dbpedia URL in story titles. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param EntitiesBodyText This parameter is used to find stories based on the specified entities `text` in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesBodyText This parameter is used to exclude stories based on the specified entities `text` in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param EntitiesBodyType This parameter is used to find stories based on the specified entities `type` in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesBodyType This parameter is used to exclude stories based on the specified entities `type` in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param EntitiesBodyLinksDbpedia This parameter is used to find stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param NotEntitiesBodyLinksDbpedia This parameter is used to exclude stories based on the specified entities dbpedia URL in the body of stories. You can read more about working with entities [here](https://newsapi.aylien.com/docs/working-with-entities). ** @param SentimentTitlePolarity This parameter is used for finding stories whose title sentiment is the specified value. ** @param NotSentimentTitlePolarity This parameter is used for excluding stories whose title sentiment is the specified value. ** @param SentimentBodyPolarity This parameter is used for finding stories whose body sentiment is the specified value. ** @param NotSentimentBodyPolarity This parameter is used for excluding stories whose body sentiment is the specified value. ** @param MediaImagesCountMin This parameter is used for finding stories whose number of images is greater than or equal to the specified value. ** @param MediaImagesCountMax This parameter is used for finding stories whose number of images is less than or equal to the specified value. ** @param MediaImagesWidthMin This parameter is used for finding stories whose width of images are greater than or equal to the specified value. ** @param MediaImagesWidthMax This parameter is used for finding stories whose width of images are less than or equal to the specified value. ** @param MediaImagesHeightMin This parameter is used for finding stories whose height of images are greater than or equal to the specified value. ** @param MediaImagesHeightMax This parameter is used for finding stories whose height of images are less than or equal to the specified value. ** @param MediaImagesContentLengthMin This parameter is used for finding stories whose images content length are greater than or equal to the specified value. ** @param MediaImagesContentLengthMax This parameter is used for finding stories whose images content length are less than or equal to the specified value. ** @param MediaImagesFormat This parameter is used for finding stories whose images format are the specified value. ** @param NotMediaImagesFormat This parameter is used for excluding stories whose images format are the specified value. ** @param MediaVideosCountMin This parameter is used for finding stories whose number of videos is greater than or equal to the specified value. ** @param MediaVideosCountMax This parameter is used for finding stories whose number of videos is less than or equal to the specified value. ** @param AuthorId This parameter is used for finding stories whose author id is the specified value. ** @param NotAuthorId This parameter is used for excluding stories whose author id is the specified value. ** @param AuthorName This parameter is used for finding stories whose author full name contains the specified value. ** @param NotAuthorName This parameter is used for excluding stories whose author full name contains the specified value. ** @param SourceId This parameter is used for finding stories whose source id is the specified value. ** @param NotSourceId This parameter is used for excluding stories whose source id is the specified value. ** @param SourceName This parameter is used for finding stories whose source name contains the specified value. ** @param NotSourceName This parameter is used for excluding stories whose source name contains the specified value. ** @param SourceDomain This parameter is used for finding stories whose source domain is the specified value. ** @param NotSourceDomain This parameter is used for excluding stories whose source domain is the specified value. ** @param SourceLocationsCountry This parameter is used for finding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceLocationsCountry This parameter is used for excluding stories whose source country is the specified value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceLocationsState This parameter is used for finding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceLocationsState This parameter is used for excluding stories whose source state/province is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceLocationsCity This parameter is used for finding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceLocationsCity This parameter is used for excluding stories whose source city is the specified value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceScopesCountry This parameter is used for finding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceScopesCountry This parameter is used for excluding stories whose source scopes is the specified country value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceScopesState This parameter is used for finding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceScopesState This parameter is used for excluding stories whose source scopes is the specified state/province value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceScopesCity This parameter is used for finding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceScopesCity This parameter is used for excluding stories whose source scopes is the specified city value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceScopesLevel This parameter is used for finding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param NotSourceScopesLevel This parameter is used for excluding stories whose source scopes is the specified level value. [Here](https://newsapi.aylien.com/docs/working-with-locations) you can find more information about how [to work with locations](https://newsapi.aylien.com/docs/working-with-locations). ** @param SourceLinksInCountMin This parameter is used for finding stories from sources whose Links in count is greater than or equal to the specified value. You can read more about working with Links in count [here](https://newsapi.aylien.com/docs/working-with-links-in-count). ** @param SourceLinksInCountMax This parameter is used for finding stories from sources whose Links in count is less than or equal to the specified value. You can read more about working with Links in count [here](https://newsapi.aylien.com/docs/working-with-links-in-count). ** @param SourceRankingsAlexaRankMin This parameter is used for finding stories from sources whose Alexa rank is greater than or equal to the specified value. You can read more about working with Alexa ranks [here](https://newsapi.aylien.com/docs/working-with-alexa-ranks). ** @param SourceRankingsAlexaRankMax This parameter is used for finding stories from sources whose Alexa rank is less than or equal to the specified value. You can read more about working with Alexa ranks [here](https://newsapi.aylien.com/docs/working-with-alexa-ranks). ** @param SourceRankingsAlexaCountry This parameter is used for finding stories from sources whose Alexa rank is in the specified country value. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. You can read more about working with Alexa ranks [here](https://newsapi.aylien.com/docs/working-with-alexa-ranks). ** @param SocialSharesCountFacebookMin This parameter is used for finding stories whose Facebook social shares count is greater than or equal to the specified value. ** @param SocialSharesCountFacebookMax This parameter is used for finding stories whose Facebook social shares count is less than or equal to the specified value. ** @param SocialSharesCountGooglePlusMin This parameter is used for finding stories whose Google+ social shares count is greater than or equal to the specified value. ** @param SocialSharesCountGooglePlusMax This parameter is used for finding stories whose Google+ social shares count is less than or equal to the specified value. ** @param SocialSharesCountLinkedinMin This parameter is used for finding stories whose LinkedIn social shares count is greater than or equal to the specified value. ** @param SocialSharesCountLinkedinMax This parameter is used for finding stories whose LinkedIn social shares count is less than or equal to the specified value. ** @param SocialSharesCountRedditMin This parameter is used for finding stories whose Reddit social shares count is greater than or equal to the specified value. ** @param SocialSharesCountRedditMax This parameter is used for finding stories whose Reddit social shares count is less than or equal to the specified value. ** @param IntervalStart This parameter is used for setting the start data point of histogram intervals. ** @param IntervalEnd This parameter is used for setting the end data point of histogram intervals. ** @param IntervalWidth This parameter is used for setting the width of histogram intervals. ** @param Field This parameter is used for specifying the y-axis variable for the histogram.
  • @return *Histograms

func (DefaultApi) ListRelatedStories

func (a DefaultApi) ListRelatedStories(params *RelatedStoriesParams) (*RelatedStories, *APIResponse, error)

*

func (DefaultApi) ListStories

func (a DefaultApi) ListStories(params *StoriesParams) (*Stories, *APIResponse, error)

*

func (DefaultApi) ListTimeSeries

func (a DefaultApi) ListTimeSeries(params *TimeSeriesParams) (*TimeSeriesList, *APIResponse, error)

*

func (DefaultApi) ListTrends

func (a DefaultApi) ListTrends(params *TrendsParams) (*Trends, *APIResponse, error)

*

type Entities

type Entities struct {

	// An array of extracted entities from the story title
	Title []Entity `json:"title,omitempty"`

	// An array of extracted entities from the story body
	Body []Entity `json:"body,omitempty"`
}

type Entity

type Entity struct {

	// The entity text
	Text string `json:"text,omitempty"`

	// The entity score
	Score float64 `json:"score,omitempty"`

	// An array of the dbpedia types
	Types []string `json:"types,omitempty"`

	// Related links to the entity
	Links EntityLinks `json:"links,omitempty"`

	// The indices of the entity text
	Indices [][]int32 `json:"indices,omitempty"`
}
type EntityLinks struct {

	// A dbpedia resource URL
	Dbpedia string `json:"dbpedia,omitempty"`
}
type ErrorLinks struct {
	About string `json:"about,omitempty"`
}

type ErrorModel

type ErrorModel struct {
	Id string `json:"id,omitempty"`

	Links ErrorLinks `json:"links,omitempty"`

	Status string `json:"status,omitempty"`

	Code string `json:"code,omitempty"`

	Title string `json:"title,omitempty"`

	Detail string `json:"detail,omitempty"`
}

type Errors

type Errors struct {
	Errors []ErrorModel `json:"errors,omitempty"`
}

type FormParams

type FormParams struct {
	Item1 string
	Item2 string
}

type HistogramInterval

type HistogramInterval struct {

	// Histogram bin
	Bin int32 `json:"bin,omitempty"`

	// Histogram bin size
	Count int32 `json:"count,omitempty"`
}

type Histograms

type Histograms struct {

	// The intervals of the histograms
	Intervals []HistogramInterval `json:"intervals,omitempty"`

	// The start interval of the histogram
	IntervalStart int32 `json:"interval.start,omitempty"`

	// The end interval of the histogram
	IntervalEnd int32 `json:"interval.end,omitempty"`

	// The width of the histogram
	IntervalWidth int32 `json:"interval.width,omitempty"`

	Field string `json:"field,omitempty"`
}

type HistogramsParams

type HistogramsParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	PublishedAtStart               string
	PublishedAtEnd                 string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	IntervalStart                  int32
	IntervalEnd                    int32
	IntervalWidth                  int32
	Field                          string
}

type Location

type Location struct {

	// The country code of the location. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
	Country string `json:"country,omitempty"`

	// The state of the location
	State string `json:"state,omitempty"`

	// The city of the location
	City string `json:"city,omitempty"`
}

type Media

type Media struct {

	// The type of media
	Type_ string `json:"type,omitempty"`

	// A URL which points to the media file
	Url string `json:"url,omitempty"`

	// The format of media
	Format string `json:"format,omitempty"`

	// The content length of media
	ContentLength int32 `json:"content_length,omitempty"`

	// The width of media
	Width int32 `json:"width,omitempty"`

	// The height of media
	Height int32 `json:"height,omitempty"`
}

type QueryParams

type QueryParams struct {
	Item1 string
	Item2 string
}

type Rank added in v0.2.0

type Rank struct {

	// The rank
	Rank int32 `json:"rank,omitempty"`

	// The country code which the rank is in it
	Country string `json:"country,omitempty"`

	// The fetched date of the rank
	FetchedAt time.Time `json:"fetched_at,omitempty"`
}

type Rankings added in v0.2.0

type Rankings struct {
	Alexa []Rank `json:"alexa,omitempty"`
}
type RelatedStories struct {

	// The input story title
	StoryTitle string `json:"story_title,omitempty"`

	// The input story body
	StoryBody string `json:"story_body,omitempty"`

	// The input story language
	StoryLanguage string `json:"story_language,omitempty"`

	// An array of related stories for the input story
	RelatedStories []Story `json:"related_stories,omitempty"`

	// An array of clusters
	Clusters []StoryCluster `json:"clusters,omitempty"`
}

type RelatedStoriesParams

type RelatedStoriesParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	PublishedAtStart               string
	PublishedAtEnd                 string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	Cluster                        string
	ClusterAlgorithm               string
	Return                         []string
	StoryId                        int64
	StoryUrl                       string
	StoryTitle                     string
	StoryBody                      string
	BoostBy                        string
	StoryLanguage                  string
	PerPage                        int32
}

type Scope

type Scope struct {

	// The source scope by country code. It supports [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.
	Country string `json:"country,omitempty"`

	// The scope by state
	State string `json:"state,omitempty"`

	// The scope by city
	City string `json:"city,omitempty"`

	// The scope by level
	Level string `json:"level,omitempty"`
}

type Sentiment

type Sentiment struct {

	// Polarity of the sentiment
	Polarity string `json:"polarity,omitempty"`

	// Polarity score of the sentiment
	Score float64 `json:"score,omitempty"`
}

type Sentiments

type Sentiments struct {

	// The sentiment for the story title
	Title Sentiment `json:"title,omitempty"`

	// The sentiment for the story body
	Body Sentiment `json:"body,omitempty"`
}

type ShareCount

type ShareCount struct {

	// The number of shares
	Count int32 `json:"count,omitempty"`

	// The fetched date of the shares
	FetchedAt time.Time `json:"fetched_at,omitempty"`
}

type ShareCounts

type ShareCounts struct {

	// Facebook shares count
	Facebook []ShareCount `json:"facebook,omitempty"`

	// Google Plus shares count
	GooglePlus []ShareCount `json:"google_plus,omitempty"`

	// LinkedIn shares count
	Linkedin []ShareCount `json:"linkedin,omitempty"`

	// Reddit shares count
	Reddit []ShareCount `json:"reddit,omitempty"`
}

type Source

type Source struct {

	// The source id which is a unique value
	Id int32 `json:"id,omitempty"`

	// The source name
	Name string `json:"name,omitempty"`

	// The title of the home page URL
	Title string `json:"title,omitempty"`

	// A general explanation about the source
	Description string `json:"description,omitempty"`

	// The number of websites that link to the source
	LinksInCount int32 `json:"links_in_count,omitempty"`

	// The home page URL of the source
	HomePageUrl string `json:"home_page_url,omitempty"`

	// The domain name of the source which is extracted from the source URL
	Domain string `json:"domain,omitempty"`

	// A URL which points to the source logo
	LogoUrl string `json:"logo_url,omitempty"`

	// The source locations which are tend to be the physical locations of the source, e.g. BBC headquarter is located in London.
	Locations []Location `json:"locations,omitempty"`

	// The source scopes which is tend to be scope locations of the source, e.g. BBC scopes is international.
	Scopes []Scope `json:"scopes,omitempty"`

	// The web rankings of the source
	Rankings Rankings `json:"rankings,omitempty"`
}

type Stories

type Stories struct {

	// An array of stories
	Stories []Story `json:"stories,omitempty"`

	// An array of clusters
	Clusters []StoryCluster `json:"clusters,omitempty"`

	// The next page cursor
	NextPageCursor string `json:"next_page_cursor,omitempty"`
}

type StoriesParams

type StoriesParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	PublishedAtStart               string
	PublishedAtEnd                 string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	Cluster                        string
	ClusterAlgorithm               string
	Return                         []string
	SortBy                         string
	SortDirection                  string
	Cursor                         string
	PerPage                        int32
}

type Story

type Story struct {

	// ID of the story which is a unique identification
	Id int64 `json:"id,omitempty"`

	// Title of the story
	Title string `json:"title,omitempty"`

	// Body of the story
	Body string `json:"body,omitempty"`

	// The suggested story summary
	Summary Summary `json:"summary,omitempty"`

	// The story source
	Source Source `json:"source,omitempty"`

	// The story author
	Author Author `json:"author,omitempty"`

	// Extracted entities from the story title or body
	Entities Entities `json:"entities,omitempty"`

	// Extracted keywords mentioned in the story title or body
	Keywords []string `json:"keywords,omitempty"`

	// An array of suggested Story hashtags
	Hashtags []string `json:"hashtags,omitempty"`

	// Character count of the story body
	CharactersCount int32 `json:"characters_count,omitempty"`

	// Word count of the story body
	WordsCount int32 `json:"words_count,omitempty"`

	// Sentence count of the story body
	SentencesCount int32 `json:"sentences_count,omitempty"`

	// Paragraph count of the story body
	ParagraphsCount int32 `json:"paragraphs_count,omitempty"`

	// Suggested categories for the story
	Categories []Category `json:"categories,omitempty"`

	// Social shares count for the story
	SocialSharesCount ShareCounts `json:"social_shares_count,omitempty"`

	// An array of extracted media such as images and videos
	Media []Media `json:"media,omitempty"`

	// Suggested sentiments for the story title or body
	Sentiment Sentiments `json:"sentiment,omitempty"`

	// Language of the story
	Language string `json:"language,omitempty"`

	// Published date of the story
	PublishedAt time.Time `json:"published_at,omitempty"`

	// Links which is related to the story
	Links StoryLinks `json:"links,omitempty"`
}

type StoryCluster

type StoryCluster struct {

	// A unique identification for the cluster
	Id int32 `json:"id,omitempty"`

	// Suggested labels for the cluster
	Phrases []string `json:"phrases,omitempty"`

	// Size of the cluster
	Size int32 `json:"size,omitempty"`

	// Story ids which are in the cluster
	Stories []int64 `json:"stories,omitempty"`

	// The cluster score
	Score float64 `json:"score,omitempty"`
}
type StoryLinks struct {

	// The story permalink URL
	Permalink string `json:"permalink,omitempty"`

	// The related stories URL
	RelatedStories string `json:"related_stories,omitempty"`

	// The coverages URL
	Coverages string `json:"coverages,omitempty"`

	// The story canonical URL
	Canonical string `json:"canonical,omitempty"`
}

type Summary

type Summary struct {

	// An array of the suggested summary sentences
	Sentences []string `json:"sentences,omitempty"`
}

type TimeSeries

type TimeSeries struct {

	// The published date of the time series bin
	PublishedAt time.Time `json:"published_at,omitempty"`

	// The count of time series bin
	Count int32 `json:"count,omitempty"`
}

type TimeSeriesList

type TimeSeriesList struct {

	// An array of time series
	TimeSeries []TimeSeries `json:"time_series,omitempty"`

	// The size of each date range expressed as an interval to be added to the lower bound.
	Period string `json:"period,omitempty"`

	// The start published date of the time series
	PublishedAtStart time.Time `json:"published_at.start,omitempty"`

	// The end published date of the time series
	PublishedAtEnd time.Time `json:"published_at.end,omitempty"`
}

type TimeSeriesParams

type TimeSeriesParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	PublishedAtStart               string
	PublishedAtEnd                 string
	Period                         string
}

type Trend

type Trend struct {

	// The value of the trend
	Value string `json:"value,omitempty"`

	// The count of the trend
	Count int32 `json:"count,omitempty"`
}
type Trends struct {

	// An array of trends
	Trends []Trend `json:"trends,omitempty"`

	// The field of trends
	Field string `json:"field,omitempty"`
}

type TrendsParams

type TrendsParams struct {
	Id                             []int64
	NotId                          []int64
	Title                          string
	Body                           string
	Text                           string
	Language                       []string
	NotLanguage                    []string
	PublishedAtStart               string
	PublishedAtEnd                 string
	CategoriesTaxonomy             string
	CategoriesConfident            string
	CategoriesId                   []string
	NotCategoriesId                []string
	CategoriesLevel                []int32
	NotCategoriesLevel             []int32
	EntitiesTitleText              []string
	NotEntitiesTitleText           []string
	EntitiesTitleType              []string
	NotEntitiesTitleType           []string
	EntitiesTitleLinksDbpedia      []string
	NotEntitiesTitleLinksDbpedia   []string
	EntitiesBodyText               []string
	NotEntitiesBodyText            []string
	EntitiesBodyType               []string
	NotEntitiesBodyType            []string
	EntitiesBodyLinksDbpedia       []string
	NotEntitiesBodyLinksDbpedia    []string
	SentimentTitlePolarity         string
	NotSentimentTitlePolarity      string
	SentimentBodyPolarity          string
	NotSentimentBodyPolarity       string
	MediaImagesCountMin            string
	MediaImagesCountMax            string
	MediaImagesWidthMin            string
	MediaImagesWidthMax            string
	MediaImagesHeightMin           string
	MediaImagesHeightMax           string
	MediaImagesContentLengthMin    string
	MediaImagesContentLengthMax    string
	MediaImagesFormat              []string
	NotMediaImagesFormat           []string
	MediaVideosCountMin            string
	MediaVideosCountMax            string
	AuthorId                       []int32
	NotAuthorId                    []int32
	AuthorName                     string
	NotAuthorName                  string
	SourceId                       []int32
	NotSourceId                    []int32
	SourceName                     []string
	NotSourceName                  []string
	SourceDomain                   []string
	NotSourceDomain                []string
	SourceLocationsCountry         []string
	NotSourceLocationsCountry      []string
	SourceLocationsState           []string
	NotSourceLocationsState        []string
	SourceLocationsCity            []string
	NotSourceLocationsCity         []string
	SourceScopesCountry            []string
	NotSourceScopesCountry         []string
	SourceScopesState              []string
	NotSourceScopesState           []string
	SourceScopesCity               []string
	NotSourceScopesCity            []string
	SourceScopesLevel              []string
	NotSourceScopesLevel           []string
	SourceLinksInCountMin          int32
	SourceLinksInCountMax          int32
	SourceRankingsAlexaRankMin     int32
	SourceRankingsAlexaRankMax     int32
	SourceRankingsAlexaCountry     []string
	SocialSharesCountFacebookMin   string
	SocialSharesCountFacebookMax   string
	SocialSharesCountGooglePlusMin string
	SocialSharesCountGooglePlusMax string
	SocialSharesCountLinkedinMin   string
	SocialSharesCountLinkedinMax   string
	SocialSharesCountRedditMin     string
	SocialSharesCountRedditMax     string
	Field                          string
}

Jump to

Keyboard shortcuts

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