From 582c481d3266c6b91ac38d21ba56ec40d5130069 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Sat, 25 May 2019 18:29:46 -0700 Subject: [PATCH] stub new twitter api stuff --- routes/console.php | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/routes/console.php b/routes/console.php index 75dd0cd..2d2a548 100644 --- a/routes/console.php +++ b/routes/console.php @@ -13,6 +13,42 @@ use Illuminate\Foundation\Inspiring; | */ -Artisan::command('inspire', function () { +Artisan::command('inspire', function() { $this->comment(Inspiring::quote()); })->describe('Display an inspiring quote'); + + +/* +Artisan::command('score', function(){ + + $tweet = App\Tweet::where(['id'=>27])->first(); + $score = $tweet->mission->score($tweet->team); + + event(new App\Events\ScoreUpdatedEvent($tweet->team, + $tweet->mission, $score, $tweet->mission->complete($tweet->team), $tweet->team->total_score())); + + $this->comment("Score: $score"); + +}); +*/ + +Artisan::command('get_tweet', function(){ + + $id = '883471631200296961'; + $tweet = Twitter::getTweet($id); + + $this->comment(json_encode($tweet)); + +}); + + +Artisan::command('add_webhook', function(){ + + $response = Twitter::post('/account_activity/all/:env_name/webhooks.json', [ + 'url' => '' + ]); + + $response = Twitter::post('/account_activity/all/prod/subscriptions.json'); + +}); +