Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make API request functions protected #124

Open
ainsleyclark opened this issue Nov 16, 2024 · 0 comments
Open

Make API request functions protected #124

ainsleyclark opened this issue Nov 16, 2024 · 0 comments

Comments

@ainsleyclark
Copy link

ainsleyclark commented Nov 16, 2024

Hi,

It would be useful for consumers to extend the API class for integrating other requests such as /trade-account.

The functions that are currently in the API class are set to private.

It would be good to make all of them protected for easier extensibility. Currently, the API class is only instantiated, not extended so I don't think this would have any major impact on the current design.

private function request( $path, $method = 'GET', $body = null ) {

private function validate_remote_result( $url, $result ) {

private function get( $path, $parameters = null ) {

private function patch( $path, array $body = null ) {

private function put( $path, array $body = null ) {

private function post( $path, array $body = null ) {

As well as the settings:

private $global_settings;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant