Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "info", Short: "Get partial info about user", Example: "goinsta user info robpike", Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { fmt.Println("Missing arguments. See example.") return } inst := utils.New() user, err := inst.Profiles.ByName(args[0]) if err != nil { id, _ := strconv.ParseInt(args[0], 10, 64) user, err = inst.Profiles.ByID(id) if err != nil { fmt.Printf("Invalid username or id '%s': %s\n", args[0], err) return } } user.FriendShip() fmt.Printf(` Username: %s Fullname: %s ID: %d ProfilePicURL: %s Email: %s Phone number: %s Biography: %s Followers: %d Following: %d You follow him/her: %v `, user.Username, user.FullName, user.ID, user.ProfilePicURL, user.PublicEmail, user.PublicPhoneNumber, user.Biography, user.FollowerCount, user.FollowingCount, user.Friendship.Following) }, }
RootCmd is used as a command line interaction with Instagram get user info method.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.