From 0ee04445ec1d234a2201fd76caa6169247b959bd Mon Sep 17 00:00:00 2001 From: Yuu Kobayashi Date: Thu, 8 Mar 2018 23:49:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Habe=20einen=20Test=20gef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maintest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 maintest.php diff --git a/maintest.php b/maintest.php new file mode 100644 index 0000000..e1ae8e4 --- /dev/null +++ b/maintest.php @@ -0,0 +1,22 @@ +load(); + $client = new Client([ + $_ENV['CONSUMER_KEY'], + $_ENV['CONSUMER_SECRET'], + $_ENV['ACCESS_TOKEN'], + $_ENV['ACCESS_TOKEN_SECRET'], + ]); + $words = implode(' ', array_slice($argv, 1)); + $client->post('statuses/update', [ + 'status' => "@java_shit 👉👉👉 {$words}ðŸĪ” 👈👈👈 こãŪč‹ąčŠžæ•™ãˆãĶ〜〜〜 🙏🐷ðŸĶ‚💖😀", + ]); + } +} + +(new MainTest)->testMain(); From 3cfd164123c8f5e77fb070531244d1eed1b0ed89 Mon Sep 17 00:00:00 2001 From: Yuu Kobayashi Date: Fri, 9 Mar 2018 00:09:23 +0900 Subject: [PATCH 2/2] Habe aktualisiert --- maintest.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/maintest.php b/maintest.php index e1ae8e4..9ebc352 100644 --- a/maintest.php +++ b/maintest.php @@ -1,22 +1,29 @@ load(); $client = new Client([ - $_ENV['CONSUMER_KEY'], - $_ENV['CONSUMER_SECRET'], - $_ENV['ACCESS_TOKEN'], - $_ENV['ACCESS_TOKEN_SECRET'], + getenv('CONSUMER_KEY'), + getenv('CONSUMER_SECRET'), + getenv('ACCESS_TOKEN'), + getenv('ACCESS_TOKEN_SECRET'), ]); $words = implode(' ', array_slice($argv, 1)); - $client->post('statuses/update', [ - 'status' => "@java_shit 👉👉👉 {$words}ðŸĪ” 👈👈👈 こãŪč‹ąčŠžæ•™ãˆãĶ〜〜〜 🙏🐷ðŸĶ‚💖😀", - ]); + try { + $client->post('statuses/update', [ + 'status' => "@java_shit 👉👉👉 {$words}ðŸĪ” 👈👈👈 こãŪč‹ąčŠžæ•™ãˆãĶ〜〜〜 🙏🐷ðŸĶ‚💖😀", + ]); + } catch (\RuntimeException $e) { + error_log($e->getMessage()); + } } } -(new MainTest)->testMain(); +(new MainTest)->test();