Refactor and Improve Versioning Mechanism #190
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.
This PR has the following changes:
v1_
from the individual files, creates a directory calledv1
and moves the files in them. Example of a single file looks like:live/v1_client.py
->live/v1/client.py
v2
, the files can have consistent file names (ie client forv1
andv2
can be inclient.py
in their respective folders. This mimics versioning in the Go SDK but in the Python way since the language isn't strongly typed.V1
at the end, has been renamedLatest
. This basically points to which is Latest version of the API that is supported.deepgram/client.py
anddeepgram/clients/client.py
classes. There is a parameter to pass in the version when doing the instantiations of classes. See example below.This effectively queries
v1/projects
on the API to list available projects:When a
v2
is available, you will be able to call the following: