-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from larseijman/institutional-fund-endpoints
Added institutional fund endpoints
- Loading branch information
Showing
33 changed files
with
1,638 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Cik extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\Cik::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class CikList extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\CikList::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class CikSearch extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\CikSearch::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class CusipMapper extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\CusipMapper::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class EtfCountryWeightings extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\EtfCountryWeightings::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class EtfHolder extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\EtfHolder::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class EtfSectorWeightings extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\EtfSectorWeightings::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class Form13F extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\Form13F::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class InstitutionalHolder extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\InstitutionalHolder::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class MutualFundHolder extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\MutualFundHolder::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\Facades\InstitutionalFunds; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
class SecRssFeed extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Leijman\FmpApiSdk\InstitutionalFunds\SecRssFeed::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\InstitutionalFunds; | ||
|
||
use Leijman\FmpApiSdk\Contracts\Fmp; | ||
use Leijman\FmpApiSdk\Exceptions\InvalidData; | ||
use Leijman\FmpApiSdk\Requests\BaseRequest; | ||
|
||
class Cik extends BaseRequest | ||
{ | ||
const ENDPOINT = 'cik/{cik}'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $id; | ||
|
||
/** | ||
* Create constructor. | ||
* | ||
* @param Fmp $api | ||
*/ | ||
public function __construct(Fmp $api) | ||
{ | ||
parent::__construct($api); | ||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
protected function getFullEndpoint(): string | ||
{ | ||
return str_replace('{cik}', $this->id, self::ENDPOINT); | ||
} | ||
|
||
/** | ||
* @param string $id | ||
* | ||
* @return Cik | ||
*/ | ||
public function setCik(string $id): self | ||
{ | ||
$this->id = $id; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool|void | ||
* @throws InvalidData | ||
*/ | ||
protected function validateParams(): void | ||
{ | ||
if (empty($this->id)) { | ||
throw InvalidData::invalidDataProvided('Please provide a CIK code to the query!'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\InstitutionalFunds; | ||
|
||
use Leijman\FmpApiSdk\Contracts\Fmp; | ||
use Leijman\FmpApiSdk\Requests\BaseRequest; | ||
|
||
class CikList extends BaseRequest | ||
{ | ||
const ENDPOINT = 'cik_list'; | ||
|
||
/** | ||
* Create constructor. | ||
* | ||
* @param Fmp $api | ||
*/ | ||
public function __construct(Fmp $api) | ||
{ | ||
parent::__construct($api); | ||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
protected function getFullEndpoint(): string | ||
{ | ||
return self::ENDPOINT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\InstitutionalFunds; | ||
|
||
use Leijman\FmpApiSdk\Contracts\Fmp; | ||
use Leijman\FmpApiSdk\Exceptions\InvalidData; | ||
use Leijman\FmpApiSdk\Requests\BaseRequest; | ||
|
||
class CikSearch extends BaseRequest | ||
{ | ||
const ENDPOINT = 'cik-search/{name}'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $name; | ||
|
||
/** | ||
* Create constructor. | ||
* | ||
* @param Fmp $api | ||
*/ | ||
public function __construct(Fmp $api) | ||
{ | ||
parent::__construct($api); | ||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
protected function getFullEndpoint(): string | ||
{ | ||
return str_replace('{name}', $this->name, self::ENDPOINT); | ||
} | ||
|
||
/** | ||
* @param string $name | ||
* | ||
* @return CikSearch | ||
*/ | ||
public function setName(string $name): self | ||
{ | ||
$this->name = $name; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool|void | ||
* @throws InvalidData | ||
*/ | ||
protected function validateParams(): void | ||
{ | ||
if (empty($this->name)) { | ||
throw InvalidData::invalidDataProvided('Please provide a name to the query!'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
namespace Leijman\FmpApiSdk\InstitutionalFunds; | ||
|
||
use Leijman\FmpApiSdk\Contracts\Fmp; | ||
use Leijman\FmpApiSdk\Exceptions\InvalidData; | ||
use Leijman\FmpApiSdk\Requests\BaseRequest; | ||
|
||
class CusipMapper extends BaseRequest | ||
{ | ||
const ENDPOINT = 'cusip/{cusip}'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $cusip; | ||
|
||
/** | ||
* Create constructor. | ||
* | ||
* @param Fmp $api | ||
*/ | ||
public function __construct(Fmp $api) | ||
{ | ||
parent::__construct($api); | ||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
protected function getFullEndpoint(): string | ||
{ | ||
return str_replace('{cusip}', $this->cusip, self::ENDPOINT); | ||
} | ||
|
||
/** | ||
* @param string $cusip | ||
* | ||
* @return CusipMapper | ||
*/ | ||
public function setCusip(string $cusip): self | ||
{ | ||
$this->cusip = $cusip; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* @return bool|void | ||
* @throws InvalidData | ||
*/ | ||
protected function validateParams(): void | ||
{ | ||
if (empty($this->cusip)) { | ||
throw InvalidData::invalidDataProvided('Please provide a cusip to the query!'); | ||
} | ||
} | ||
} |
Oops, something went wrong.