From 420143c83bee854b38948ed1408f0be6d7409db2 Mon Sep 17 00:00:00 2001 From: Chris Gmyr Date: Thu, 18 Oct 2018 16:14:05 -0400 Subject: [PATCH] add artisan command to get twitter lists --- .../app/Console/Commands/TwitterLists.php | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 20181018/twitter/laravel-base/app/Console/Commands/TwitterLists.php diff --git a/20181018/twitter/laravel-base/app/Console/Commands/TwitterLists.php b/20181018/twitter/laravel-base/app/Console/Commands/TwitterLists.php new file mode 100644 index 0000000..a7ca26a --- /dev/null +++ b/20181018/twitter/laravel-base/app/Console/Commands/TwitterLists.php @@ -0,0 +1,47 @@ +get('lists/ownerships', ['user_id' => (int)config('services.twitter.user')]); + + $this->table(['id', 'name'], collect(data_get($lists, 'lists', []))->map(function ($list) { + return [$list->id, $list->name]; + })->toArray()); + } +}