Esempio n. 1
0
func meDemo(svc *api.Service, argv []string) {
	res, err := svc.Me()
	if err != nil {
		fmt.Printf("Error getting me info: %v\n", err)
		return
	}
	fmt.Printf("Sucess! Got response: %+v\n", res)
}
Esempio n. 2
0
func friendsDemo(svc *api.Service, argv []string) {
	meInfo, err := svc.Me()
	if err != nil {
		fmt.Printf("Error getting me info: %v\n", err)
		return
	}
	res, err := svc.ListFriends(meInfo.Data.User.ID, &api.ListFriendsRequest{})
	if err != nil {
		fmt.Printf("Error getting friends info: %v\n", err)
		return
	}
	fmt.Printf("Sucess! Got response: %+v\n", res)
}