示例#1
0
文件: main.go 项目: pcarleton/vengo
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)
}
示例#2
0
文件: main.go 项目: pcarleton/vengo
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)
}