Skip to content

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Client for newsapi.org api written in Golang.

Install:
go get github.com/bas24/newsapi

Getting articles:

package main
import(
"fmt""github.com/bas24/newsapi"
)
funcmain(){
result, err:=newsapi.GetArticles("YOUR_API_KEY")
iferr!=nil {
fmt.Println(err)
}
for_, v:=rangeresult{
fmt.Println(v)
}
}

If you want to get the topic for feed source, just:

package main
import(
"fmt""github.com/bas24/newsapi"
)
funcmain(){
topic:=newsapi.GetTopic("bbc-news")
fmt.Println(topic)
}

About

Client for newsapi.org free json api in Golang

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages