newscatcherapi

package module
v0.0.0-...-150be8f Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 23 Imported by: 0

README

Go API client for newscatcherapi

NewsCatcher is a data-as-a-service startup that has one main goal: to build the largest database of structured news articles published online. In other words, we're like Google for the news part of the web, which you can access as a source of data.

Some useful links:

Overview

This API client was generated by the Konfig.

  • API version: 1.0.1
  • Package version: 2.2.0

Installation

Add package to your project:

go get github.com/konfig-dev/newscatcher-sdks/go

Add the following in import:

import newscatcherapi "github.com/konfig-dev/newscatcher-sdks/go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

import newscatcherapi "github.com/konfig-dev/newscatcher-sdks/go"
configuration := newscatcherapi.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, newscatcherapi.ContextServerIndex, 1)
Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

import newscatcherapi "github.com/konfig-dev/newscatcher-sdks/go"
configuration := newscatcherapi.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, newscatcherapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

import newscatcherapi "github.com/konfig-dev/newscatcher-sdks/go"
configuration := newscatcherapi.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, newscatcherapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
configuration.Context = context.WithValue(configuration.Context, newscatcherapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.newscatcherapi.com/v2

Class Method HTTP request Description
LatestHeadlinesApi Get Get /latest_headlines Get Latest News Articles
LatestHeadlinesApi Post Post /latest_headlines Get Latest News Articles
SearchApi Get Get /search Search for specific news articles
SearchApi Post Post /search Search for specific news articles
SourcesApi Get Get /sources Get top news sources supported by NewsCatcher.
SourcesApi Post Post /sources Get top news sources supported by NewsCatcher.

Documentation For Models

Documentation For Authorization

api_key
  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: "api_key" and passed in as the auth context for each request.

Example

import newscatcherapi "github.com/konfig-dev/newscatcher-sdks/go"
apiKey := os.Getenv("API_KEY")
configuration := newscatcherapi.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, newscatcherapi.ContextAPIKeys, map[string]newscatcherapi.APIKey{
    "api_key": {Key: apiKey}
})
client := newscatcherapi.NewAPIClient(configuration)
resp, httpRes, err := client.Service.Operation(args).Execute()

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

team@newscatcherapi.com

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKeys takes a string apikey as authentication for the request
	ContextAPIKeys = contextKey("apiKeys")

	// ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request.
	ContextHttpSignatureAuth = contextKey("httpsignature")

	// ContextServerIndex uses a server configuration from the index.
	ContextServerIndex = contextKey("serverIndex")

	// ContextOperationServerIndices uses a server configuration from the index mapping.
	ContextOperationServerIndices = contextKey("serverOperationIndices")

	// ContextServerVariables overrides a server configuration variables.
	ContextServerVariables = contextKey("serverVariables")

	// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
	ContextOperationServerVariables = contextKey("serverOperationVariables")
)
View Source
var AllowedErrorStatusEnumValues = []ErrorStatus{
	"error",
	"No matches for your search.",
}

All allowed values of ErrorStatus enum

View Source
var AllowedLangEnumValues = []Lang{
	"af",
	"ar",
	"bg",
	"bn",
	"ca",
	"cn",
	"cs",
	"cy",
	"da",
	"de",
	"el",
	"en",
	"es",
	"et",
	"fa",
	"fi",
	"fr",
	"gu",
	"he",
	"hi",
	"hr",
	"hu",
	"id",
	"it",
	"ja",
	"kn",
	"ko",
	"lt",
	"lv",
	"mk",
	"ml",
	"mr",
	"ne",
	"nl",
	"false",
	"pa",
	"pl",
	"pt",
	"ro",
	"ru",
	"sk",
	"sl",
	"so",
	"sq",
	"sv",
	"sw",
	"ta",
	"te",
	"th",
	"tl",
	"tr",
	"tw",
	"uk",
	"ur",
	"vi",
}

All allowed values of Lang enum

View Source
var AllowedPublishDatePrecisionEnumValues = []PublishDatePrecision{
	"full",
	"timezone unknown",
	"date",
}

All allowed values of PublishDatePrecision enum

View Source
var AllowedSearchInEnumValues = []SearchIn{
	"title",
	"summary",
	"title_summary",
}

All allowed values of SearchIn enum

View Source
var AllowedSortByEnumValues = []SortBy{
	"relevancy",
	"date",
	"rank",
}

All allowed values of SortBy enum

View Source
var AllowedSuccessStatusEnumValues = []SuccessStatus{
	"ok",
	"No matches for your search.",
}

All allowed values of SuccessStatus enum

View Source
var AllowedTopicEnumValues = []Topic{
	"news",
	"sport",
	"tech",
	"world",
	"finance",
	"politics",
	"business",
	"economics",
	"entertainment",
	"beauty",
	"travel",
	"music",
	"food",
	"science",
	"gaming",
}

All allowed values of Topic enum

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func PtrBool

func PtrBool(v bool) *bool

PtrBool is a helper routine that returns a pointer to given boolean value.

func PtrFloat32

func PtrFloat32(v float32) *float32

PtrFloat32 is a helper routine that returns a pointer to given float value.

func PtrFloat64

func PtrFloat64(v float64) *float64

PtrFloat64 is a helper routine that returns a pointer to given float value.

func PtrInt

func PtrInt(v int) *int

PtrInt is a helper routine that returns a pointer to given integer value.

func PtrInt32

func PtrInt32(v int32) *int32

PtrInt32 is a helper routine that returns a pointer to given integer value.

func PtrInt64

func PtrInt64(v int64) *int64

PtrInt64 is a helper routine that returns a pointer to given integer value.

func PtrString

func PtrString(v string) *string

PtrString is a helper routine that returns a pointer to given string value.

func PtrTime

func PtrTime(v time.Time) *time.Time

PtrTime is helper routine that returns a pointer to given Time value.

Types

type APIClient

type APIClient struct {
	LatestHeadlinesApi *LatestHeadlinesApiService

	SearchApi *SearchApiService

	SourcesApi *SourcesApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the NewsCatcher News API V2 API v1.0.1 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI 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:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResponse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type ArticleInner

type ArticleInner struct {
	Title                  *string         `json:"title,omitempty"`
	Author                 *string         `json:"author,omitempty"`
	PublishedDate          *string         `json:"published_date,omitempty"`
	PublishedDatePrecision *string         `json:"published_date_precision,omitempty"`
	Link                   *string         `json:"link,omitempty"`
	CleanUrl               *string         `json:"clean_url,omitempty"`
	Excerpt                NullableString  `json:"excerpt,omitempty"`
	Summary                *string         `json:"summary,omitempty"`
	Rights                 NullableString  `json:"rights,omitempty"`
	Rank                   *int32          `json:"rank,omitempty"`
	Topic                  *string         `json:"topic,omitempty"`
	Country                *string         `json:"country,omitempty"`
	Language               NullableString  `json:"language,omitempty"`
	Authors                *string         `json:"authors,omitempty"`
	IsOpinion              *bool           `json:"is_opinion,omitempty"`
	TwitterAccount         NullableString  `json:"twitter_account,omitempty"`
	Score                  NullableFloat32 `json:"_score,omitempty"`
	Id                     *string         `json:"_id,omitempty"`
}

ArticleInner struct for ArticleInner

func NewArticleInner

func NewArticleInner() *ArticleInner

NewArticleInner instantiates a new ArticleInner object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewArticleInnerWithDefaults

func NewArticleInnerWithDefaults() *ArticleInner

NewArticleInnerWithDefaults instantiates a new ArticleInner object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*ArticleInner) GetAuthor

func (o *ArticleInner) GetAuthor() string

GetAuthor returns the Author field value if set, zero value otherwise.

func (*ArticleInner) GetAuthorOk

func (o *ArticleInner) GetAuthorOk() (*string, bool)

GetAuthorOk returns a tuple with the Author field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetAuthors

func (o *ArticleInner) GetAuthors() string

GetAuthors returns the Authors field value if set, zero value otherwise.

func (*ArticleInner) GetAuthorsOk

func (o *ArticleInner) GetAuthorsOk() (*string, bool)

GetAuthorsOk returns a tuple with the Authors field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetCleanUrl

func (o *ArticleInner) GetCleanUrl() string

GetCleanUrl returns the CleanUrl field value if set, zero value otherwise.

func (*ArticleInner) GetCleanUrlOk

func (o *ArticleInner) GetCleanUrlOk() (*string, bool)

GetCleanUrlOk returns a tuple with the CleanUrl field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetCountry

func (o *ArticleInner) GetCountry() string

GetCountry returns the Country field value if set, zero value otherwise.

func (*ArticleInner) GetCountryOk

func (o *ArticleInner) GetCountryOk() (*string, bool)

GetCountryOk returns a tuple with the Country field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetExcerpt

func (o *ArticleInner) GetExcerpt() string

GetExcerpt returns the Excerpt field value if set, zero value otherwise (both if not set or set to explicit null).

func (*ArticleInner) GetExcerptOk

func (o *ArticleInner) GetExcerptOk() (*string, bool)

GetExcerptOk returns a tuple with the Excerpt field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ArticleInner) GetId

func (o *ArticleInner) GetId() string

GetId returns the Id field value if set, zero value otherwise.

func (*ArticleInner) GetIdOk

func (o *ArticleInner) GetIdOk() (*string, bool)

GetIdOk returns a tuple with the Id field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetIsOpinion

func (o *ArticleInner) GetIsOpinion() bool

GetIsOpinion returns the IsOpinion field value if set, zero value otherwise.

func (*ArticleInner) GetIsOpinionOk

func (o *ArticleInner) GetIsOpinionOk() (*bool, bool)

GetIsOpinionOk returns a tuple with the IsOpinion field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetLanguage

func (o *ArticleInner) GetLanguage() string

GetLanguage returns the Language field value if set, zero value otherwise (both if not set or set to explicit null).

func (*ArticleInner) GetLanguageOk

func (o *ArticleInner) GetLanguageOk() (*string, bool)

GetLanguageOk returns a tuple with the Language field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (o *ArticleInner) GetLink() string

GetLink returns the Link field value if set, zero value otherwise.

func (*ArticleInner) GetLinkOk

func (o *ArticleInner) GetLinkOk() (*string, bool)

GetLinkOk returns a tuple with the Link field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetPublishedDate

func (o *ArticleInner) GetPublishedDate() string

GetPublishedDate returns the PublishedDate field value if set, zero value otherwise.

func (*ArticleInner) GetPublishedDateOk

func (o *ArticleInner) GetPublishedDateOk() (*string, bool)

GetPublishedDateOk returns a tuple with the PublishedDate field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetPublishedDatePrecision

func (o *ArticleInner) GetPublishedDatePrecision() string

GetPublishedDatePrecision returns the PublishedDatePrecision field value if set, zero value otherwise.

func (*ArticleInner) GetPublishedDatePrecisionOk

func (o *ArticleInner) GetPublishedDatePrecisionOk() (*string, bool)

GetPublishedDatePrecisionOk returns a tuple with the PublishedDatePrecision field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetRank

func (o *ArticleInner) GetRank() int32

GetRank returns the Rank field value if set, zero value otherwise.

func (*ArticleInner) GetRankOk

func (o *ArticleInner) GetRankOk() (*int32, bool)

GetRankOk returns a tuple with the Rank field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetRights

func (o *ArticleInner) GetRights() string

GetRights returns the Rights field value if set, zero value otherwise (both if not set or set to explicit null).

func (*ArticleInner) GetRightsOk

func (o *ArticleInner) GetRightsOk() (*string, bool)

GetRightsOk returns a tuple with the Rights field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ArticleInner) GetScore

func (o *ArticleInner) GetScore() float32

GetScore returns the Score field value if set, zero value otherwise (both if not set or set to explicit null).

func (*ArticleInner) GetScoreOk

func (o *ArticleInner) GetScoreOk() (*float32, bool)

GetScoreOk returns a tuple with the Score field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ArticleInner) GetSummary

func (o *ArticleInner) GetSummary() string

GetSummary returns the Summary field value if set, zero value otherwise.

func (*ArticleInner) GetSummaryOk

func (o *ArticleInner) GetSummaryOk() (*string, bool)

GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetTitle

func (o *ArticleInner) GetTitle() string

GetTitle returns the Title field value if set, zero value otherwise.

func (*ArticleInner) GetTitleOk

func (o *ArticleInner) GetTitleOk() (*string, bool)

GetTitleOk returns a tuple with the Title field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetTopic

func (o *ArticleInner) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise.

func (*ArticleInner) GetTopicOk

func (o *ArticleInner) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ArticleInner) GetTwitterAccount

func (o *ArticleInner) GetTwitterAccount() string

GetTwitterAccount returns the TwitterAccount field value if set, zero value otherwise (both if not set or set to explicit null).

func (*ArticleInner) GetTwitterAccountOk

func (o *ArticleInner) GetTwitterAccountOk() (*string, bool)

GetTwitterAccountOk returns a tuple with the TwitterAccount field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*ArticleInner) HasAuthor

func (o *ArticleInner) HasAuthor() bool

HasAuthor returns a boolean if a field has been set.

func (*ArticleInner) HasAuthors

func (o *ArticleInner) HasAuthors() bool

HasAuthors returns a boolean if a field has been set.

func (*ArticleInner) HasCleanUrl

func (o *ArticleInner) HasCleanUrl() bool

HasCleanUrl returns a boolean if a field has been set.

func (*ArticleInner) HasCountry

func (o *ArticleInner) HasCountry() bool

HasCountry returns a boolean if a field has been set.

func (*ArticleInner) HasExcerpt

func (o *ArticleInner) HasExcerpt() bool

HasExcerpt returns a boolean if a field has been set.

func (*ArticleInner) HasId

func (o *ArticleInner) HasId() bool

HasId returns a boolean if a field has been set.

func (*ArticleInner) HasIsOpinion

func (o *ArticleInner) HasIsOpinion() bool

HasIsOpinion returns a boolean if a field has been set.

func (*ArticleInner) HasLanguage

func (o *ArticleInner) HasLanguage() bool

HasLanguage returns a boolean if a field has been set.

func (o *ArticleInner) HasLink() bool

HasLink returns a boolean if a field has been set.

func (*ArticleInner) HasPublishedDate

func (o *ArticleInner) HasPublishedDate() bool

HasPublishedDate returns a boolean if a field has been set.

