Skip to content

Commit 176ee7b

Browse files
committed
examples in --help flag
1 parent 3582008 commit 176ee7b

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

cli/root.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ func CreateRootCommand(config *config.Config, auth *auth.Auth) *cobra.Command {
1616
var rootCmd = &cobra.Command{
1717
Use: "xurl [flags] URL",
1818
Short: "Auth enabled curl-like interface for the X API",
19-
Long: `A command-line tool for making authenticated requests to the X API.`,
19+
Long: `A command-line tool for making authenticated requests to the X API.
20+
21+
Examples:
22+
basic requests xurl /2/users/me
23+
xurl -X POST /2/tweets -d '{"text":"Hello world!"}'
24+
xurl -H "Content-Type: application/json"/2/tweets
25+
authentication xurl --auth oauth2 /2/users/me
26+
xurl --auth oauth1 /2/users/me
27+
xurl --auth app /2/users/me
28+
media and streaming xurl media upload path/to/video.mp4
29+
xurl /2/tweets/search/stream --auth app
30+
xurl -s /2/users/me`,
2031
Args: func(cmd *cobra.Command, args []string) error {
2132
return nil
2233
},

0 commit comments

Comments
 (0)