Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
update examples/utilities/mod file
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmdrz committed Jun 2, 2019
1 parent 346af49 commit 03a8b27
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/follow-tag-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"log"
"os"

"github.com/ahmdrz/goinsta"
"github.com/ahmdrz/goinsta/v2"
)

func main() {
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module github.com/ahmdrz/goinsta/v2

go 1.12
2 changes: 2 additions & 0 deletions utilities/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ package utilities
import (
"bytes"
"encoding/base64"

"github.com/ahmdrz/goinsta"
)

// ExportAsBytes exports selected *Instagram object as []byte
func ExportAsBytes(insta *goinsta.Instagram) ([]byte, error) {
buffer := &bytes.Buffer{}
err := goinsta.Export(insta, buffer)
Expand Down
4 changes: 4 additions & 0 deletions utilities/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ package utilities
import (
"bytes"
"encoding/base64"

"github.com/ahmdrz/goinsta"
)

// ImportFromBytes imports instagram configuration from an array of bytes.
//
// This function does not set proxy automatically. Use SetProxy after this call.
func ImportFromBytes(inputBytes []byte) (*goinsta.Instagram, error) {
return goinsta.ImportReader(bytes.NewReader(inputBytes))
}
Expand Down

0 comments on commit 03a8b27

Please sign in to comment.