func (*ArticleInner) HasPublishedDatePrecision

func (o *ArticleInner) HasPublishedDatePrecision() bool

HasPublishedDatePrecision returns a boolean if a field has been set.

func (*ArticleInner) HasRank

func (o *ArticleInner) HasRank() bool

HasRank returns a boolean if a field has been set.

func (*ArticleInner) HasRights

func (o *ArticleInner) HasRights() bool

HasRights returns a boolean if a field has been set.

func (*ArticleInner) HasScore

func (o *ArticleInner) HasScore() bool

HasScore returns a boolean if a field has been set.

func (*ArticleInner) HasSummary

func (o *ArticleInner) HasSummary() bool

HasSummary returns a boolean if a field has been set.

func (*ArticleInner) HasTitle

func (o *ArticleInner) HasTitle() bool

HasTitle returns a boolean if a field has been set.

func (*ArticleInner) HasTopic

func (o *ArticleInner) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (*ArticleInner) HasTwitterAccount

func (o *ArticleInner) HasTwitterAccount() bool

HasTwitterAccount returns a boolean if a field has been set.

func (ArticleInner) MarshalJSON

func (o ArticleInner) MarshalJSON() ([]byte, error)

func (*ArticleInner) SetAuthor

func (o *ArticleInner) SetAuthor(v string)

SetAuthor gets a reference to the given string and assigns it to the Author field.

func (*ArticleInner) SetAuthors

func (o *ArticleInner) SetAuthors(v string)

SetAuthors gets a reference to the given string and assigns it to the Authors field.

func (*ArticleInner) SetCleanUrl

func (o *ArticleInner) SetCleanUrl(v string)

SetCleanUrl gets a reference to the given string and assigns it to the CleanUrl field.

func (*ArticleInner) SetCountry

func (o *ArticleInner) SetCountry(v string)

SetCountry gets a reference to the given string and assigns it to the Country field.

func (*ArticleInner) SetExcerpt

func (o *ArticleInner) SetExcerpt(v string)

SetExcerpt gets a reference to the given NullableString and assigns it to the Excerpt field.

func (*ArticleInner) SetExcerptNil

func (o *ArticleInner) SetExcerptNil()

SetExcerptNil sets the value for Excerpt to be an explicit nil

func (*ArticleInner) SetId

func (o *ArticleInner) SetId(v string)

SetId gets a reference to the given string and assigns it to the Id field.

func (*ArticleInner) SetIsOpinion

func (o *ArticleInner) SetIsOpinion(v bool)

SetIsOpinion gets a reference to the given bool and assigns it to the IsOpinion field.

func (*ArticleInner) SetLanguage

func (o *ArticleInner) SetLanguage(v string)

SetLanguage gets a reference to the given NullableString and assigns it to the Language field.

func (*ArticleInner) SetLanguageNil

func (o *ArticleInner) SetLanguageNil()

SetLanguageNil sets the value for Language to be an explicit nil

func (o *ArticleInner) SetLink(v string)

SetLink gets a reference to the given string and assigns it to the Link field.

func (*ArticleInner) SetPublishedDate

func (o *ArticleInner) SetPublishedDate(v string)

SetPublishedDate gets a reference to the given string and assigns it to the PublishedDate field.

func (*ArticleInner) SetPublishedDatePrecision

func (o *ArticleInner) SetPublishedDatePrecision(v string)

SetPublishedDatePrecision gets a reference to the given string and assigns it to the PublishedDatePrecision field.

func (*ArticleInner) SetRank

func (o *ArticleInner) SetRank(v int32)

SetRank gets a reference to the given int32 and assigns it to the Rank field.

func (*ArticleInner) SetRights

func (o *ArticleInner) SetRights(v string)

SetRights gets a reference to the given NullableString and assigns it to the Rights field.

func (*ArticleInner) SetRightsNil

func (o *ArticleInner) SetRightsNil()

SetRightsNil sets the value for Rights to be an explicit nil

func (*ArticleInner) SetScore

func (o *ArticleInner) SetScore(v float32)

SetScore gets a reference to the given NullableFloat32 and assigns it to the Score field.

func (*ArticleInner) SetScoreNil

func (o *ArticleInner) SetScoreNil()

SetScoreNil sets the value for Score to be an explicit nil

func (*ArticleInner) SetSummary

func (o *ArticleInner) SetSummary(v string)

SetSummary gets a reference to the given string and assigns it to the Summary field.

func (*ArticleInner) SetTitle

func (o *ArticleInner) SetTitle(v string)

SetTitle gets a reference to the given string and assigns it to the Title field.

func (*ArticleInner) SetTopic

func (o *ArticleInner) SetTopic(v string)

SetTopic gets a reference to the given string and assigns it to the Topic field.

func (*ArticleInner) SetTwitterAccount

func (o *ArticleInner) SetTwitterAccount(v string)

SetTwitterAccount gets a reference to the given NullableString and assigns it to the TwitterAccount field.

func (*ArticleInner) SetTwitterAccountNil

func (o *ArticleInner) SetTwitterAccountNil()

SetTwitterAccountNil sets the value for TwitterAccount to be an explicit nil

func (*ArticleInner) UnsetExcerpt

func (o *ArticleInner) UnsetExcerpt()

UnsetExcerpt ensures that no value is present for Excerpt, not even an explicit nil

func (*ArticleInner) UnsetLanguage

func (o *ArticleInner) UnsetLanguage()

UnsetLanguage ensures that no value is present for Language, not even an explicit nil

func (*ArticleInner) UnsetRights

func (o *ArticleInner) UnsetRights()

UnsetRights ensures that no value is present for Rights, not even an explicit nil

func (*ArticleInner) UnsetScore

func (o *ArticleInner) UnsetScore()

UnsetScore ensures that no value is present for Score, not even an explicit nil

func (*ArticleInner) UnsetTwitterAccount

func (o *ArticleInner) UnsetTwitterAccount()

UnsetTwitterAccount ensures that no value is present for TwitterAccount, not even an explicit nil

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	Host             string            `json:"host,omitempty"`
	Scheme           string            `json:"scheme,omitempty"`
	DefaultHeader    map[string]string `json:"defaultHeader,omitempty"`
	UserAgent        string            `json:"userAgent,omitempty"`
	Debug            bool              `json:"debug,omitempty"`
	Servers          ServerConfigurations
	OperationServers map[string]ServerConfigurations
	HTTPClient       *http.Client
	Context          context.Context
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

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

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerURL

func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error)

ServerURL returns URL based on server settings

func (*Configuration) ServerURLWithContext

func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error)

ServerURLWithContext returns a new server URL given an endpoint

func (*Configuration) SetOAuthClientCredentials

func (c *Configuration) SetOAuthClientCredentials(clientId string, clientSecret string)

Setup OAuth Client Credentials Flow for all requests

type ErrorResponse

type ErrorResponse struct {
	Status    *ErrorStatus `json:"status,omitempty"`
	ErrorCode *string      `json:"error_code,omitempty"`
	Message   *string      `json:"message,omitempty"`
}

ErrorResponse struct for ErrorResponse

func NewErrorResponse

func NewErrorResponse() *ErrorResponse

NewErrorResponse instantiates a new ErrorResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewErrorResponseWithDefaults

func NewErrorResponseWithDefaults() *ErrorResponse

NewErrorResponseWithDefaults instantiates a new ErrorResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*ErrorResponse) GetErrorCode

func (o *ErrorResponse) GetErrorCode() string

GetErrorCode returns the ErrorCode field value if set, zero value otherwise.

func (*ErrorResponse) GetErrorCodeOk

func (o *ErrorResponse) GetErrorCodeOk() (*string, bool)

GetErrorCodeOk returns a tuple with the ErrorCode field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ErrorResponse) GetMessage

func (o *ErrorResponse) GetMessage() string

GetMessage returns the Message field value if set, zero value otherwise.

func (*ErrorResponse) GetMessageOk

func (o *ErrorResponse) GetMessageOk() (*string, bool)

GetMessageOk returns a tuple with the Message field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ErrorResponse) GetStatus

func (o *ErrorResponse) GetStatus() ErrorStatus

GetStatus returns the Status field value if set, zero value otherwise.

func (*ErrorResponse) GetStatusOk

func (o *ErrorResponse) GetStatusOk() (*ErrorStatus, bool)

GetStatusOk returns a tuple with the Status field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ErrorResponse) HasErrorCode

func (o *ErrorResponse) HasErrorCode() bool

HasErrorCode returns a boolean if a field has been set.

func (*ErrorResponse) HasMessage

func (o *ErrorResponse) HasMessage() bool

HasMessage returns a boolean if a field has been set.

func (*ErrorResponse) HasStatus

func (o *ErrorResponse) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (ErrorResponse) MarshalJSON

func (o ErrorResponse) MarshalJSON() ([]byte, error)

func (*ErrorResponse) SetErrorCode

func (o *ErrorResponse) SetErrorCode(v string)

SetErrorCode gets a reference to the given string and assigns it to the ErrorCode field.

func (*ErrorResponse) SetMessage

func (o *ErrorResponse) SetMessage(v string)

SetMessage gets a reference to the given string and assigns it to the Message field.

func (*ErrorResponse) SetStatus

func (o *ErrorResponse) SetStatus(v ErrorStatus)

SetStatus gets a reference to the given ErrorStatus and assigns it to the Status field.

type ErrorStatus

type ErrorStatus string

ErrorStatus the model 'ErrorStatus'

const (
	ERRORSTATUS_ERROR                      ErrorStatus = "error"
	ERRORSTATUS_NO_MATCHES_FOR_YOUR_SEARCH ErrorStatus = "No matches for your search."
)

List of error_status

func NewErrorStatusFromValue

func NewErrorStatusFromValue(v string) (*ErrorStatus, error)

NewErrorStatusFromValue returns a pointer to a valid ErrorStatus for the value passed as argument, or an error if the value passed is not allowed by the enum

func (ErrorStatus) IsValid

func (v ErrorStatus) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (ErrorStatus) Ptr

func (v ErrorStatus) Ptr() *ErrorStatus

Ptr returns reference to error_status value

func (*ErrorStatus) UnmarshalJSON

func (v *ErrorStatus) UnmarshalJSON(src []byte) error

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type Lang

type Lang string

Lang the model 'Lang'

const (
	LANG_AF    Lang = "af"
	LANG_AR    Lang = "ar"
	LANG_BG    Lang = "bg"
	LANG_BN    Lang = "bn"
	LANG_CA    Lang = "ca"
	LANG_CN    Lang = "cn"
	LANG_CS    Lang = "cs"
	LANG_CY    Lang = "cy"
	LANG_DA    Lang = "da"
	LANG_DE    Lang = "de"
	LANG_EL    Lang = "el"
	LANG_EN    Lang = "en"
	LANG_ES    Lang = "es"
	LANG_ET    Lang = "et"
	LANG_FA    Lang = "fa"
	LANG_FI    Lang = "fi"
	LANG_FR    Lang = "fr"
	LANG_GU    Lang = "gu"
	LANG_HE    Lang = "he"
	LANG_HI    Lang = "hi"
	LANG_HR    Lang = "hr"
	LANG_HU    Lang = "hu"
	LANG_ID    Lang = "id"
	LANG_IT    Lang = "it"
	LANG_JA    Lang = "ja"
	LANG_KN    Lang = "kn"
	LANG_KO    Lang = "ko"
	LANG_LT    Lang = "lt"
	LANG_LV    Lang = "lv"
	LANG_MK    Lang = "mk"
	LANG_ML    Lang = "ml"
	LANG_MR    Lang = "mr"
	LANG_NE    Lang = "ne"
	LANG_NL    Lang = "nl"
	LANG_FALSE Lang = "false"
	LANG_PA    Lang = "pa"
	LANG_PL    Lang = "pl"
	LANG_PT    Lang = "pt"
	LANG_RO    Lang = "ro"
	LANG_RU    Lang = "ru"
	LANG_SK    Lang = "sk"
	LANG_SL    Lang = "sl"
	LANG_SO    Lang = "so"
	LANG_SQ    Lang = "sq"
	LANG_SV    Lang = "sv"
	LANG_SW    Lang = "sw"
	LANG_TA    Lang = "ta"
	LANG_TE    Lang = "te"
	LANG_TH    Lang = "th"
	LANG_TL    Lang = "tl"
	LANG_TR    Lang = "tr"
	LANG_TW    Lang = "tw"
	LANG_UK    Lang = "uk"
	LANG_UR    Lang = "ur"
	LANG_VI    Lang = "vi"
)

List of lang

func NewLangFromValue

func NewLangFromValue(v string) (*Lang, error)

NewLangFromValue returns a pointer to a valid Lang for the value passed as argument, or an error if the value passed is not allowed by the enum

func (Lang) IsValid

func (v Lang) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (Lang) Ptr

func (v Lang) Ptr() *Lang

Ptr returns reference to lang value

func (*Lang) UnmarshalJSON

func (v *Lang) UnmarshalJSON(src []byte) error

type LatestHeadlines

type LatestHeadlines struct {
	// The time period you want to get the headlines for. Accpeted format: - `7d` -> Daily form, last 7 days time period - `6h` -> Hourly form, last six hours
	When *string `json:"when,omitempty"`
	// The language you want to search in.
	Lang         *string `json:"lang,omitempty"`
	Countries    *string `json:"countries,omitempty"`
	NotCountries *string `json:"not_countries,omitempty"`
	Topic        *string `json:"topic,omitempty"`
	Sources      *string `json:"sources,omitempty"`
	NotSources   *string `json:"not_sources,omitempty"`
	RankedOnly   *bool   `json:"ranked_only,omitempty"`
	PageSize     *int32  `json:"page_size,omitempty"`
	Page         *int32  `json:"page,omitempty"`
}

LatestHeadlines struct for LatestHeadlines

func NewLatestHeadlines

func NewLatestHeadlines() *LatestHeadlines

NewLatestHeadlines instantiates a new LatestHeadlines object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewLatestHeadlinesWithDefaults

func NewLatestHeadlinesWithDefaults() *LatestHeadlines

NewLatestHeadlinesWithDefaults instantiates a new LatestHeadlines object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*LatestHeadlines) GetCountries

func (o *LatestHeadlines) GetCountries() string

GetCountries returns the Countries field value if set, zero value otherwise.

