Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Accounts API support (for API credit balance)? #29

Open
C-Duv opened this issue Jan 21, 2021 · 2 comments
Open

Accounts API support (for API credit balance)? #29

C-Duv opened this issue Jan 21, 2021 · 2 comments
Labels
feature-request Feature Request

Comments

@C-Duv
Copy link

C-Duv commented Jan 21, 2021

(Sorry, second issue in short period of time :))

The SEMrush Accounts API is not supported, it seems only the Analytics API is (which is totally OK).

I know the client tracks it's usage of the API (via Silktide\Capiture\ApiUsageTracker) but I wanted something to get current credit balance from the server.

So I started to add a getApiUnitsBalance() in Silktide\SemRushApi\Client and a dedicated type in Silktide\SemRushApi\Data\Type but the current core code does not support multiple endpoints (accounts API uses http://fr.semrush.com/users/countapiunits.html) so my changes would be too huge or hacky. I stopped and used Guzzle to directly call the endpoint by hand.

Leaving this door opened to see if such feature is acceptable and if someone want to open a PR to add it.

@dochne
Copy link
Contributor

dochne commented Jan 25, 2021

Hi again! We're unlikely to implement this anytime soon as it's outside the scope of what we use SEMRush for at the moment (and we're all kind of busy atm! :D)

I suspect doing this properly would result in a v2 of the API with a better interface.

I'll tag it as a feature request so we keep it in mind if we come back to wanting to implement this with extended functionality 👍

@dochne dochne added the feature-request Feature Request label Jan 25, 2021
@C-Duv
Copy link
Author

C-Duv commented Jan 25, 2021

Thanks for the answer: I get it (also busy here).

By looking at the implementation (single endpoint) I was also under the impression it was out of scope (for your use): Let's not break or over-engineer anything for what a simple GET query can solve/workaround 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants