func GetAccountMedia(username string, limit uint16) ([]Media, error) {
	var count uint16
	maxID := ""
	available := true
	medias := []Media{}
	for available && count < limit {
		url := fmt.Sprintf(accountMediaURL, username, maxID)
		jsonBody, err := getJSONFromURL(url)
		if err != nil {
			return nil, err
		}
		available, _ = jsonBody["more_available"].(bool)
		items, _ := jsonBody["items"].([]interface{})
		for _, item := range items {
			if count >= limit {
				return medias, nil
			}
			count++
			itemData, err := json.Marshal(item)
			if err == nil {
				media, err := getFromAccountMediaList(itemData)
				if err == nil {
					medias = append(medias, media)
					maxID = media.ID
				}
			}
		}
	}
	return medias, nil
}
GetAccountMedia try to get slice of user's media.
Limit set how much media you need.
package instagram
import (
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
	"errors"
)
func GetAccountByUsername(username string) (Account, error) {
	url := fmt.Sprintf(accountInfoURL, username)
	data, err := getDataFromURL(url)
	if err != nil {
		return Account{}, err
	}
	account, err := getFromAccountPage(data)
	if err != nil {
		return account, err
	}
	return account, nil
}
func GetMediaByURL(url string) (Media, error) {
	code := strings.Split(url, "/")[4]
	return GetMediaByCode(code)
}
func GetMediaByCode(code string) (Media, error) {
	url := fmt.Sprintf(mediaInfoURL, code)
	data, err := getDataFromURL(url)
	if err != nil {
		return Media{}, err
	}
	media, err := getFromMediaPage(data)
	if err != nil {
		return Media{}, err
	}
	return media, nil
}