func (*LatestHeadlines) GetCountriesOk

func (o *LatestHeadlines) GetCountriesOk() (*string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetLang

func (o *LatestHeadlines) GetLang() string

GetLang returns the Lang field value if set, zero value otherwise.

func (*LatestHeadlines) GetLangOk

func (o *LatestHeadlines) GetLangOk() (*string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetNotCountries

func (o *LatestHeadlines) GetNotCountries() string

GetNotCountries returns the NotCountries field value if set, zero value otherwise.

func (*LatestHeadlines) GetNotCountriesOk

func (o *LatestHeadlines) GetNotCountriesOk() (*string, bool)

GetNotCountriesOk returns a tuple with the NotCountries field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetNotSources

func (o *LatestHeadlines) GetNotSources() string

GetNotSources returns the NotSources field value if set, zero value otherwise.

func (*LatestHeadlines) GetNotSourcesOk

func (o *LatestHeadlines) GetNotSourcesOk() (*string, bool)

GetNotSourcesOk returns a tuple with the NotSources field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetPage

func (o *LatestHeadlines) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*LatestHeadlines) GetPageOk

func (o *LatestHeadlines) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetPageSize

func (o *LatestHeadlines) GetPageSize() int32

GetPageSize returns the PageSize field value if set, zero value otherwise.

func (*LatestHeadlines) GetPageSizeOk

func (o *LatestHeadlines) GetPageSizeOk() (*int32, bool)

GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetRankedOnly

func (o *LatestHeadlines) GetRankedOnly() bool

GetRankedOnly returns the RankedOnly field value if set, zero value otherwise.

func (*LatestHeadlines) GetRankedOnlyOk

func (o *LatestHeadlines) GetRankedOnlyOk() (*bool, bool)

GetRankedOnlyOk returns a tuple with the RankedOnly field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetSources

func (o *LatestHeadlines) GetSources() string

GetSources returns the Sources field value if set, zero value otherwise.

func (*LatestHeadlines) GetSourcesOk

func (o *LatestHeadlines) GetSourcesOk() (*string, bool)

GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetTopic

func (o *LatestHeadlines) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise.

func (*LatestHeadlines) GetTopicOk

func (o *LatestHeadlines) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) GetWhen

func (o *LatestHeadlines) GetWhen() string

GetWhen returns the When field value if set, zero value otherwise.

func (*LatestHeadlines) GetWhenOk

func (o *LatestHeadlines) GetWhenOk() (*string, bool)

GetWhenOk returns a tuple with the When field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlines) HasCountries

func (o *LatestHeadlines) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*LatestHeadlines) HasLang

func (o *LatestHeadlines) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*LatestHeadlines) HasNotCountries

func (o *LatestHeadlines) HasNotCountries() bool

HasNotCountries returns a boolean if a field has been set.

func (*LatestHeadlines) HasNotSources

func (o *LatestHeadlines) HasNotSources() bool

HasNotSources returns a boolean if a field has been set.

func (*LatestHeadlines) HasPage

func (o *LatestHeadlines) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*LatestHeadlines) HasPageSize

func (o *LatestHeadlines) HasPageSize() bool

HasPageSize returns a boolean if a field has been set.

func (*LatestHeadlines) HasRankedOnly

func (o *LatestHeadlines) HasRankedOnly() bool

HasRankedOnly returns a boolean if a field has been set.

func (*LatestHeadlines) HasSources

func (o *LatestHeadlines) HasSources() bool

HasSources returns a boolean if a field has been set.

func (*LatestHeadlines) HasTopic

func (o *LatestHeadlines) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (*LatestHeadlines) HasWhen

func (o *LatestHeadlines) HasWhen() bool

HasWhen returns a boolean if a field has been set.

func (LatestHeadlines) MarshalJSON

func (o LatestHeadlines) MarshalJSON() ([]byte, error)

func (*LatestHeadlines) SetCountries

func (o *LatestHeadlines) SetCountries(v string)

SetCountries gets a reference to the given string and assigns it to the Countries field.

func (*LatestHeadlines) SetLang

func (o *LatestHeadlines) SetLang(v string)

SetLang gets a reference to the given string and assigns it to the Lang field.

func (*LatestHeadlines) SetNotCountries

func (o *LatestHeadlines) SetNotCountries(v string)

SetNotCountries gets a reference to the given string and assigns it to the NotCountries field.

func (*LatestHeadlines) SetNotSources

func (o *LatestHeadlines) SetNotSources(v string)

SetNotSources gets a reference to the given string and assigns it to the NotSources field.

func (*LatestHeadlines) SetPage

func (o *LatestHeadlines) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*LatestHeadlines) SetPageSize

func (o *LatestHeadlines) SetPageSize(v int32)

SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.

func (*LatestHeadlines) SetRankedOnly

func (o *LatestHeadlines) SetRankedOnly(v bool)

SetRankedOnly gets a reference to the given bool and assigns it to the RankedOnly field.

func (*LatestHeadlines) SetSources

func (o *LatestHeadlines) SetSources(v string)

SetSources gets a reference to the given string and assigns it to the Sources field.

func (*LatestHeadlines) SetTopic

func (o *LatestHeadlines) SetTopic(v string)

SetTopic gets a reference to the given string and assigns it to the Topic field.

func (*LatestHeadlines) SetWhen

func (o *LatestHeadlines) SetWhen(v string)

SetWhen gets a reference to the given string and assigns it to the When field.

type LatestHeadlinesApiGetRequest

type LatestHeadlinesApiGetRequest struct {
	ApiService *LatestHeadlinesApiService
	// contains filtered or unexported fields
}

func (LatestHeadlinesApiGetRequest) Countries

Countries where the news publisher is located. **Important**: This parameter is not responsible for the countries mentioned in the news article. One or multiple countries can be used in the search. The only acceptable format is [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) For example, `US,CA,MX` or just `US`

func (LatestHeadlinesApiGetRequest) Execute

func (LatestHeadlinesApiGetRequest) Lang

Specifies the languages of the search. For example: `en`. The only accepted format is [ISO 639-1 — 2](https://en.wikipedia.org/wiki/ISO_639-1) letter code.

func (LatestHeadlinesApiGetRequest) NotCountries

The inverse of the `countries` parameter.

func (LatestHeadlinesApiGetRequest) NotLang

Inverse to the `lang` parameter

func (LatestHeadlinesApiGetRequest) NotSources

One or more sources to be excluded from the search. Comma-separated list. For example: `nytimes.com,cnn.com,wsj.com`

func (LatestHeadlinesApiGetRequest) Page

The number of the page. Use it to scroll through the results. This parameter is used to paginate: scroll through results because one API response cannot return more than 100 articles.

func (LatestHeadlinesApiGetRequest) PageSize

`[1:100]` How many articles to return per page.

func (LatestHeadlinesApiGetRequest) RankedOnly

Default: `True` Limit the search only for the sources which are in the top 1 million online websites. Unranked sources are assigned a rank that equals `999999`

func (LatestHeadlinesApiGetRequest) Sources

One or more news resources to filter your search. It should be the normal form of the URL, For example: `nytimes.com,theguardian.com`

func (LatestHeadlinesApiGetRequest) Topic

Accepted values: `news`, `sport`, `tech`, `world`, `finance`, `politics`, `business`, `economics`, `entertainment`, `beauty`, `travel`, `music`, `food`, `science`, `gaming` The topic to which you want to restrict the articles of your choice. Not all news articles are assigned with a topic, therefore, we cannot guarantee that 100% of topics talking about technology will be assigned a tech label.

type LatestHeadlinesApiPostRequest

type LatestHeadlinesApiPostRequest struct {
	ApiService *LatestHeadlinesApiService
	// contains filtered or unexported fields
}

func (LatestHeadlinesApiPostRequest) Execute

func (LatestHeadlinesApiPostRequest) LatestHeadlines

type LatestHeadlinesApiService

type LatestHeadlinesApiService service

LatestHeadlinesApiService LatestHeadlinesApi service

func (*LatestHeadlinesApiService) Get

Get Get Latest News Articles

Get the latest headlines given any topic, country, or language.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return LatestHeadlinesApiGetRequest

func (*LatestHeadlinesApiService) GetExecute

Execute executes the request

@return Model200ResponseLatest

func (*LatestHeadlinesApiService) Post

Post Get Latest News Articles

Get the latest headlines given any topic, country, or language.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return LatestHeadlinesApiPostRequest

func (*LatestHeadlinesApiService) PostExecute

Execute executes the request

@return Model200ResponseLatest

type LatestHeadlinesUserInput

type LatestHeadlinesUserInput struct {
	Lang         []string       `json:"lang,omitempty"`
	NotLang      []string       `json:"not_lang,omitempty"`
	Countries    []string       `json:"countries,omitempty"`
	NotCountries []string       `json:"not_countries,omitempty"`
	Page         *int32         `json:"page,omitempty"`
	Size         *int32         `json:"size,omitempty"`
	Sources      []string       `json:"sources,omitempty"`
	NotSources   []string       `json:"not_sources,omitempty"`
	Topic        NullableString `json:"topic,omitempty"`
}

LatestHeadlinesUserInput struct for LatestHeadlinesUserInput

func NewLatestHeadlinesUserInput

func NewLatestHeadlinesUserInput() *LatestHeadlinesUserInput

NewLatestHeadlinesUserInput instantiates a new LatestHeadlinesUserInput object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewLatestHeadlinesUserInputWithDefaults

func NewLatestHeadlinesUserInputWithDefaults() *LatestHeadlinesUserInput

NewLatestHeadlinesUserInputWithDefaults instantiates a new LatestHeadlinesUserInput object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*LatestHeadlinesUserInput) GetCountries

func (o *LatestHeadlinesUserInput) GetCountries() []string

GetCountries returns the Countries field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetCountriesOk

func (o *LatestHeadlinesUserInput) GetCountriesOk() ([]string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetLang

func (o *LatestHeadlinesUserInput) GetLang() []string

GetLang returns the Lang field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetLangOk

func (o *LatestHeadlinesUserInput) GetLangOk() ([]string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetNotCountries

func (o *LatestHeadlinesUserInput) GetNotCountries() []string

GetNotCountries returns the NotCountries field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetNotCountriesOk

func (o *LatestHeadlinesUserInput) GetNotCountriesOk() ([]string, bool)

GetNotCountriesOk returns a tuple with the NotCountries field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetNotLang

func (o *LatestHeadlinesUserInput) GetNotLang() []string

GetNotLang returns the NotLang field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetNotLangOk

func (o *LatestHeadlinesUserInput) GetNotLangOk() ([]string, bool)

GetNotLangOk returns a tuple with the NotLang field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetNotSources

func (o *LatestHeadlinesUserInput) GetNotSources() []string

GetNotSources returns the NotSources field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetNotSourcesOk

func (o *LatestHeadlinesUserInput) GetNotSourcesOk() ([]string, bool)

GetNotSourcesOk returns a tuple with the NotSources field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetPage

func (o *LatestHeadlinesUserInput) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*LatestHeadlinesUserInput) GetPageOk

func (o *LatestHeadlinesUserInput) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlinesUserInput) GetSize

func (o *LatestHeadlinesUserInput) GetSize() int32

GetSize returns the Size field value if set, zero value otherwise.

func (*LatestHeadlinesUserInput) GetSizeOk

func (o *LatestHeadlinesUserInput) GetSizeOk() (*int32, bool)

GetSizeOk returns a tuple with the Size field value if set, nil otherwise and a boolean to check if the value has been set.

func (*LatestHeadlinesUserInput) GetSources

func (o *LatestHeadlinesUserInput) GetSources() []string

GetSources returns the Sources field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetSourcesOk

func (o *LatestHeadlinesUserInput) GetSourcesOk() ([]string, bool)

GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) GetTopic

func (o *LatestHeadlinesUserInput) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise (both if not set or set to explicit null).

func (*LatestHeadlinesUserInput) GetTopicOk

func (o *LatestHeadlinesUserInput) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*LatestHeadlinesUserInput) HasCountries

func (o *LatestHeadlinesUserInput) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasLang

func (o *LatestHeadlinesUserInput) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasNotCountries

func (o *LatestHeadlinesUserInput) HasNotCountries() bool

HasNotCountries returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasNotLang

func (o *LatestHeadlinesUserInput) HasNotLang() bool

HasNotLang returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasNotSources

func (o *LatestHeadlinesUserInput) HasNotSources() bool

HasNotSources returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasPage

func (o *LatestHeadlinesUserInput) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasSize

func (o *LatestHeadlinesUserInput) HasSize() bool

HasSize returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasSources

func (o *LatestHeadlinesUserInput) HasSources() bool

HasSources returns a boolean if a field has been set.

func (*LatestHeadlinesUserInput) HasTopic

func (o *LatestHeadlinesUserInput) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (LatestHeadlinesUserInput) MarshalJSON

func (o LatestHeadlinesUserInput) MarshalJSON() ([]byte, error)

func (*LatestHeadlinesUserInput) SetCountries

func (o *LatestHeadlinesUserInput) SetCountries(v []string)

SetCountries gets a reference to the given []string and assigns it to the Countries field.

func (*LatestHeadlinesUserInput) SetLang

func (o *LatestHeadlinesUserInput) SetLang(v []string)

SetLang gets a reference to the given []string and assigns it to the Lang field.

func (*LatestHeadlinesUserInput) SetNotCountries

func (o *LatestHeadlinesUserInput) SetNotCountries(v []string)

SetNotCountries gets a reference to the given []string and assigns it to the NotCountries field.

func (*LatestHeadlinesUserInput) SetNotLang

func (o *LatestHeadlinesUserInput) SetNotLang(v []string)

SetNotLang gets a reference to the given []string and assigns it to the NotLang field.

func (*LatestHeadlinesUserInput) SetNotSources

func (o *LatestHeadlinesUserInput) SetNotSources(v []string)

SetNotSources gets a reference to the given []string and assigns it to the NotSources field.

func (*LatestHeadlinesUserInput) SetPage

func (o *LatestHeadlinesUserInput) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*LatestHeadlinesUserInput) SetSize

func (o *LatestHeadlinesUserInput) SetSize(v int32)

SetSize gets a reference to the given int32 and assigns it to the Size field.

func (*LatestHeadlinesUserInput) SetSources

func (o *LatestHeadlinesUserInput) SetSources(v []string)

