Exemplo n.º 1
0
// Get actions
func GetStatus(s *session.Session) (count Counts) {

	response, err := s.Get("https://api.instagram.com/v1/users/" + s.GetId())
	if err != nil {
		panic(err)
	}

	//Decode request
	var status Status
	decoder := json.NewDecoder(response.Body)
	err = decoder.Decode(&status)
	if err != nil {
		panic(err)
	}

	count = status.Data.Counts
	return
}
Exemplo n.º 2
0
func GetFollowers(s *session.Session) Users {
	return getPeople(s, "https://api.instagram.com/v1/users/"+s.GetId()+"/followed-by")
}