From be61e1a411014656ee7050407817ab8b8efefba3 Mon Sep 17 00:00:00 2001 From: Mackensie Alvarez Date: Sat, 11 Jul 2020 15:26:36 -0400 Subject: [PATCH] Fixed typo in test and readme --- README.md | 24 ++++++++++++------------ tests/TdameritradeTest.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 60e712b..8363a15 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ To create a OAuth URL, you will need to use: To refresh the token and create another access_token. //Create client - $client = Tdameritrade::create($access_token, $refresh_token); + $client = new Tdameritrade('access_token', 'refresh_token'); //Refresh token $response = $client->refreshToken(); @@ -55,7 +55,7 @@ The package is written to use every class inside of **/src/api** as a function. This will return a list of all the accounts ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); $accounts = $client->accounts()->list(); ``` @@ -64,7 +64,7 @@ $accounts = $client->accounts()->list(); This will return all the information for one account. **Requires account_id** ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); $accounts = $client->accounts()->get('account_id'); ``` @@ -75,7 +75,7 @@ $accounts = $client->accounts()->get('account_id'); This will return a list of tickers based on the symbol entered ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->instruments()->search('TESLA'); ``` @@ -85,7 +85,7 @@ $response = $client->instruments()->search('TESLA'); This wil return one ticker information ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $accounts = $client->instruments()->get('TSLA'); ``` @@ -97,7 +97,7 @@ $accounts = $client->instruments()->get('TSLA'); This will return a list of all the different market hours ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->market()->list(); ``` @@ -107,7 +107,7 @@ $response = $client->market()->list(); This wil return one market information ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->market()->get('SPY.X'); ``` @@ -120,7 +120,7 @@ $response = $client->market()->get('SPY.X'); This wil return a list of symbols that are moving ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->movers()->get('SPY.X', 'up', 'percent'); ``` @@ -132,9 +132,9 @@ $response = $client->movers()->get('SPY.X', 'up', 'percent'); This will return a list of quotes for the ticker ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response -$response = $client->price()->history('TSLA', 'end_date', 'start_date'); +$response = $client->price()->history('TSLA', Carbon::now(), Carbon::now()); ``` ### Get Quote @@ -142,7 +142,7 @@ $response = $client->price()->history('TSLA', 'end_date', 'start_date'); This wil return the quote for one ticker ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->price()->quote('TSLA'); ``` @@ -152,7 +152,7 @@ $response = $client->price()->quote('TSLA'); This wil return the quote for multiple tickers ``` //Create client -$client = Tdameritrade::create($access_token, $refresh_token); +$client = new Tdameritrade('access_token', 'refresh_token'); //Response $response = $client->price()->quotes(['AAPL', 'FB']); ``` diff --git a/tests/TdameritradeTest.php b/tests/TdameritradeTest.php index c12b1b8..84c2cca 100644 --- a/tests/TdameritradeTest.php +++ b/tests/TdameritradeTest.php @@ -41,7 +41,7 @@ public function testReturnsInstruments() public function testReturnsMakert() { $client = new Tdameritrade('access_token', 'refresh_token'); - $this->assertInstanceOf(Market::class, $client->makert()); + $this->assertInstanceOf(Market::class, $client->market()); } public function testReturnsMovers()