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

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

@C-Duv

Description

@C-Duv

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions