summaryrefslogtreecommitdiffstats
path: root/cmd/x.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/x.go')
-rw-r--r--cmd/x.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/cmd/x.go b/cmd/x.go
index 3164b23..0820b27 100644
--- a/cmd/x.go
+++ b/cmd/x.go
@@ -78,8 +78,7 @@ func init() {
}
func runXHistorySearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -129,8 +128,7 @@ func runXTweetsSearch(cmd *cobra.Command, args []string) error {
}
func runXFirstFollowers(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -146,8 +144,7 @@ func runXFirstFollowers(cmd *cobra.Command, args []string) error {
}
func runXNotableFollowers(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -163,9 +160,8 @@ func runXNotableFollowers(cmd *cobra.Command, args []string) error {
}
func runXReplies(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
limit, _ := cmd.Flags().GetInt("limit")
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {
@@ -185,9 +181,8 @@ func runXReplies(cmd *cobra.Command, args []string) error {
}
func runXSearch(cmd *cobra.Command, args []string) error {
- apiKey, _ := cmd.Flags().GetString("api-key")
limit, _ := cmd.Flags().GetInt("limit")
- cfg := config.New().WithAPIKey(apiKey)
+ cfg := config.New()
c, err := client.New(cfg)
if err != nil {