news

package
v0.0.0-...-274743d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewsCmd = &cobra.Command{
	Use:     "news",
	Short:   "Get the most recent headlines for a specified ticker",
	Long:    `Returns the 5 most recent news headlines for a supplied ticker`,
	Example: "  king-spy news aapl",
	Run: func(cmd *cobra.Command, args []string) {
		ticker := args[0]
		utils.TickerValidation(ticker)
		ticker = strings.ToLower(ticker)
		cmdArgs := os.Args[1]
		_, key, secret := config.Init()
		GetNews(key, secret, ticker, cmdArgs)
	},
}

NewsCmd represents the news command

Functions

func GetNews

func GetNews(key string, secret string, ticker string, cmdArgs string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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