SetSources gets a reference to the given []string and assigns it to the Sources field.

func (*LatestHeadlinesUserInput) SetTopic

func (o *LatestHeadlinesUserInput) SetTopic(v string)

SetTopic gets a reference to the given NullableString and assigns it to the Topic field.

func (*LatestHeadlinesUserInput) SetTopicNil

func (o *LatestHeadlinesUserInput) SetTopicNil()

SetTopicNil sets the value for Topic to be an explicit nil

func (*LatestHeadlinesUserInput) UnsetTopic

func (o *LatestHeadlinesUserInput) UnsetTopic()

UnsetTopic ensures that no value is present for Topic, not even an explicit nil

type Model200Response

type Model200Response struct {
	Status     *SuccessStatus   `json:"status,omitempty"`
	TotalHits  *int32           `json:"total_hits,omitempty"`
	Page       *int32           `json:"page,omitempty"`
	TotalPages *int32           `json:"total_pages,omitempty"`
	PageSize   *int32           `json:"page_size,omitempty"`
	Articles   []ArticleInner   `json:"articles,omitempty"`
	UserInput  *SearchUserInput `json:"user_input,omitempty"`
}

Model200Response struct for Model200Response

func NewModel200Response

func NewModel200Response() *Model200Response

NewModel200Response instantiates a new Model200Response object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewModel200ResponseWithDefaults

func NewModel200ResponseWithDefaults() *Model200Response

NewModel200ResponseWithDefaults instantiates a new Model200Response object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Model200Response) GetArticles

func (o *Model200Response) GetArticles() []ArticleInner

GetArticles returns the Articles field value if set, zero value otherwise.

func (*Model200Response) GetArticlesOk

func (o *Model200Response) GetArticlesOk() ([]ArticleInner, bool)

GetArticlesOk returns a tuple with the Articles field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetPage

func (o *Model200Response) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*Model200Response) GetPageOk

func (o *Model200Response) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetPageSize

func (o *Model200Response) GetPageSize() int32

GetPageSize returns the PageSize field value if set, zero value otherwise.

func (*Model200Response) GetPageSizeOk

func (o *Model200Response) GetPageSizeOk() (*int32, bool)

GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetStatus

func (o *Model200Response) GetStatus() SuccessStatus

GetStatus returns the Status field value if set, zero value otherwise.

func (*Model200Response) GetStatusOk

func (o *Model200Response) GetStatusOk() (*SuccessStatus, bool)

GetStatusOk returns a tuple with the Status field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetTotalHits

func (o *Model200Response) GetTotalHits() int32

GetTotalHits returns the TotalHits field value if set, zero value otherwise.

func (*Model200Response) GetTotalHitsOk

func (o *Model200Response) GetTotalHitsOk() (*int32, bool)

GetTotalHitsOk returns a tuple with the TotalHits field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetTotalPages

func (o *Model200Response) GetTotalPages() int32

GetTotalPages returns the TotalPages field value if set, zero value otherwise.

func (*Model200Response) GetTotalPagesOk

func (o *Model200Response) GetTotalPagesOk() (*int32, bool)

GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) GetUserInput

func (o *Model200Response) GetUserInput() SearchUserInput

GetUserInput returns the UserInput field value if set, zero value otherwise.

func (*Model200Response) GetUserInputOk

func (o *Model200Response) GetUserInputOk() (*SearchUserInput, bool)

GetUserInputOk returns a tuple with the UserInput field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200Response) HasArticles

func (o *Model200Response) HasArticles() bool

HasArticles returns a boolean if a field has been set.

func (*Model200Response) HasPage

func (o *Model200Response) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*Model200Response) HasPageSize

func (o *Model200Response) HasPageSize() bool

HasPageSize returns a boolean if a field has been set.

func (*Model200Response) HasStatus

func (o *Model200Response) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (*Model200Response) HasTotalHits

func (o *Model200Response) HasTotalHits() bool

HasTotalHits returns a boolean if a field has been set.

func (*Model200Response) HasTotalPages

func (o *Model200Response) HasTotalPages() bool

HasTotalPages returns a boolean if a field has been set.

func (*Model200Response) HasUserInput

func (o *Model200Response) HasUserInput() bool

HasUserInput returns a boolean if a field has been set.

func (Model200Response) MarshalJSON

func (o Model200Response) MarshalJSON() ([]byte, error)

func (*Model200Response) SetArticles

func (o *Model200Response) SetArticles(v []ArticleInner)

SetArticles gets a reference to the given []ArticleInner and assigns it to the Articles field.

func (*Model200Response) SetPage

func (o *Model200Response) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*Model200Response) SetPageSize

func (o *Model200Response) SetPageSize(v int32)

SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.

func (*Model200Response) SetStatus

func (o *Model200Response) SetStatus(v SuccessStatus)

SetStatus gets a reference to the given SuccessStatus and assigns it to the Status field.

func (*Model200Response) SetTotalHits

func (o *Model200Response) SetTotalHits(v int32)

SetTotalHits gets a reference to the given int32 and assigns it to the TotalHits field.

func (*Model200Response) SetTotalPages

func (o *Model200Response) SetTotalPages(v int32)

SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field.

func (*Model200Response) SetUserInput

func (o *Model200Response) SetUserInput(v SearchUserInput)

SetUserInput gets a reference to the given SearchUserInput and assigns it to the UserInput field.

type Model200ResponseLatest

type Model200ResponseLatest struct {
	Status     *SuccessStatus            `json:"status,omitempty"`
	TotalHits  *int32                    `json:"total_hits,omitempty"`
	Page       *int32                    `json:"page,omitempty"`
	TotalPages *int32                    `json:"total_pages,omitempty"`
	PageSize   *int32                    `json:"page_size,omitempty"`
	Articles   []ArticleInner            `json:"articles,omitempty"`
	UserInput  *LatestHeadlinesUserInput `json:"user_input,omitempty"`
}

Model200ResponseLatest struct for Model200ResponseLatest

func NewModel200ResponseLatest

func NewModel200ResponseLatest() *Model200ResponseLatest

NewModel200ResponseLatest instantiates a new Model200ResponseLatest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewModel200ResponseLatestWithDefaults

func NewModel200ResponseLatestWithDefaults() *Model200ResponseLatest

NewModel200ResponseLatestWithDefaults instantiates a new Model200ResponseLatest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Model200ResponseLatest) GetArticles

func (o *Model200ResponseLatest) GetArticles() []ArticleInner

GetArticles returns the Articles field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetArticlesOk

func (o *Model200ResponseLatest) GetArticlesOk() ([]ArticleInner, bool)

GetArticlesOk returns a tuple with the Articles field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetPage

func (o *Model200ResponseLatest) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetPageOk

func (o *Model200ResponseLatest) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetPageSize

func (o *Model200ResponseLatest) GetPageSize() int32

GetPageSize returns the PageSize field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetPageSizeOk

func (o *Model200ResponseLatest) GetPageSizeOk() (*int32, bool)

GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetStatus

func (o *Model200ResponseLatest) GetStatus() SuccessStatus

GetStatus returns the Status field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetStatusOk

func (o *Model200ResponseLatest) GetStatusOk() (*SuccessStatus, bool)

GetStatusOk returns a tuple with the Status field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetTotalHits

func (o *Model200ResponseLatest) GetTotalHits() int32

GetTotalHits returns the TotalHits field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetTotalHitsOk

func (o *Model200ResponseLatest) GetTotalHitsOk() (*int32, bool)

GetTotalHitsOk returns a tuple with the TotalHits field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetTotalPages

func (o *Model200ResponseLatest) GetTotalPages() int32

GetTotalPages returns the TotalPages field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetTotalPagesOk

func (o *Model200ResponseLatest) GetTotalPagesOk() (*int32, bool)

GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) GetUserInput

GetUserInput returns the UserInput field value if set, zero value otherwise.

func (*Model200ResponseLatest) GetUserInputOk

func (o *Model200ResponseLatest) GetUserInputOk() (*LatestHeadlinesUserInput, bool)

GetUserInputOk returns a tuple with the UserInput field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseLatest) HasArticles

func (o *Model200ResponseLatest) HasArticles() bool

HasArticles returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasPage

func (o *Model200ResponseLatest) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasPageSize

func (o *Model200ResponseLatest) HasPageSize() bool

HasPageSize returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasStatus

func (o *Model200ResponseLatest) HasStatus() bool

HasStatus returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasTotalHits

func (o *Model200ResponseLatest) HasTotalHits() bool

HasTotalHits returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasTotalPages

func (o *Model200ResponseLatest) HasTotalPages() bool

HasTotalPages returns a boolean if a field has been set.

func (*Model200ResponseLatest) HasUserInput

func (o *Model200ResponseLatest) HasUserInput() bool

HasUserInput returns a boolean if a field has been set.

func (Model200ResponseLatest) MarshalJSON

func (o Model200ResponseLatest) MarshalJSON() ([]byte, error)

func (*Model200ResponseLatest) SetArticles

func (o *Model200ResponseLatest) SetArticles(v []ArticleInner)

SetArticles gets a reference to the given []ArticleInner and assigns it to the Articles field.

func (*Model200ResponseLatest) SetPage

func (o *Model200ResponseLatest) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*Model200ResponseLatest) SetPageSize

func (o *Model200ResponseLatest) SetPageSize(v int32)

SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.

func (*Model200ResponseLatest) SetStatus

func (o *Model200ResponseLatest) SetStatus(v SuccessStatus)

SetStatus gets a reference to the given SuccessStatus and assigns it to the Status field.

func (*Model200ResponseLatest) SetTotalHits

func (o *Model200ResponseLatest) SetTotalHits(v int32)

SetTotalHits gets a reference to the given int32 and assigns it to the TotalHits field.

func (*Model200ResponseLatest) SetTotalPages

func (o *Model200ResponseLatest) SetTotalPages(v int32)

SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field.

func (*Model200ResponseLatest) SetUserInput

SetUserInput gets a reference to the given LatestHeadlinesUserInput and assigns it to the UserInput field.

type Model200ResponseSources

type Model200ResponseSources struct {
	Message   *string           `json:"message,omitempty"`
	Sources   []string          `json:"sources,omitempty"`
	UserInput *SourcesUserInput `json:"user_input,omitempty"`
}

Model200ResponseSources struct for Model200ResponseSources

func NewModel200ResponseSources

func NewModel200ResponseSources() *Model200ResponseSources

NewModel200ResponseSources instantiates a new Model200ResponseSources object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewModel200ResponseSourcesWithDefaults

func NewModel200ResponseSourcesWithDefaults() *Model200ResponseSources

NewModel200ResponseSourcesWithDefaults instantiates a new Model200ResponseSources object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Model200ResponseSources) GetMessage

func (o *Model200ResponseSources) GetMessage() string

GetMessage returns the Message field value if set, zero value otherwise.

func (*Model200ResponseSources) GetMessageOk

func (o *Model200ResponseSources) GetMessageOk() (*string, bool)

GetMessageOk returns a tuple with the Message field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseSources) GetSources

func (o *Model200ResponseSources) GetSources() []string

GetSources returns the Sources field value if set, zero value otherwise (both if not set or set to explicit null).

func (*Model200ResponseSources) GetSourcesOk

func (o *Model200ResponseSources) GetSourcesOk() ([]string, bool)

GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*Model200ResponseSources) GetUserInput

func (o *Model200ResponseSources) GetUserInput() SourcesUserInput

GetUserInput returns the UserInput field value if set, zero value otherwise.

func (*Model200ResponseSources) GetUserInputOk

func (o *Model200ResponseSources) GetUserInputOk() (*SourcesUserInput, bool)

GetUserInputOk returns a tuple with the UserInput field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Model200ResponseSources) HasMessage

func (o *Model200ResponseSources) HasMessage() bool

HasMessage returns a boolean if a field has been set.

func (*Model200ResponseSources) HasSources

func (o *Model200ResponseSources) HasSources() bool

HasSources returns a boolean if a field has been set.

func (*Model200ResponseSources) HasUserInput

func (o *Model200ResponseSources) HasUserInput() bool

HasUserInput returns a boolean if a field has been set.

func (Model200ResponseSources) MarshalJSON

func (o Model200ResponseSources) MarshalJSON() ([]byte, error)

func (*Model200ResponseSources) SetMessage

func (o *Model200ResponseSources) SetMessage(v string)

SetMessage gets a reference to the given string and assigns it to the Message field.

func (*Model200ResponseSources) SetSources

func (o *Model200ResponseSources) SetSources(v []string)

SetSources gets a reference to the given []string and assigns it to the Sources field.

func (*Model200ResponseSources) SetUserInput

func (o *Model200ResponseSources) SetUserInput(v SourcesUserInput)

SetUserInput gets a reference to the given SourcesUserInput and assigns it to the UserInput field.

type NullableArticleInner

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

func NewNullableArticleInner

func NewNullableArticleInner(val *ArticleInner) *NullableArticleInner

func (NullableArticleInner) Get

func (NullableArticleInner) IsSet

func (v NullableArticleInner) IsSet() bool

func (NullableArticleInner) MarshalJSON

func (v NullableArticleInner) MarshalJSON() ([]byte, error)

func (*NullableArticleInner) Set

func (v *NullableArticleInner) Set(val *ArticleInner)

func (*NullableArticleInner) UnmarshalJSON

func (v *NullableArticleInner) UnmarshalJSON(src []byte) error

func (*NullableArticleInner) Unset

func (v *NullableArticleInner) Unset()

type NullableBool

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

func NewNullableBool

func NewNullableBool(val *bool) *NullableBool

func (NullableBool) Get

func (v NullableBool) Get() *bool

func (NullableBool) IsSet

func (v NullableBool) IsSet() bool

func (NullableBool) MarshalJSON

func (v NullableBool) MarshalJSON() ([]byte, error)

func (*NullableBool) Set

func (v *NullableBool) Set(val *bool)

func (*NullableBool) UnmarshalJSON

func (v *NullableBool) UnmarshalJSON(src []byte) error

func (*NullableBool) Unset

func (v *NullableBool) Unset()

type NullableErrorResponse

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

func NewNullableErrorResponse

func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse

func (NullableErrorResponse) Get

func (NullableErrorResponse) IsSet

func (v NullableErrorResponse) IsSet() bool

