news

package
v0.0.0-...-66bbac4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT. This file was generated at 2023-09-21 13:57:46.186485 -0300 -03 m=+0.012869459

Code generated by go generate; DO NOT EDIT. This file was generated at 2023-09-21 13:57:46.186109 -0300 -03 m=+0.012493251

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNewsAction

func NewNewsAction() action_structs.Action

NewNewsAction creates a new NewsAction with Params initialized

func NewNewsByCountryAction

func NewNewsByCountryAction() action_structs.Action

NewNewsByCountryAction creates a new NewsByCountryAction with Params initialized

Types

type NewsAPIResponse

type NewsAPIResponse struct {
	Status       string `json:"status"`
	TotalResults int    `json:"totalResults"`
	Articles     []struct {
		Source struct {
			Id   *string `json:"id"`
			Name string  `json:"name"`
		} `json:"source"`
		Author      *string   `json:"author"`
		Title       string    `json:"title"`
		Description string    `json:"description"`
		URL         string    `json:"url"`
		URLToImage  *string   `json:"urlToImage"`
		PublishedAt time.Time `json:"publishedAt"`
		Content     string    `json:"content"`
	} `json:"articles"`
}

func NewsAPIQuery

func NewsAPIQuery(q string) (*NewsAPIResponse, error)

func NewsAPITopHeadlines

func NewsAPITopHeadlines(country string) (*NewsAPIResponse, error)

type NewsAction

type NewsAction struct {
	Name        string
	Description string
	Params      *action_structs.ActionParameterSet
	Extra       map[string]interface{}
}

func (*NewsAction) CheckRequiredParams

func (a *NewsAction) CheckRequiredParams() error

CheckRequiredParams checks if all required params are set

func (*NewsAction) Execute

func (*NewsAction) GetDescription

func (a *NewsAction) GetDescription() string

func (*NewsAction) GetName

func (a *NewsAction) GetName() string

func (*NewsAction) GetNotification

func (a *NewsAction) GetNotification() string

func (*NewsAction) GetParam

func (a *NewsAction) GetParam(key string) (string, error)

func (*NewsAction) GetParams

func (a *NewsAction) GetParams() []*action_structs.ActionParameter

func (*NewsAction) GetSchema

func (a *NewsAction) GetSchema() *functions.FunctionDefinition

func (*NewsAction) MustGetParam

func (a *NewsAction) MustGetParam(key string) string

func (*NewsAction) RunPostActions

func (a *NewsAction) RunPostActions(request *action_structs.ActionRequest) error

func (*NewsAction) RunPreActions

func (a *NewsAction) RunPreActions(request *action_structs.ActionRequest) error

func (*NewsAction) SetMessage

func (a *NewsAction) SetMessage(msg *memory.Message)

func (*NewsAction) SetParam

func (a *NewsAction) SetParam(key, value string)

func (*NewsAction) SkipFunctionCall

func (a *NewsAction) SkipFunctionCall() bool

type NewsByCountryAction

type NewsByCountryAction struct {
	Name        string
	Description string
	Params      *action_structs.ActionParameterSet
	Extra       map[string]interface{}
}

func (*NewsByCountryAction) CheckRequiredParams

func (a *NewsByCountryAction) CheckRequiredParams() error

CheckRequiredParams checks if all required params are set

func (*NewsByCountryAction) Execute

func (*NewsByCountryAction) GetDescription

func (a *NewsByCountryAction) GetDescription() string

func (*NewsByCountryAction) GetName

func (a *NewsByCountryAction) GetName() string

func (*NewsByCountryAction) GetNotification

func (a *NewsByCountryAction) GetNotification() string

func (*NewsByCountryAction) GetParam

func (a *NewsByCountryAction) GetParam(key string) (string, error)

func (*NewsByCountryAction) GetParams

func (*NewsByCountryAction) GetSchema

func (*NewsByCountryAction) MustGetParam

func (a *NewsByCountryAction) MustGetParam(key string) string

func (*NewsByCountryAction) RunPostActions

func (a *NewsByCountryAction) RunPostActions(request *action_structs.ActionRequest) error

func (*NewsByCountryAction) RunPreActions

func (a *NewsByCountryAction) RunPreActions(request *action_structs.ActionRequest) error

func (*NewsByCountryAction) SetMessage

func (a *NewsByCountryAction) SetMessage(msg *memory.Message)

func (*NewsByCountryAction) SetParam

func (a *NewsByCountryAction) SetParam(key, value string)

func (*NewsByCountryAction) SkipFunctionCall

func (a *NewsByCountryAction) SkipFunctionCall() bool

Jump to

Keyboard shortcuts

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