/**
  * Gets the venue path for the current venu.
  *
  * @return \Marks\Stockfighter\Paths\Venue
  * @throws StockfighterSolutionException
  */
 public function venue()
 {
     if ($this->venue) {
         return $this->stockfighter->venue($this->venue);
     } else {
         throw new StockfighterSolutionException('Cannot call venue() on a command where a venue has not been set.');
     }
 }
Example #2
0
 /**
  * Gets the communicator for the current stockfighter instance.
  *
  * @return \Marks\Stockfighter\Contracts\APICommunicatorContract
  */
 public function communicator()
 {
     return $this->stockfighter->getCommunicator();
 }
 /**
  * Gets headers for any request to the API.
  *
  * @return array
  */
 protected function getHeaders()
 {
     return ['X-Starfighter-Authorization' => $this->stockfighter->getApiKey()];
 }