func (NullableErrorResponse) MarshalJSON

func (v NullableErrorResponse) MarshalJSON() ([]byte, error)

func (*NullableErrorResponse) Set

func (v *NullableErrorResponse) Set(val *ErrorResponse)

func (*NullableErrorResponse) UnmarshalJSON

func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error

func (*NullableErrorResponse) Unset

func (v *NullableErrorResponse) Unset()

type NullableErrorStatus

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

func NewNullableErrorStatus

func NewNullableErrorStatus(val *ErrorStatus) *NullableErrorStatus

func (NullableErrorStatus) Get

func (NullableErrorStatus) IsSet

func (v NullableErrorStatus) IsSet() bool

func (NullableErrorStatus) MarshalJSON

func (v NullableErrorStatus) MarshalJSON() ([]byte, error)

func (*NullableErrorStatus) Set

func (v *NullableErrorStatus) Set(val *ErrorStatus)

func (*NullableErrorStatus) UnmarshalJSON

func (v *NullableErrorStatus) UnmarshalJSON(src []byte) error

func (*NullableErrorStatus) Unset

func (v *NullableErrorStatus) Unset()

type NullableFloat32

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

func NewNullableFloat32

func NewNullableFloat32(val *float32) *NullableFloat32

func (NullableFloat32) Get

func (v NullableFloat32) Get() *float32

func (NullableFloat32) IsSet

func (v NullableFloat32) IsSet() bool

func (NullableFloat32) MarshalJSON

func (v NullableFloat32) MarshalJSON() ([]byte, error)

func (*NullableFloat32) Set

func (v *NullableFloat32) Set(val *float32)

func (*NullableFloat32) UnmarshalJSON

func (v *NullableFloat32) UnmarshalJSON(src []byte) error

func (*NullableFloat32) Unset

func (v *NullableFloat32) Unset()

type NullableFloat64

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

func NewNullableFloat64

func NewNullableFloat64(val *float64) *NullableFloat64

func (NullableFloat64) Get

func (v NullableFloat64) Get() *float64

func (NullableFloat64) IsSet

func (v NullableFloat64) IsSet() bool

func (NullableFloat64) MarshalJSON

func (v NullableFloat64) MarshalJSON() ([]byte, error)

func (*NullableFloat64) Set

func (v *NullableFloat64) Set(val *float64)

func (*NullableFloat64) UnmarshalJSON

func (v *NullableFloat64) UnmarshalJSON(src []byte) error

func (*NullableFloat64) Unset

func (v *NullableFloat64) Unset()

type NullableInt

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

func NewNullableInt

func NewNullableInt(val *int) *NullableInt

func (NullableInt) Get

func (v NullableInt) Get() *int

func (NullableInt) IsSet

func (v NullableInt) IsSet() bool

func (NullableInt) MarshalJSON

func (v NullableInt) MarshalJSON() ([]byte, error)

func (*NullableInt) Set

func (v *NullableInt) Set(val *int)

func (*NullableInt) UnmarshalJSON

func (v *NullableInt) UnmarshalJSON(src []byte) error

func (*NullableInt) Unset

func (v *NullableInt) Unset()

type NullableInt32

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

func NewNullableInt32

func NewNullableInt32(val *int32) *NullableInt32

func (NullableInt32) Get

func (v NullableInt32) Get() *int32

func (NullableInt32) IsSet

func (v NullableInt32) IsSet() bool

func (NullableInt32) MarshalJSON

func (v NullableInt32) MarshalJSON() ([]byte, error)

func (*NullableInt32) Set

func (v *NullableInt32) Set(val *int32)

func (*NullableInt32) UnmarshalJSON

func (v *NullableInt32) UnmarshalJSON(src []byte) error

func (*NullableInt32) Unset

func (v *NullableInt32) Unset()

type NullableInt64

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

func NewNullableInt64

func NewNullableInt64(val *int64) *NullableInt64

func (NullableInt64) Get

func (v NullableInt64) Get() *int64

func (NullableInt64) IsSet

func (v NullableInt64) IsSet() bool

func (NullableInt64) MarshalJSON

func (v NullableInt64) MarshalJSON() ([]byte, error)

func (*NullableInt64) Set

func (v *NullableInt64) Set(val *int64)

func (*NullableInt64) UnmarshalJSON

func (v *NullableInt64) UnmarshalJSON(src []byte) error

func (*NullableInt64) Unset

func (v *NullableInt64) Unset()

type NullableLang

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

func NewNullableLang

func NewNullableLang(val *Lang) *NullableLang

func (NullableLang) Get

func (v NullableLang) Get() *Lang

func (NullableLang) IsSet

func (v NullableLang) IsSet() bool

func (NullableLang) MarshalJSON

func (v NullableLang) MarshalJSON() ([]byte, error)

func (*NullableLang) Set

func (v *NullableLang) Set(val *Lang)

func (*NullableLang) UnmarshalJSON

func (v *NullableLang) UnmarshalJSON(src []byte) error

func (*NullableLang) Unset

func (v *NullableLang) Unset()

type NullableLatestHeadlines

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

func NewNullableLatestHeadlines

func NewNullableLatestHeadlines(val *LatestHeadlines) *NullableLatestHeadlines

func (NullableLatestHeadlines) Get

func (NullableLatestHeadlines) IsSet

func (v NullableLatestHeadlines) IsSet() bool

func (NullableLatestHeadlines) MarshalJSON

func (v NullableLatestHeadlines) MarshalJSON() ([]byte, error)

func (*NullableLatestHeadlines) Set

func (*NullableLatestHeadlines) UnmarshalJSON

func (v *NullableLatestHeadlines) UnmarshalJSON(src []byte) error

func (*NullableLatestHeadlines) Unset

func (v *NullableLatestHeadlines) Unset()

type NullableLatestHeadlinesUserInput

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

func (NullableLatestHeadlinesUserInput) Get

func (NullableLatestHeadlinesUserInput) IsSet

func (NullableLatestHeadlinesUserInput) MarshalJSON

func (v NullableLatestHeadlinesUserInput) MarshalJSON() ([]byte, error)

func (*NullableLatestHeadlinesUserInput) Set

func (*NullableLatestHeadlinesUserInput) UnmarshalJSON

func (v *NullableLatestHeadlinesUserInput) UnmarshalJSON(src []byte) error

func (*NullableLatestHeadlinesUserInput) Unset

type NullableModel200Response

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

func NewNullableModel200Response

func NewNullableModel200Response(val *Model200Response) *NullableModel200Response

func (NullableModel200Response) Get

func (NullableModel200Response) IsSet

func (v NullableModel200Response) IsSet() bool

func (NullableModel200Response) MarshalJSON

func (v NullableModel200Response) MarshalJSON() ([]byte, error)

func (*NullableModel200Response) Set

func (*NullableModel200Response) UnmarshalJSON

func (v *NullableModel200Response) UnmarshalJSON(src []byte) error

func (*NullableModel200Response) Unset

func (v *NullableModel200Response) Unset()

type NullableModel200ResponseLatest

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

func (NullableModel200ResponseLatest) Get

func (NullableModel200ResponseLatest) IsSet

func (NullableModel200ResponseLatest) MarshalJSON

func (v NullableModel200ResponseLatest) MarshalJSON() ([]byte, error)

func (*NullableModel200ResponseLatest) Set

func (*NullableModel200ResponseLatest) UnmarshalJSON

func (v *NullableModel200ResponseLatest) UnmarshalJSON(src []byte) error

func (*NullableModel200ResponseLatest) Unset

func (v *NullableModel200ResponseLatest) Unset()

type NullableModel200ResponseSources

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

func (NullableModel200ResponseSources) Get

func (NullableModel200ResponseSources) IsSet

func (NullableModel200ResponseSources) MarshalJSON

func (v NullableModel200ResponseSources) MarshalJSON() ([]byte, error)

func (*NullableModel200ResponseSources) Set

func (*NullableModel200ResponseSources) UnmarshalJSON

func (v *NullableModel200ResponseSources) UnmarshalJSON(src []byte) error

func (*NullableModel200ResponseSources) Unset

type NullablePublishDatePrecision

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

func NewNullablePublishDatePrecision

func NewNullablePublishDatePrecision(val *PublishDatePrecision) *NullablePublishDatePrecision

func (NullablePublishDatePrecision) Get

func (NullablePublishDatePrecision) IsSet

func (NullablePublishDatePrecision) MarshalJSON

func (v NullablePublishDatePrecision) MarshalJSON() ([]byte, error)

func (*NullablePublishDatePrecision) Set

func (*NullablePublishDatePrecision) UnmarshalJSON

func (v *NullablePublishDatePrecision) UnmarshalJSON(src []byte) error

func (*NullablePublishDatePrecision) Unset

func (v *NullablePublishDatePrecision) Unset()

type NullableSearch

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

func NewNullableSearch

func NewNullableSearch(val *Search) *NullableSearch

func (NullableSearch) Get

func (v NullableSearch) Get() *Search

func (NullableSearch) IsSet

func (v NullableSearch) IsSet() bool

func (NullableSearch) MarshalJSON

func (v NullableSearch) MarshalJSON() ([]byte, error)

func (*NullableSearch) Set

func (v *NullableSearch) Set(val *Search)

func (*NullableSearch) UnmarshalJSON

func (v *NullableSearch) UnmarshalJSON(src []byte) error

func (*NullableSearch) Unset

func (v *NullableSearch) Unset()

type NullableSearchIn

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

func NewNullableSearchIn

func NewNullableSearchIn(val *SearchIn) *NullableSearchIn

func (NullableSearchIn) Get

func (v NullableSearchIn) Get() *SearchIn

func (NullableSearchIn) IsSet

func (v NullableSearchIn) IsSet() bool

func (NullableSearchIn) MarshalJSON

func (v NullableSearchIn) MarshalJSON() ([]byte, error)

func (*NullableSearchIn) Set

func (v *NullableSearchIn) Set(val *SearchIn)

func (*NullableSearchIn) UnmarshalJSON

func (v *NullableSearchIn) UnmarshalJSON(src []byte) error

func (*NullableSearchIn) Unset

func (v *NullableSearchIn) Unset()

type NullableSearchUserInput

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

func NewNullableSearchUserInput

func NewNullableSearchUserInput(val *SearchUserInput) *NullableSearchUserInput

func (NullableSearchUserInput) Get

func (NullableSearchUserInput) IsSet

func (v NullableSearchUserInput) IsSet() bool

func (NullableSearchUserInput) MarshalJSON

func (v NullableSearchUserInput) MarshalJSON() ([]byte, error)

func (*NullableSearchUserInput) Set

func (*NullableSearchUserInput) UnmarshalJSON

func (v *NullableSearchUserInput) UnmarshalJSON(src []byte) error

func (*NullableSearchUserInput) Unset

func (v *NullableSearchUserInput) Unset()

type NullableSortBy

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

func NewNullableSortBy

func NewNullableSortBy(val *SortBy) *NullableSortBy

func (NullableSortBy) Get

func (v NullableSortBy) Get() *SortBy

func (NullableSortBy) IsSet

func (v NullableSortBy) IsSet() bool

func (NullableSortBy) MarshalJSON

func (v NullableSortBy) MarshalJSON() ([]byte, error)

func (*NullableSortBy) Set

func (v *NullableSortBy) Set(val *SortBy)

func (*NullableSortBy) UnmarshalJSON

func (v *NullableSortBy) UnmarshalJSON(src []byte) error

func (*NullableSortBy) Unset

func (v *NullableSortBy) Unset()

type NullableSourcesQuery

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

func NewNullableSourcesQuery

func NewNullableSourcesQuery(val *SourcesQuery) *NullableSourcesQuery

func (NullableSourcesQuery) Get

func (NullableSourcesQuery) IsSet

func (v NullableSourcesQuery) IsSet() bool

func (NullableSourcesQuery) MarshalJSON

func (v NullableSourcesQuery) MarshalJSON() ([]byte, error)

func (*NullableSourcesQuery) Set

func (v *NullableSourcesQuery) Set(val *SourcesQuery)

func (*NullableSourcesQuery) UnmarshalJSON

func (v *NullableSourcesQuery) UnmarshalJSON(src []byte) error

func (*NullableSourcesQuery) Unset

func (v *NullableSourcesQuery) Unset()

type NullableSourcesUserInput

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

func NewNullableSourcesUserInput

func NewNullableSourcesUserInput(val *SourcesUserInput) *NullableSourcesUserInput

func (NullableSourcesUserInput) Get

func (NullableSourcesUserInput) IsSet

func (v NullableSourcesUserInput) IsSet() bool

func (NullableSourcesUserInput) MarshalJSON

func (v NullableSourcesUserInput) MarshalJSON() ([]byte, error)

func (*NullableSourcesUserInput) Set

func (*NullableSourcesUserInput) UnmarshalJSON

func (v *NullableSourcesUserInput) UnmarshalJSON(src []byte) error

func (*NullableSourcesUserInput) Unset

func (v *NullableSourcesUserInput) Unset()

type NullableString

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

func NewNullableString

func NewNullableString(val *string) *NullableString

func (NullableString) Get

func (v NullableString) Get() *string

func (NullableString) IsSet

func (v NullableString) IsSet() bool

func (NullableString) MarshalJSON

func (v NullableString) MarshalJSON() ([]byte, error)

func (*NullableString) Set

func (v *NullableString) Set(val *string)

func (*NullableString) UnmarshalJSON

func (v *NullableString) UnmarshalJSON(src []byte) error

func (*NullableString) Unset

func (v *NullableString) Unset()

type NullableSuccessStatus

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

func NewNullableSuccessStatus

func NewNullableSuccessStatus(val *SuccessStatus) *NullableSuccessStatus

func (NullableSuccessStatus) Get

func (NullableSuccessStatus) IsSet

func (v NullableSuccessStatus) IsSet() bool

func (NullableSuccessStatus) MarshalJSON

func (v NullableSuccessStatus) MarshalJSON() ([]byte, error)

func (*NullableSuccessStatus) Set

func (v *NullableSuccessStatus) Set(val *SuccessStatus)

func (*NullableSuccessStatus) UnmarshalJSON

func (v *NullableSuccessStatus) UnmarshalJSON(src []byte) error

func (*NullableSuccessStatus) Unset

func (v *NullableSuccessStatus) Unset()

type NullableTime

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

func NewNullableTime

