func GetMedia(s *session.Session, id string) Posts { params := map[string]string{"MIN_TIMESTAMP": utils.SixHoursAgo(), "COUNT": "3"} response, err := s.GetParamed("https://api.instagram.com/v1/users/"+id+"/media/recent/", params) if err != nil { panic(err) } //Decode request var posts Posts decoder := json.NewDecoder(response.Body) err = decoder.Decode(&posts) if err != nil { panic(err) } return posts }