func ExampleApi_IterateMedia() {
	api := New("client_id", "client_secret", "access_token", true)
	mediasResponse, err := api.GetUserRecentMedia("user-id", nil)
	if err != nil {
		panic(err)
	}
	doneChan := make(chan bool)
	mediaIter, errChan := api.IterateMedia(mediasResponse, doneChan  )
	for media := range mediaIter {
		processMedia(media)
		if isDone(media) {
			close(doneChan)  
			break
		}
	}
	if err := <-errChan; err != nil {
		panic(err)
	}
}
ExampleApi_IterateMedia shows how to use iteration on a channel to avoid the complex pagination calls
package instagram
import (
	"fmt"
	"net/url"
)
func ExampleNew() {
	apiAuthenticatedUser := New("client_key", "secret", "", true)
	if ok, err := apiAuthenticatedUser.VerifyCredentials(); !ok {
		panic(err)
	}
	fmt.Println("Successfully created instagram.Api with user credentials")
}
func ExampleApi_GetUser() {
	api := New("client_id", "client_secret", "access_token", true)
	userResponse, err := api.GetUser("user-id", nil)
	if err != nil {
		panic(err)
	}
	user := userResponse.User
	processUser(user)
}
func ExampleApi_GetUserSearch_Params() {
	api := New("", "client_secret", "access_token", true)
	params := url.Values{}
	params.Set("count", "5")  
	params.Set("q", "jack")   
	usersResponse, err := api.GetUserSearch(params)
	if err != nil {
		panic(err)
	}
	for _, user := range usersResponse.Users {
		processUser(&user)
	}
}
func ExampleApi_GetUserRecentMedia() {
	api := New("client_id", "client_secret", "access_token", true)
	params := url.Values{}
	params.Set("count", "3")  
	params.Set("max_timestamp", "1466809870")
	params.Set("min_timestamp", "1396751898")
	mediasResponse, err := api.GetUserRecentMedia(ccistulli_id, params)
	if err != nil {
		panic(err)
	}
	for _, media := range mediasResponse.Medias {
		processMedia(&media)
	}
}