func NewNullableTime(val *time.Time) *NullableTime

func (NullableTime) Get

func (v NullableTime) Get() *time.Time

func (NullableTime) IsSet

func (v NullableTime) IsSet() bool

func (NullableTime) MarshalJSON

func (v NullableTime) MarshalJSON() ([]byte, error)

func (*NullableTime) Set

func (v *NullableTime) Set(val *time.Time)

func (*NullableTime) UnmarshalJSON

func (v *NullableTime) UnmarshalJSON(src []byte) error

func (*NullableTime) Unset

func (v *NullableTime) Unset()

type NullableTopic

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

func NewNullableTopic

func NewNullableTopic(val *Topic) *NullableTopic

func (NullableTopic) Get

func (v NullableTopic) Get() *Topic

func (NullableTopic) IsSet

func (v NullableTopic) IsSet() bool

func (NullableTopic) MarshalJSON

func (v NullableTopic) MarshalJSON() ([]byte, error)

func (*NullableTopic) Set

func (v *NullableTopic) Set(val *Topic)

func (*NullableTopic) UnmarshalJSON

func (v *NullableTopic) UnmarshalJSON(src []byte) error

func (*NullableTopic) Unset

func (v *NullableTopic) Unset()

type PublishDatePrecision

type PublishDatePrecision string

PublishDatePrecision the model 'PublishDatePrecision'

const (
	PUBLISHDATEPRECISION_FULL             PublishDatePrecision = "full"
	PUBLISHDATEPRECISION_TIMEZONE_UNKNOWN PublishDatePrecision = "timezone unknown"
	PUBLISHDATEPRECISION_DATE             PublishDatePrecision = "date"
)

List of publish_date_precision

func NewPublishDatePrecisionFromValue

func NewPublishDatePrecisionFromValue(v string) (*PublishDatePrecision, error)

NewPublishDatePrecisionFromValue returns a pointer to a valid PublishDatePrecision for the value passed as argument, or an error if the value passed is not allowed by the enum

func (PublishDatePrecision) IsValid

func (v PublishDatePrecision) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (PublishDatePrecision) Ptr

Ptr returns reference to publish_date_precision value

func (*PublishDatePrecision) UnmarshalJSON

func (v *PublishDatePrecision) UnmarshalJSON(src []byte) error
type Search struct {
	// Keyword/keywords you're searching for. This is the most important part of your query. Please, refer to the **Advanced Query Parameter** section of the docs for more examples and explanations.
	Q *string `json:"q,omitempty"`
	// The language you want to search in.
	Lang *string `json:"lang,omitempty"`
	// Inverse to the lang parameter.
	NotLang *string `json:"not_lang,omitempty"`
	// Precision of the publication date.
	PublishedDatePrecision *string `json:"published_date_precision,omitempty"`
	// YYYY/mm/dd From which point in time to start the search. The default timezone is UTC.  Defaults to the past week.
	From *string `json:"from,omitempty"`
	// YYYY/mm/dd Until which point in time to search for. The default timezone is UTC.
	To           *string `json:"to,omitempty"`
	SearchIn     *string `json:"search_in,omitempty"`
	Countries    *string `json:"countries,omitempty"`
	NotCountries *string `json:"not_countries,omitempty"`
	Topic        *string `json:"topic,omitempty"`
	Sources      *string `json:"sources,omitempty"`
	NotSources   *string `json:"not_sources,omitempty"`
	RankedOnly   *bool   `json:"ranked_only,omitempty"`
	// `[0:999999]` The lowest boundary of the rank of a news website to filter by. Important: lower rank means that a source is more popular
	FromRank *int32 `json:"from_rank,omitempty"`
	// `[0:999999]` The upper boundary of the rank of a news website to filter by.
	ToRank   *int32  `json:"to_rank,omitempty"`
	SortBy   *string `json:"sort_by,omitempty"`
	PageSize *int32  `json:"page_size,omitempty"`
	Page     *int32  `json:"page,omitempty"`
}

Search struct for Search

func NewSearch

func NewSearch() *Search

NewSearch instantiates a new Search object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSearchWithDefaults

func NewSearchWithDefaults() *Search

NewSearchWithDefaults instantiates a new Search object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*Search) GetCountries

func (o *Search) GetCountries() string

GetCountries returns the Countries field value if set, zero value otherwise.

func (*Search) GetCountriesOk

func (o *Search) GetCountriesOk() (*string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetFrom

func (o *Search) GetFrom() string

GetFrom returns the From field value if set, zero value otherwise.

func (*Search) GetFromOk

func (o *Search) GetFromOk() (*string, bool)

GetFromOk returns a tuple with the From field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetFromRank

func (o *Search) GetFromRank() int32

GetFromRank returns the FromRank field value if set, zero value otherwise.

func (*Search) GetFromRankOk

func (o *Search) GetFromRankOk() (*int32, bool)

GetFromRankOk returns a tuple with the FromRank field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetLang

func (o *Search) GetLang() string

GetLang returns the Lang field value if set, zero value otherwise.

func (*Search) GetLangOk

func (o *Search) GetLangOk() (*string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetNotCountries

func (o *Search) GetNotCountries() string

GetNotCountries returns the NotCountries field value if set, zero value otherwise.

func (*Search) GetNotCountriesOk

func (o *Search) GetNotCountriesOk() (*string, bool)

GetNotCountriesOk returns a tuple with the NotCountries field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetNotLang

func (o *Search) GetNotLang() string

GetNotLang returns the NotLang field value if set, zero value otherwise.

func (*Search) GetNotLangOk

func (o *Search) GetNotLangOk() (*string, bool)

GetNotLangOk returns a tuple with the NotLang field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetNotSources

func (o *Search) GetNotSources() string

GetNotSources returns the NotSources field value if set, zero value otherwise.

func (*Search) GetNotSourcesOk

func (o *Search) GetNotSourcesOk() (*string, bool)

GetNotSourcesOk returns a tuple with the NotSources field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetPage

func (o *Search) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*Search) GetPageOk

func (o *Search) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetPageSize

func (o *Search) GetPageSize() int32

GetPageSize returns the PageSize field value if set, zero value otherwise.

func (*Search) GetPageSizeOk

func (o *Search) GetPageSizeOk() (*int32, bool)

GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetPublishedDatePrecision

func (o *Search) GetPublishedDatePrecision() string

GetPublishedDatePrecision returns the PublishedDatePrecision field value if set, zero value otherwise.

func (*Search) GetPublishedDatePrecisionOk

func (o *Search) GetPublishedDatePrecisionOk() (*string, bool)

GetPublishedDatePrecisionOk returns a tuple with the PublishedDatePrecision field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetQ

func (o *Search) GetQ() string

GetQ returns the Q field value if set, zero value otherwise.

func (*Search) GetQOk

func (o *Search) GetQOk() (*string, bool)

GetQOk returns a tuple with the Q field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetRankedOnly

func (o *Search) GetRankedOnly() bool

GetRankedOnly returns the RankedOnly field value if set, zero value otherwise.

func (*Search) GetRankedOnlyOk

func (o *Search) GetRankedOnlyOk() (*bool, bool)

GetRankedOnlyOk returns a tuple with the RankedOnly field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetSearchIn

func (o *Search) GetSearchIn() string

GetSearchIn returns the SearchIn field value if set, zero value otherwise.

func (*Search) GetSearchInOk

func (o *Search) GetSearchInOk() (*string, bool)

GetSearchInOk returns a tuple with the SearchIn field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetSortBy

func (o *Search) GetSortBy() string

GetSortBy returns the SortBy field value if set, zero value otherwise.

func (*Search) GetSortByOk

func (o *Search) GetSortByOk() (*string, bool)

GetSortByOk returns a tuple with the SortBy field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetSources

func (o *Search) GetSources() string

GetSources returns the Sources field value if set, zero value otherwise.

func (*Search) GetSourcesOk

func (o *Search) GetSourcesOk() (*string, bool)

GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetTo

func (o *Search) GetTo() string

GetTo returns the To field value if set, zero value otherwise.

func (*Search) GetToOk

func (o *Search) GetToOk() (*string, bool)

GetToOk returns a tuple with the To field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetToRank

func (o *Search) GetToRank() int32

GetToRank returns the ToRank field value if set, zero value otherwise.

func (*Search) GetToRankOk

func (o *Search) GetToRankOk() (*int32, bool)

GetToRankOk returns a tuple with the ToRank field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) GetTopic

func (o *Search) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise.

func (*Search) GetTopicOk

func (o *Search) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set.

func (*Search) HasCountries

func (o *Search) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*Search) HasFrom

func (o *Search) HasFrom() bool

HasFrom returns a boolean if a field has been set.

func (*Search) HasFromRank

func (o *Search) HasFromRank() bool

HasFromRank returns a boolean if a field has been set.

func (*Search) HasLang

func (o *Search) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*Search) HasNotCountries

func (o *Search) HasNotCountries() bool

HasNotCountries returns a boolean if a field has been set.

func (*Search) HasNotLang

func (o *Search) HasNotLang() bool

HasNotLang returns a boolean if a field has been set.

func (*Search) HasNotSources

func (o *Search) HasNotSources() bool

HasNotSources returns a boolean if a field has been set.

func (*Search) HasPage

func (o *Search) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*Search) HasPageSize

func (o *Search) HasPageSize() bool

HasPageSize returns a boolean if a field has been set.

func (*Search) HasPublishedDatePrecision

func (o *Search) HasPublishedDatePrecision() bool

HasPublishedDatePrecision returns a boolean if a field has been set.

func (*Search) HasQ

func (o *Search) HasQ() bool

HasQ returns a boolean if a field has been set.

func (*Search) HasRankedOnly

func (o *Search) HasRankedOnly() bool

HasRankedOnly returns a boolean if a field has been set.

func (*Search) HasSearchIn

func (o *Search) HasSearchIn() bool

HasSearchIn returns a boolean if a field has been set.

func (*Search) HasSortBy

func (o *Search) HasSortBy() bool

HasSortBy returns a boolean if a field has been set.

func (*Search) HasSources

func (o *Search) HasSources() bool

HasSources returns a boolean if a field has been set.

func (*Search) HasTo

func (o *Search) HasTo() bool

HasTo returns a boolean if a field has been set.

func (*Search) HasToRank

func (o *Search) HasToRank() bool

HasToRank returns a boolean if a field has been set.

func (*Search) HasTopic

func (o *Search) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (Search) MarshalJSON

func (o Search) MarshalJSON() ([]byte, error)

func (*Search) SetCountries

func (o *Search) SetCountries(v string)

SetCountries gets a reference to the given string and assigns it to the Countries field.

func (*Search) SetFrom

func (o *Search) SetFrom(v string)

SetFrom gets a reference to the given string and assigns it to the From field.

func (*Search) SetFromRank

func (o *Search) SetFromRank(v int32)

SetFromRank gets a reference to the given int32 and assigns it to the FromRank field.

func (*Search) SetLang

func (o *Search) SetLang(v string)

SetLang gets a reference to the given string and assigns it to the Lang field.

func (*Search) SetNotCountries

func (o *Search) SetNotCountries(v string)

SetNotCountries gets a reference to the given string and assigns it to the NotCountries field.

func (*Search) SetNotLang

func (o *Search) SetNotLang(v string)

SetNotLang gets a reference to the given string and assigns it to the NotLang field.

func (*Search) SetNotSources

func (o *Search) SetNotSources(v string)

SetNotSources gets a reference to the given string and assigns it to the NotSources field.

func (*Search) SetPage

func (o *Search) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*Search) SetPageSize

func (o *Search) SetPageSize(v int32)

SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.

func (*Search) SetPublishedDatePrecision

func (o *Search) SetPublishedDatePrecision(v string)

SetPublishedDatePrecision gets a reference to the given string and assigns it to the PublishedDatePrecision field.

func (*Search) SetQ

func (o *Search) SetQ(v string)

SetQ gets a reference to the given string and assigns it to the Q field.

func (*Search) SetRankedOnly

func (o *Search) SetRankedOnly(v bool)

SetRankedOnly gets a reference to the given bool and assigns it to the RankedOnly field.

func (*Search) SetSearchIn

func (o *Search) SetSearchIn(v string)

SetSearchIn gets a reference to the given string and assigns it to the SearchIn field.

func (*Search) SetSortBy

func (o *Search) SetSortBy(v string)

SetSortBy gets a reference to the given string and assigns it to the SortBy field.

func (*Search) SetSources

func (o *Search) SetSources(v string)

SetSources gets a reference to the given string and assigns it to the Sources field.

func (*Search) SetTo

func (o *Search) SetTo(v string)

SetTo gets a reference to the given string and assigns it to the To field.

func (*Search) SetToRank

func (o *Search) SetToRank(v int32)

SetToRank gets a reference to the given int32 and assigns it to the ToRank field.

func (*Search) SetTopic

func (o *Search) SetTopic(v string)

SetTopic gets a reference to the given string and assigns it to the Topic field.

type SearchApiGetRequest

type SearchApiGetRequest struct {
	ApiService *SearchApiService
	// contains filtered or unexported fields
}

func (SearchApiGetRequest) Countries

func (r SearchApiGetRequest) Countries(countries string) SearchApiGetRequest

Countries where the news publisher is located. **Important**: This parameter is not responsible for the countries mentioned in the news article. One or multiple countries can be used in the search. The only acceptable format is [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) For example, `US,CA,MX` or just `US`

func (SearchApiGetRequest) Execute

func (SearchApiGetRequest) From

`YYYY/mm/dd` From which point in time to start the search. The default timezone is UTC. Defaults to the past week.

func (SearchApiGetRequest) FromRank

func (r SearchApiGetRequest) FromRank(fromRank int32) SearchApiGetRequest

`[0:999999]` The lowest boundary of the rank of a news website to filter by. Important: lower rank means that a source is more popular

func (SearchApiGetRequest) Lang

