nyt

package
v0.0.0-...-eaceabd Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

Documentation

Overview

Package nyt is a generated protocol buffer package.

It is generated from these files:

mostpopular.proto
semanticconcept.proto

It has these top-level messages:

MostPopularResponse
MostPopularResult
SemanticConceptResponse
SemanticConceptResult
SemanticConceptArticleList
SemanticConceptArticle

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetMostPopular(string, string, uint) ([]*MostPopularResult, error)
	SemanticConceptSearch(string, string) ([]*SemanticConceptArticle, error)
}

func NewClient

func NewClient(mostPopToken, semanticToken string) Client

type ClientImpl

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

func (*ClientImpl) GetMostPopular

func (c *ClientImpl) GetMostPopular(resourceType string, section string, timePeriodDays uint) ([]*MostPopularResult, error)

func (*ClientImpl) SemanticConceptSearch

func (c *ClientImpl) SemanticConceptSearch(conceptType, concept string) ([]*SemanticConceptArticle, error)

type MostPopularResponse

type MostPopularResponse struct {
	Status     string               `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Copyright  string               `protobuf:"bytes,2,opt,name=copyright" json:"copyright,omitempty"`
	NumResults uint32               `protobuf:"varint,3,opt,name=num_results,json=numResults" json:"num_results,omitempty"`
	Results    []*MostPopularResult `protobuf:"bytes,4,rep,name=results" json:"results,omitempty"`
}

func (*MostPopularResponse) Descriptor

func (*MostPopularResponse) Descriptor() ([]byte, []int)

func (*MostPopularResponse) GetResults

func (m *MostPopularResponse) GetResults() []*MostPopularResult

func (*MostPopularResponse) ProtoMessage

func (*MostPopularResponse) ProtoMessage()

func (*MostPopularResponse) Reset

func (m *MostPopularResponse) Reset()

func (*MostPopularResponse) String

func (m *MostPopularResponse) String() string

type MostPopularResult

type MostPopularResult struct {
	Url           string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
	Id            uint64 `protobuf:"varint,2,opt,name=id" json:"id,omitempty"`
	AsssetId      uint64 `protobuf:"varint,3,opt,name=assset_id,json=asssetId" json:"assset_id,omitempty"`
	AdxKeywords   string `protobuf:"bytes,4,opt,name=adx_keywords,json=adxKeywords" json:"adx_keywords,omitempty"`
	Column        string `protobuf:"bytes,5,opt,name=column" json:"column,omitempty"`
	Section       string `protobuf:"bytes,6,opt,name=section" json:"section,omitempty"`
	Byline        string `protobuf:"bytes,7,opt,name=byline" json:"byline,omitempty"`
	Type          string `protobuf:"bytes,8,opt,name=type" json:"type,omitempty"`
	Title         string `protobuf:"bytes,9,opt,name=title" json:"title,omitempty"`
	Abstract      string `protobuf:"bytes,10,opt,name=abstract" json:"abstract,omitempty"`
	PublishedDate string `protobuf:"bytes,11,opt,name=published_date,json=publishedDate" json:"published_date,omitempty"`
	Source        string `protobuf:"bytes,12,opt,name=source" json:"source,omitempty"`
	Views         uint32 `protobuf:"varint,13,opt,name=views" json:"views,omitempty"`
}

func (*MostPopularResult) Descriptor

func (*MostPopularResult) Descriptor() ([]byte, []int)

func (*MostPopularResult) ProtoMessage

func (*MostPopularResult) ProtoMessage()

func (*MostPopularResult) Reset

func (m *MostPopularResult) Reset()

func (*MostPopularResult) String

func (m *MostPopularResult) String() string

type SemanticConceptArticle

type SemanticConceptArticle struct {
	Body   string `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"`
	Byline string `protobuf:"bytes,2,opt,name=byline" json:"byline,omitempty"`
	Title  string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"`
	Url    string `protobuf:"bytes,4,opt,name=url" json:"url,omitempty"`
}

func (*SemanticConceptArticle) Descriptor

func (*SemanticConceptArticle) Descriptor() ([]byte, []int)

func (*SemanticConceptArticle) ProtoMessage

func (*SemanticConceptArticle) ProtoMessage()

func (*SemanticConceptArticle) Reset

func (m *SemanticConceptArticle) Reset()

func (*SemanticConceptArticle) String

func (m *SemanticConceptArticle) String() string

type SemanticConceptArticleList

type SemanticConceptArticleList struct {
	Results []*SemanticConceptArticle `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
	Total   uint32                    `protobuf:"varint,2,opt,name=total" json:"total,omitempty"`
}

func (*SemanticConceptArticleList) Descriptor

func (*SemanticConceptArticleList) Descriptor() ([]byte, []int)

func (*SemanticConceptArticleList) GetResults

func (*SemanticConceptArticleList) ProtoMessage

func (*SemanticConceptArticleList) ProtoMessage()

func (*SemanticConceptArticleList) Reset

func (m *SemanticConceptArticleList) Reset()

func (*SemanticConceptArticleList) String

func (m *SemanticConceptArticleList) String() string

type SemanticConceptResponse

type SemanticConceptResponse struct {
	Status     string                   `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Copyright  string                   `protobuf:"bytes,2,opt,name=copyright" json:"copyright,omitempty"`
	NumResults uint32                   `protobuf:"varint,3,opt,name=num_results,json=numResults" json:"num_results,omitempty"`
	Results    []*SemanticConceptResult `protobuf:"bytes,4,rep,name=results" json:"results,omitempty"`
}

func (*SemanticConceptResponse) Descriptor

func (*SemanticConceptResponse) Descriptor() ([]byte, []int)

func (*SemanticConceptResponse) GetResults

func (*SemanticConceptResponse) ProtoMessage

func (*SemanticConceptResponse) ProtoMessage()

func (*SemanticConceptResponse) Reset

func (m *SemanticConceptResponse) Reset()

func (*SemanticConceptResponse) String

func (m *SemanticConceptResponse) String() string

type SemanticConceptResult

type SemanticConceptResult struct {
	ArticleList *SemanticConceptArticleList `protobuf:"bytes,1,opt,name=article_list,json=articleList" json:"article_list,omitempty"`
}

func (*SemanticConceptResult) Descriptor

func (*SemanticConceptResult) Descriptor() ([]byte, []int)

func (*SemanticConceptResult) GetArticleList

func (*SemanticConceptResult) ProtoMessage

func (*SemanticConceptResult) ProtoMessage()

func (*SemanticConceptResult) Reset

func (m *SemanticConceptResult) Reset()

func (*SemanticConceptResult) String

func (m *SemanticConceptResult) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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