I'm needing to make some requests that you haven't implemented yet - namely posting a new status. Doing so is relatively easy with the following code:
$response = $api->client->request(
"POST",
$api->buildURL('statuses', []),
[
'headers' => [
'Authorization' => "Bearer {$api->accessToken}",
],
'form_params' => [
'status' => "Status test",
]
]
);
However the client property and buildURL method of Fundevogel\Mastodon\Api needs to be made public for this to be possible. You could also provide a public getClient() method if you're worried about the property needing to be read only.
I understand your API once implemented will be much cleaner than what I have above, but it's nice to be able to make custom requests without needing to wait for the implementation.
I'm needing to make some requests that you haven't implemented yet - namely posting a new status. Doing so is relatively easy with the following code:
However the
clientproperty andbuildURLmethod ofFundevogel\Mastodon\Apineeds to be made public for this to be possible. You could also provide a publicgetClient()method if you're worried about the property needing to be read only.I understand your API once implemented will be much cleaner than what I have above, but it's nice to be able to make custom requests without needing to wait for the implementation.