user

package
v0.0.0-...-bcdd4fe Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: MIT, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:     "user",
	Short:   "Search users on Instagram",
	Example: "goinsta search user rob pike",
	Run: func(cmd *cobra.Command, args []string) {
		if len(args) == 0 {
			fmt.Println("Missing arguments. See example")
			return
		}

		inst := utils.New()

		res, err := inst.Search.User(strings.Join(args, " "))
		if err != nil {
			fmt.Println(err)
			return
		}
		if res.NumResults == 0 {
			fmt.Println("No results.")
			return
		}

		fmt.Printf("Results: %d\n", res.NumResults)
		for i := range res.Users {
			fmt.Printf("  %s\n", res.Users[i].Username)
		}
	},
}

RootCmd is used as a command line interaction with Instagram User Search.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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