func (inst *Instagram) Save() error {
	home := os.Getenv("HOME")
	if home == "" {
		home = os.Getenv("home")  
	}
	return inst.Export(filepath.Join(home, ".goinsta"))
}
Save exports config to ~/.goinsta
package goinsta
import (
	"crypto/tls"
	"encoding/json"
	"io"
	"io/ioutil"
	"net/http"
	"net/http/cookiejar"
	neturl "net/url"
	"os"
	"path/filepath"
	"strconv"
	"time"
)
type Instagram struct {
	user string
	pass string
	dID string
	uuid string
	rankToken string
	token string
	pid string
	adid string
	Profiles *Profiles
	Account *Account
	Search *Search
	Timeline *Timeline
	Activity *Activity
	Inbox *Inbox
	Feed *Feed
	Contacts *Contacts
	c *http.Client
}
func (inst *Instagram) SetDeviceID(id string) {
	inst.dID = id
}
func (inst *Instagram) SetUUID(uuid string) {
	inst.uuid = uuid
}
func (inst *Instagram) SetPhoneID(id string) {
	inst.pid = id
}
func New(username, password string) *Instagram {
	jar, _ := cookiejar.New(nil)
	inst := &Instagram{
		user: username,
		pass: password,
		dID: generateDeviceID(
			generateMD5Hash(username + password),
		),
		uuid: generateUUID(),  
		pid:  generateUUID(),
		c: &http.Client{
			Transport: &http.Transport{
				Proxy: http.ProxyFromEnvironment,
			},
			Jar: jar,
		},
	}
	inst.init()
	return inst
}
func (inst *Instagram) init() {
	inst.Profiles = newProfiles(inst)
	inst.Activity = newActivity(inst)
	inst.Timeline = newTimeline(inst)
	inst.Search = newSearch(inst)
	inst.Inbox = newInbox(inst)
	inst.Feed = newFeed(inst)
	inst.Contacts = newContacts(inst)
}
func (inst *Instagram) SetProxy(url string, insecure bool) error {
	uri, err := neturl.Parse(url)
	if err == nil {
		inst.c.Transport = &http.Transport{
			Proxy: http.ProxyURL(uri),
			TLSClientConfig: &tls.Config{
				InsecureSkipVerify: insecure,
			},
		}
	}
	return err
}
func (inst *Instagram) UnsetProxy() {
	inst.c.Transport = nil
}