goinsta

package module
v0.0.0-...-9fca115 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2018 License: BSD-2-Clause Imports: 10 Imported by: 0

README

goinsta Build Status Go Report Card GoDoc

goinsta is a a complete instagram library purely built in GO

To use the package import the package into your machine using the command:

go get github.com/Ashwin-Rajeev/goinsta

NewInfo

NewInfo returns a new info pointer By using this pointer you can access the functions implemented by Info

func NewInfo(url, dest string) *Info

GetImage

GetImage is used to download an image from instagram link we need to provide image link, destination in which we need to download the image and the file name returnd a success flag and an error message

func GetImage(url, dest string) (bool, error)

which returns a success flag and a error meassage if the operation works correctly, it will return a true and error will be nil if the operation failed, it will return false and the corresponding error message

const (
	url         = "https://www.instagram.com/dyfgsuyswyer47477834982"
	destination = "/home/user/"
)

info := goinsta.NewInfo(url,destination)

 _,err:= info.GetImage()
if err != nil {
	log.Fatal(err)
}
		

After the successful execution you will receive a success message along with the path and name of the image downloaded

Contributing

We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high. Before proposing a change, please discuss your change by raising an issue.

License

BSD-2-Clause

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crawler

type Crawler interface {
	// contains filtered or unexported methods
}

Crawler is a abstract interface

type Info

type Info struct {
	Crawler
}

Info struct stores the image information

func NewInfo

func NewInfo(url, dest string) *Info

NewInfo returns a new info pointer By using this pointer you can access the functions implemented by Info

func (*Info) GetImage

func (i *Info) GetImage() (bool, error)

GetImage is used to download an image from instagram link we need to provide image link, destination in which we need to download the image and the file name returned a success flag and an error message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL