mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-11 18:44:26 +00:00
20 lines
320 B
Go
Executable File
20 lines
320 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"go.m3o.com/news"
|
|
)
|
|
|
|
// Get the latest news headlines
|
|
func main() {
|
|
newsService := news.NewNewsService(os.Getenv("M3O_API_TOKEN"))
|
|
rsp, err := newsService.Headlines(&news.HeadlinesRequest{
|
|
Date: "2021-11-24",
|
|
Language: "en",
|
|
Locale: "us",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|