add tinybird api clients #6
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I've wanted better API clients for a while, where classes map to the actual APIs and their API concepts. These can then be used to implement higher-level abstractions like the
DataSourceclass.With #4 , it's now massively easier to develop and test this, so I went on a quest to implement the most important APIs.
The following APIs have been (partially) implemented, and can be accessed through
Client.api:/v0/datasources:client.api.datasources/v0/events:client.api.events/v0/pipes:client.api.pipes/v0/tokens:client.api.tokens/v0/variables:client.api.variablesExamples
For example, you can query a pipe using the pipes API:
Or use the HFI endpoint to append data:
Changes
verdin.apiwhich contains classes that map to APIs defined in https://www.tinybird.co/docs/api-reference/