mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
17 lines
336 B
Go
Executable File
17 lines
336 B
Go
Executable File
package example
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/micro/services/clients/go/twitter"
|
|
"os"
|
|
)
|
|
|
|
// Search for tweets with a simple query
|
|
func SearchForTweets() {
|
|
twitterService := twitter.NewTwitterService(os.Getenv("MICRO_API_TOKEN"))
|
|
rsp, err := twitterService.Search(&twitter.SearchRequest{
|
|
Query: "cats",
|
|
})
|
|
fmt.Println(rsp, err)
|
|
}
|