Specifies the languages of the search. For example: `en`. The only accepted format is [ISO 639-1 — 2](https://en.wikipedia.org/wiki/ISO_639-1) letter code.

func (SearchApiGetRequest) NotCountries

func (r SearchApiGetRequest) NotCountries(notCountries string) SearchApiGetRequest

The inverse of the `countries` parameter.

func (SearchApiGetRequest) NotLang

func (r SearchApiGetRequest) NotLang(notLang string) SearchApiGetRequest

Inverse to the `lang` parameter

func (SearchApiGetRequest) NotSources

func (r SearchApiGetRequest) NotSources(notSources string) SearchApiGetRequest

One or more sources to be excluded from the search. Comma-separated list. For example: `nytimes.com,cnn.com,wsj.com`

func (SearchApiGetRequest) Page

The number of the page. Use it to scroll through the results. This parameter is used to paginate: scroll through results because one API response cannot return more than 100 articles.

func (SearchApiGetRequest) PageSize

func (r SearchApiGetRequest) PageSize(pageSize int32) SearchApiGetRequest

`[1:100]` How many articles to return per page.

func (SearchApiGetRequest) PublishedDatePrecision

func (r SearchApiGetRequest) PublishedDatePrecision(publishedDatePrecision PublishDatePrecision) SearchApiGetRequest

There are 3 types of date precision we define: `full` — day and time of an article is correctly identified with the appropriate timezone `timezone unknown` — day and time of an article is correctly identified without timezone `date` — only the day is identified without an exact time

func (SearchApiGetRequest) Q

Keyword/keywords you're searching for. This is the most important part of your query. Please, refer to the **Advanced Query Parameter** section below of the docs for more examples and explanations

func (SearchApiGetRequest) RankedOnly

func (r SearchApiGetRequest) RankedOnly(rankedOnly bool) SearchApiGetRequest

Default: `True` Limit the search only for the sources which are in the top 1 million online websites. Unranked sources are assigned a rank that equals `999999`

func (SearchApiGetRequest) SearchIn

func (r SearchApiGetRequest) SearchIn(searchIn SearchIn) SearchApiGetRequest

By default, we search what you specified in the `q` parameter in both `title` and `summary` of the article. However, you can limit this to either `title` or `summary`

func (SearchApiGetRequest) SortBy

`relevancy` (default value) — the most relevant results first `date` — the most recently published results first `rank` — the results from the highest-ranked sources first

func (SearchApiGetRequest) Sources

func (r SearchApiGetRequest) Sources(sources string) SearchApiGetRequest

One or more news resources to filter your search. It should be the normal form of the URL, For example: `nytimes.com,theguardian.com`

func (SearchApiGetRequest) To

`YYYY/mm/dd` Until which point in time to search for. The default timezone is UTC.

func (SearchApiGetRequest) ToRank

`[0:999999]` The upper boundary of the rank of a news website to filter by.

func (SearchApiGetRequest) Topic

Accepted values: `news`, `sport`, `tech`, `world`, `finance`, `politics`, `business`, `economics`, `entertainment`, `beauty`, `travel`, `music`, `food`, `science`, `gaming` The topic to which you want to restrict the articles of your choice. Not all news articles are assigned with a topic, therefore, we cannot guarantee that 100% of topics talking about technology will be assigned a tech label.

type SearchApiPostRequest

type SearchApiPostRequest struct {
	ApiService *SearchApiService
	// contains filtered or unexported fields
}

func (SearchApiPostRequest) Execute

func (SearchApiPostRequest) Search

type SearchApiService

type SearchApiService service

SearchApiService SearchApi service

func (*SearchApiService) Get

Get Search for specific news articles

Main endpoint that allows you to find news article by keyword, date, language, country, etc.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return SearchApiGetRequest

func (*SearchApiService) GetExecute

Execute executes the request

@return Model200Response

func (*SearchApiService) Post

Post Search for specific news articles

Main endpoint that allows you to find news article by keyword, date, language, country, etc.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return SearchApiPostRequest

func (*SearchApiService) PostExecute

Execute executes the request

@return Model200Response

type SearchIn

type SearchIn string

SearchIn the model 'SearchIn'

const (
	SEARCHIN_TITLE         SearchIn = "title"
	SEARCHIN_SUMMARY       SearchIn = "summary"
	SEARCHIN_TITLE_SUMMARY SearchIn = "title_summary"
)

List of search_in

func NewSearchInFromValue

func NewSearchInFromValue(v string) (*SearchIn, error)

NewSearchInFromValue returns a pointer to a valid SearchIn for the value passed as argument, or an error if the value passed is not allowed by the enum

func (SearchIn) IsValid

func (v SearchIn) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (SearchIn) Ptr

func (v SearchIn) Ptr() *SearchIn

Ptr returns reference to search_in value

func (*SearchIn) UnmarshalJSON

func (v *SearchIn) UnmarshalJSON(src []byte) error

type SearchUserInput

type SearchUserInput struct {
	Q                      *string        `json:"q,omitempty"`
	SearchIn               []string       `json:"search_in,omitempty"`
	Lang                   []string       `json:"lang,omitempty"`
	NotLang                []string       `json:"not_lang,omitempty"`
	Countries              []string       `json:"countries,omitempty"`
	NotCountries           []string       `json:"not_countries,omitempty"`
	From                   *string        `json:"from,omitempty"`
	To                     NullableString `json:"to,omitempty"`
	RankedOnly             *string        `json:"ranked_only,omitempty"`
	FromRank               NullableInt32  `json:"from_rank,omitempty"`
	ToRank                 NullableInt32  `json:"to_rank,omitempty"`
	SortBy                 *string        `json:"sort_by,omitempty"`
	Page                   *int32         `json:"page,omitempty"`
	Size                   *int32         `json:"size,omitempty"`
	Sources                []string       `json:"sources,omitempty"`
	NotSources             []string       `json:"not_sources,omitempty"`
	Topic                  NullableString `json:"topic,omitempty"`
	PublishedDatePrecision NullableString `json:"published_date_precision,omitempty"`
}

SearchUserInput struct for SearchUserInput

func NewSearchUserInput

func NewSearchUserInput() *SearchUserInput

NewSearchUserInput instantiates a new SearchUserInput object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSearchUserInputWithDefaults

func NewSearchUserInputWithDefaults() *SearchUserInput

NewSearchUserInputWithDefaults instantiates a new SearchUserInput object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SearchUserInput) GetCountries

func (o *SearchUserInput) GetCountries() []string

GetCountries returns the Countries field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetCountriesOk

func (o *SearchUserInput) GetCountriesOk() ([]string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetFrom

func (o *SearchUserInput) GetFrom() string

GetFrom returns the From field value if set, zero value otherwise.

func (*SearchUserInput) GetFromOk

func (o *SearchUserInput) GetFromOk() (*string, bool)

GetFromOk returns a tuple with the From field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetFromRank

func (o *SearchUserInput) GetFromRank() int32

GetFromRank returns the FromRank field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetFromRankOk

func (o *SearchUserInput) GetFromRankOk() (*int32, bool)

GetFromRankOk returns a tuple with the FromRank field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetLang

func (o *SearchUserInput) GetLang() []string

GetLang returns the Lang field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetLangOk

func (o *SearchUserInput) GetLangOk() ([]string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetNotCountries

func (o *SearchUserInput) GetNotCountries() []string

GetNotCountries returns the NotCountries field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetNotCountriesOk

func (o *SearchUserInput) GetNotCountriesOk() ([]string, bool)

GetNotCountriesOk returns a tuple with the NotCountries field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetNotLang

func (o *SearchUserInput) GetNotLang() []string

GetNotLang returns the NotLang field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetNotLangOk

func (o *SearchUserInput) GetNotLangOk() ([]string, bool)

GetNotLangOk returns a tuple with the NotLang field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetNotSources

func (o *SearchUserInput) GetNotSources() []string

GetNotSources returns the NotSources field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetNotSourcesOk

func (o *SearchUserInput) GetNotSourcesOk() ([]string, bool)

GetNotSourcesOk returns a tuple with the NotSources field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetPage

func (o *SearchUserInput) GetPage() int32

GetPage returns the Page field value if set, zero value otherwise.

func (*SearchUserInput) GetPageOk

func (o *SearchUserInput) GetPageOk() (*int32, bool)

GetPageOk returns a tuple with the Page field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetPublishedDatePrecision

func (o *SearchUserInput) GetPublishedDatePrecision() string

GetPublishedDatePrecision returns the PublishedDatePrecision field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetPublishedDatePrecisionOk

func (o *SearchUserInput) GetPublishedDatePrecisionOk() (*string, bool)

GetPublishedDatePrecisionOk returns a tuple with the PublishedDatePrecision field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetQ

func (o *SearchUserInput) GetQ() string

GetQ returns the Q field value if set, zero value otherwise.

func (*SearchUserInput) GetQOk

func (o *SearchUserInput) GetQOk() (*string, bool)

GetQOk returns a tuple with the Q field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetRankedOnly

func (o *SearchUserInput) GetRankedOnly() string

GetRankedOnly returns the RankedOnly field value if set, zero value otherwise.

func (*SearchUserInput) GetRankedOnlyOk

func (o *SearchUserInput) GetRankedOnlyOk() (*string, bool)

GetRankedOnlyOk returns a tuple with the RankedOnly field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetSearchIn

func (o *SearchUserInput) GetSearchIn() []string

GetSearchIn returns the SearchIn field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetSearchInOk

func (o *SearchUserInput) GetSearchInOk() ([]string, bool)

GetSearchInOk returns a tuple with the SearchIn field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetSize

func (o *SearchUserInput) GetSize() int32

GetSize returns the Size field value if set, zero value otherwise.

func (*SearchUserInput) GetSizeOk

func (o *SearchUserInput) GetSizeOk() (*int32, bool)

GetSizeOk returns a tuple with the Size field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetSortBy

func (o *SearchUserInput) GetSortBy() string

GetSortBy returns the SortBy field value if set, zero value otherwise.

func (*SearchUserInput) GetSortByOk

func (o *SearchUserInput) GetSortByOk() (*string, bool)

GetSortByOk returns a tuple with the SortBy field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SearchUserInput) GetSources

func (o *SearchUserInput) GetSources() []string

GetSources returns the Sources field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetSourcesOk

func (o *SearchUserInput) GetSourcesOk() ([]string, bool)

GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetTo

func (o *SearchUserInput) GetTo() string

GetTo returns the To field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetToOk

func (o *SearchUserInput) GetToOk() (*string, bool)

GetToOk returns a tuple with the To field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetToRank

func (o *SearchUserInput) GetToRank() int32

GetToRank returns the ToRank field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetToRankOk

func (o *SearchUserInput) GetToRankOk() (*int32, bool)

GetToRankOk returns a tuple with the ToRank field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) GetTopic

func (o *SearchUserInput) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SearchUserInput) GetTopicOk

func (o *SearchUserInput) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SearchUserInput) HasCountries

func (o *SearchUserInput) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*SearchUserInput) HasFrom

func (o *SearchUserInput) HasFrom() bool

HasFrom returns a boolean if a field has been set.

func (*SearchUserInput) HasFromRank

func (o *SearchUserInput) HasFromRank() bool

HasFromRank returns a boolean if a field has been set.

func (*SearchUserInput) HasLang

func (o *SearchUserInput) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*SearchUserInput) HasNotCountries

func (o *SearchUserInput) HasNotCountries() bool

HasNotCountries returns a boolean if a field has been set.

func (*SearchUserInput) HasNotLang

func (o *SearchUserInput) HasNotLang() bool

HasNotLang returns a boolean if a field has been set.

func (*SearchUserInput) HasNotSources

func (o *SearchUserInput) HasNotSources() bool

HasNotSources returns a boolean if a field has been set.

func (*SearchUserInput) HasPage

func (o *SearchUserInput) HasPage() bool

HasPage returns a boolean if a field has been set.

func (*SearchUserInput) HasPublishedDatePrecision

func (o *SearchUserInput) HasPublishedDatePrecision() bool

HasPublishedDatePrecision returns a boolean if a field has been set.

func (*SearchUserInput) HasQ

func (o *SearchUserInput) HasQ() bool

HasQ returns a boolean if a field has been set.

func (*SearchUserInput) HasRankedOnly

func (o *SearchUserInput) HasRankedOnly() bool

HasRankedOnly returns a boolean if a field has been set.

func (*SearchUserInput) HasSearchIn

func (o *SearchUserInput) HasSearchIn() bool

HasSearchIn returns a boolean if a field has been set.

func (*SearchUserInput) HasSize

func (o *SearchUserInput) HasSize() bool

HasSize returns a boolean if a field has been set.

func (*SearchUserInput) HasSortBy

func (o *SearchUserInput) HasSortBy() bool

HasSortBy returns a boolean if a field has been set.

func (*SearchUserInput) HasSources

func (o *SearchUserInput) HasSources() bool

HasSources returns a boolean if a field has been set.

func (*SearchUserInput) HasTo

func (o *SearchUserInput) HasTo() bool

HasTo returns a boolean if a field has been set.

func (*SearchUserInput) HasToRank

func (o *SearchUserInput) HasToRank() bool

HasToRank returns a boolean if a field has been set.

func (*SearchUserInput) HasTopic

func (o *SearchUserInput) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (SearchUserInput) MarshalJSON

func (o SearchUserInput) MarshalJSON() ([]byte, error)

func (*SearchUserInput) SetCountries

func (o *SearchUserInput) SetCountries(v []string)

SetCountries gets a reference to the given []string and assigns it to the Countries field.

func (*SearchUserInput) SetFrom

func (o *SearchUserInput) SetFrom(v string)

SetFrom gets a reference to the given string and assigns it to the From field.

func (*SearchUserInput) SetFromRank

func (o *SearchUserInput) SetFromRank(v int32)

SetFromRank gets a reference to the given NullableInt32 and assigns it to the FromRank field.

func (*SearchUserInput) SetFromRankNil

func (o *SearchUserInput) SetFromRankNil()

SetFromRankNil sets the value for FromRank to be an explicit nil

func (*SearchUserInput) SetLang

func (o *SearchUserInput) SetLang(v []string)

SetLang gets a reference to the given []string and assigns it to the Lang field.

func (*SearchUserInput) SetNotCountries

func (o *SearchUserInput) SetNotCountries(v []string)

SetNotCountries gets a reference to the given []string and assigns it to the NotCountries field.

func (*SearchUserInput) SetNotLang

func (o *SearchUserInput) SetNotLang(v []string)

SetNotLang gets a reference to the given []string and assigns it to the NotLang field.

func (*SearchUserInput) SetNotSources

func (o *SearchUserInput) SetNotSources(v []string)

SetNotSources gets a reference to the given []string and assigns it to the NotSources field.

func (*SearchUserInput) SetPage

func (o *SearchUserInput) SetPage(v int32)

SetPage gets a reference to the given int32 and assigns it to the Page field.

func (*SearchUserInput) SetPublishedDatePrecision

func (o *SearchUserInput) SetPublishedDatePrecision(v string)

SetPublishedDatePrecision gets a reference to the given NullableString and assigns it to the PublishedDatePrecision field.

func (*SearchUserInput) SetPublishedDatePrecisionNil

func (o *SearchUserInput) SetPublishedDatePrecisionNil()

SetPublishedDatePrecisionNil sets the value for PublishedDatePrecision to be an explicit nil

func (*SearchUserInput) SetQ

func (o *SearchUserInput) SetQ(v string)

SetQ gets a reference to the given string and assigns it to the Q field.

func (*SearchUserInput) SetRankedOnly

func (o *SearchUserInput) SetRankedOnly(v string)

SetRankedOnly gets a reference to the given string and assigns it to the RankedOnly field.

func (*SearchUserInput) SetSearchIn

func (o *SearchUserInput) SetSearchIn(v []string)

SetSearchIn gets a reference to the given []string and assigns it to the SearchIn field.

func (*SearchUserInput) SetSize

func (o *SearchUserInput) SetSize(v int32)

SetSize gets a reference to the given int32 and assigns it to the Size field.

func (*SearchUserInput) SetSortBy

func (o *SearchUserInput) SetSortBy(v string)

SetSortBy gets a reference to the given string and assigns it to the SortBy field.

func (*SearchUserInput) SetSources

func (o *SearchUserInput) SetSources(v []string)

SetSources gets a reference to the given []string and assigns it to the Sources field.

func (*SearchUserInput) SetTo

func (o *SearchUserInput) SetTo(v string)

SetTo gets a reference to the given NullableString and assigns it to the To field.

func (*SearchUserInput) SetToNil

func (o *SearchUserInput) SetToNil()

SetToNil sets the value for To to be an explicit nil

func (*SearchUserInput) SetToRank

func (o *SearchUserInput) SetToRank(v int32)

SetToRank gets a reference to the given NullableInt32 and assigns it to the ToRank field.

func (*SearchUserInput) SetToRankNil

func (o *SearchUserInput) SetToRankNil()

SetToRankNil sets the value for ToRank to be an explicit nil

func (*SearchUserInput) SetTopic

func (o *SearchUserInput) SetTopic(v string)

SetTopic gets a reference to the given NullableString and assigns it to the Topic field.

func (*SearchUserInput) SetTopicNil

func (o *SearchUserInput) SetTopicNil()

SetTopicNil sets the value for Topic to be an explicit nil

func (*SearchUserInput) UnsetFromRank

func (o *SearchUserInput) UnsetFromRank()

UnsetFromRank ensures that no value is present for FromRank, not even an explicit nil

func (*SearchUserInput) UnsetPublishedDatePrecision

func (o *SearchUserInput) UnsetPublishedDatePrecision()

UnsetPublishedDatePrecision ensures that no value is present for PublishedDatePrecision, not even an explicit nil

func (*SearchUserInput) UnsetTo

func (o *SearchUserInput) UnsetTo()

UnsetTo ensures that no value is present for To, not even an explicit nil

func (*SearchUserInput) UnsetToRank

func (o *SearchUserInput) UnsetToRank()

UnsetToRank ensures that no value is present for ToRank, not even an explicit nil

func (*SearchUserInput) UnsetTopic

func (o *SearchUserInput) UnsetTopic()

UnsetTopic ensures that no value is present for Topic, not even an explicit nil

type ServerConfiguration

type ServerConfiguration struct {
	URL         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerConfigurations

type ServerConfigurations []ServerConfiguration

ServerConfigurations stores multiple ServerConfiguration items

func (ServerConfigurations) URL

func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error)

URL formats template on a index using given variables

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type SortBy

type SortBy string

SortBy the model 'SortBy'

const (
	SORTBY_RELEVANCY SortBy = "relevancy"
	SORTBY_DATE      SortBy = "date"
	SORTBY_RANK      SortBy = "rank"
)

List of sort_by

func NewSortByFromValue

func NewSortByFromValue(v string) (*SortBy, error)

NewSortByFromValue returns a pointer to a valid SortBy for the value passed as argument, or an error if the value passed is not allowed by the enum

func (SortBy) IsValid

func (v SortBy) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (SortBy) Ptr

func (v SortBy) Ptr() *SortBy

Ptr returns reference to sort_by value

func (*SortBy) UnmarshalJSON

func (v *SortBy) UnmarshalJSON(src []byte) error

type SourcesApiGetRequest

type SourcesApiGetRequest struct {
	ApiService *SourcesApiService
	// contains filtered or unexported fields
}

func (SourcesApiGetRequest) Countries

func (r SourcesApiGetRequest) Countries(countries string) SourcesApiGetRequest

Countries where the news publisher is located. **Important**: This parameter is not responsible for the countries mentioned in the news article. One or multiple countries can be used in the search. The only acceptable format is [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) For example, `US,CA,MX` or just `US`

func (SourcesApiGetRequest) Execute

func (SourcesApiGetRequest) Lang

Specifies the languages of the search. For example: `en`. The only accepted format is [ISO 639-1 — 2](https://en.wikipedia.org/wiki/ISO_639-1) letter code.

func (SourcesApiGetRequest) Topic

Accepted values: `news`, `sport`, `tech`, `world`, `finance`, `politics`, `business`, `economics`, `entertainment`, `beauty`, `travel`, `music`, `food`, `science`, `gaming` The topic to which you want to restrict the articles of your choice. Not all news articles are assigned with a topic, therefore, we cannot guarantee that 100% of topics talking about technology will be assigned a tech label.

type SourcesApiPostRequest

type SourcesApiPostRequest struct {
	ApiService *SourcesApiService
	// contains filtered or unexported fields
}

func (SourcesApiPostRequest) Execute

func (SourcesApiPostRequest) SourcesQuery

func (r SourcesApiPostRequest) SourcesQuery(sourcesQuery SourcesQuery) SourcesApiPostRequest

type SourcesApiService

type SourcesApiService service

SourcesApiService SourcesApi service

func (*SourcesApiService) Get

Get Get top news sources supported by NewsCatcher.

Returns a list of the top 100 supported news websites. Overall, we support over 60,000 websites. Using this endpoint, you may find the top 100 for your specific language, country, topic combination.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return SourcesApiGetRequest

func (*SourcesApiService) GetExecute

Execute executes the request

@return Model200ResponseSources

func (*SourcesApiService) Post

Post Get top news sources supported by NewsCatcher.

Returns a list of the top 100 supported news websites. Overall, we support over 60,000 websites. Using this endpoint, you may find the top 100 for your specific language, country, topic combination.

@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return SourcesApiPostRequest

func (*SourcesApiService) PostExecute

Execute executes the request

@return Model200ResponseSources

type SourcesQuery

type SourcesQuery struct {
	// The language you want to search in.
	Lang      *string `json:"lang,omitempty"`
	Countries *string `json:"countries,omitempty"`
	Topic     *string `json:"topic,omitempty"`
}

SourcesQuery struct for SourcesQuery

func NewSourcesQuery

func NewSourcesQuery() *SourcesQuery

NewSourcesQuery instantiates a new SourcesQuery object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSourcesQueryWithDefaults

func NewSourcesQueryWithDefaults() *SourcesQuery

NewSourcesQueryWithDefaults instantiates a new SourcesQuery object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SourcesQuery) GetCountries

func (o *SourcesQuery) GetCountries() string

GetCountries returns the Countries field value if set, zero value otherwise.

func (*SourcesQuery) GetCountriesOk

func (o *SourcesQuery) GetCountriesOk() (*string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SourcesQuery) GetLang

func (o *SourcesQuery) GetLang() string

GetLang returns the Lang field value if set, zero value otherwise.

func (*SourcesQuery) GetLangOk

func (o *SourcesQuery) GetLangOk() (*string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SourcesQuery) GetTopic

func (o *SourcesQuery) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise.

func (*SourcesQuery) GetTopicOk

func (o *SourcesQuery) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set.

func (*SourcesQuery) HasCountries

func (o *SourcesQuery) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*SourcesQuery) HasLang

func (o *SourcesQuery) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*SourcesQuery) HasTopic

func (o *SourcesQuery) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (SourcesQuery) MarshalJSON

func (o SourcesQuery) MarshalJSON() ([]byte, error)

func (*SourcesQuery) SetCountries

func (o *SourcesQuery) SetCountries(v string)

SetCountries gets a reference to the given string and assigns it to the Countries field.

func (*SourcesQuery) SetLang

func (o *SourcesQuery) SetLang(v string)

SetLang gets a reference to the given string and assigns it to the Lang field.

func (*SourcesQuery) SetTopic

func (o *SourcesQuery) SetTopic(v string)

SetTopic gets a reference to the given string and assigns it to the Topic field.

type SourcesUserInput

type SourcesUserInput struct {
	Lang      []string       `json:"lang,omitempty"`
	Countries []string       `json:"countries,omitempty"`
	Topic     NullableString `json:"topic,omitempty"`
}

SourcesUserInput struct for SourcesUserInput

func NewSourcesUserInput

func NewSourcesUserInput() *SourcesUserInput

NewSourcesUserInput instantiates a new SourcesUserInput object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed

func NewSourcesUserInputWithDefaults

func NewSourcesUserInputWithDefaults() *SourcesUserInput

NewSourcesUserInputWithDefaults instantiates a new SourcesUserInput object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*SourcesUserInput) GetCountries

func (o *SourcesUserInput) GetCountries() []string

GetCountries returns the Countries field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SourcesUserInput) GetCountriesOk

func (o *SourcesUserInput) GetCountriesOk() ([]string, bool)

GetCountriesOk returns a tuple with the Countries field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SourcesUserInput) GetLang

func (o *SourcesUserInput) GetLang() []string

GetLang returns the Lang field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SourcesUserInput) GetLangOk

func (o *SourcesUserInput) GetLangOk() ([]string, bool)

GetLangOk returns a tuple with the Lang field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SourcesUserInput) GetTopic

func (o *SourcesUserInput) GetTopic() string

GetTopic returns the Topic field value if set, zero value otherwise (both if not set or set to explicit null).

func (*SourcesUserInput) GetTopicOk

func (o *SourcesUserInput) GetTopicOk() (*string, bool)

GetTopicOk returns a tuple with the Topic field value if set, nil otherwise and a boolean to check if the value has been set. NOTE: If the value is an explicit nil, `nil, true` will be returned

func (*SourcesUserInput) HasCountries

func (o *SourcesUserInput) HasCountries() bool

HasCountries returns a boolean if a field has been set.

func (*SourcesUserInput) HasLang

func (o *SourcesUserInput) HasLang() bool

HasLang returns a boolean if a field has been set.

func (*SourcesUserInput) HasTopic

func (o *SourcesUserInput) HasTopic() bool

HasTopic returns a boolean if a field has been set.

func (SourcesUserInput) MarshalJSON

func (o SourcesUserInput) MarshalJSON() ([]byte, error)

func (*SourcesUserInput) SetCountries

func (o *SourcesUserInput) SetCountries(v []string)

SetCountries gets a reference to the given []string and assigns it to the Countries field.

func (*SourcesUserInput) SetLang

func (o *SourcesUserInput) SetLang(v []string)

SetLang gets a reference to the given []string and assigns it to the Lang field.

func (*SourcesUserInput) SetTopic

func (o *SourcesUserInput) SetTopic(v string)

SetTopic gets a reference to the given NullableString and assigns it to the Topic field.

func (*SourcesUserInput) SetTopicNil

func (o *SourcesUserInput) SetTopicNil()

SetTopicNil sets the value for Topic to be an explicit nil

func (*SourcesUserInput) UnsetTopic

func (o *SourcesUserInput) UnsetTopic()

UnsetTopic ensures that no value is present for Topic, not even an explicit nil

type SuccessStatus

type SuccessStatus string

SuccessStatus the model 'SuccessStatus'

const (
	SUCCESSSTATUS_OK                         SuccessStatus = "ok"
	SUCCESSSTATUS_NO_MATCHES_FOR_YOUR_SEARCH SuccessStatus = "No matches for your search."
)

List of success_status

func NewSuccessStatusFromValue

func NewSuccessStatusFromValue(v string) (*SuccessStatus, error)

NewSuccessStatusFromValue returns a pointer to a valid SuccessStatus for the value passed as argument, or an error if the value passed is not allowed by the enum

func (SuccessStatus) IsValid

func (v SuccessStatus) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (SuccessStatus) Ptr

func (v SuccessStatus) Ptr() *SuccessStatus

Ptr returns reference to success_status value

func (*SuccessStatus) UnmarshalJSON

func (v *SuccessStatus) UnmarshalJSON(src []byte) error

type Topic

type Topic string

Topic the model 'Topic'

const (
	TOPIC_NEWS          Topic = "news"
	TOPIC_SPORT         Topic = "sport"
	TOPIC_TECH          Topic = "tech"
	TOPIC_WORLD         Topic = "world"
	TOPIC_FINANCE       Topic = "finance"
	TOPIC_POLITICS      Topic = "politics"
	TOPIC_BUSINESS      Topic = "business"
	TOPIC_ECONOMICS     Topic = "economics"
	TOPIC_ENTERTAINMENT Topic = "entertainment"
	TOPIC_BEAUTY        Topic = "beauty"
	TOPIC_TRAVEL        Topic = "travel"
	TOPIC_MUSIC         Topic = "music"
	TOPIC_FOOD          Topic = "food"
	TOPIC_SCIENCE       Topic = "science"
	TOPIC_GAMING        Topic = "gaming"
)

List of topic

func NewTopicFromValue

func NewTopicFromValue(v string) (*Topic, error)

NewTopicFromValue returns a pointer to a valid Topic for the value passed as argument, or an error if the value passed is not allowed by the enum

func (Topic) IsValid

func (v Topic) IsValid() bool

IsValid return true if the value is valid for the enum, false otherwise

func (Topic) Ptr

func (v Topic) Ptr() *Topic

Ptr returns reference to topic value

func (*Topic) UnmarshalJSON

func (v *Topic) UnmarshalJSON(src []byte) error

Jump to

Keyboard shortcuts

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