gitcode-api 1.1.0__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/PKG-INFO +1 -1
  2. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/_client.py +6 -0
  3. gitcode_api-1.1.1/gitcode_api/_models.py +3076 -0
  4. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/_shared.py +5 -5
  5. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/account.py +60 -46
  6. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/collaboration.py +83 -81
  7. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/misc.py +5 -7
  8. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/repositories.py +198 -117
  9. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api.egg-info/PKG-INFO +1 -1
  10. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/pyproject.toml +2 -2
  11. gitcode_api-1.1.1/tests/test_models.py +31 -0
  12. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_resources_account.py +5 -5
  13. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_resources_collaboration.py +38 -5
  14. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_resources_misc.py +2 -2
  15. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_resources_repositories.py +4 -4
  16. gitcode_api-1.1.0/gitcode_api/_models.py +0 -272
  17. gitcode_api-1.1.0/tests/test_models.py +0 -16
  18. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/LICENSE +0 -0
  19. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/README.md +0 -0
  20. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/__init__.py +0 -0
  21. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/_base_client.py +0 -0
  22. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/_exceptions.py +0 -0
  23. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api/resources/__init__.py +0 -0
  24. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api.egg-info/SOURCES.txt +0 -0
  25. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api.egg-info/dependency_links.txt +0 -0
  26. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api.egg-info/requires.txt +0 -0
  27. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/gitcode_api.egg-info/top_level.txt +0 -0
  28. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/setup.cfg +0 -0
  29. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_base_client.py +0 -0
  30. {gitcode_api-1.1.0 → gitcode_api-1.1.1}/tests/test_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitcode-api
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: Easy to use Python SDK for the GitCode REST API, community-maintained.
5
5
  Author-email: Hugo Huang <hugo@hugohuang.com>
6
6
  License-Expression: MIT
@@ -140,6 +140,9 @@ class GitCode(SyncAPIClient):
140
140
  self.search = SearchResource(self)
141
141
  self.oauth = OAuthResource(self)
142
142
 
143
+ def __enter__(self) -> "GitCode":
144
+ return self
145
+
143
146
 
144
147
  class AsyncGitCode(AsyncAPIClient):
145
148
  """Asynchronous GitCode API client.
@@ -235,3 +238,6 @@ class AsyncGitCode(AsyncAPIClient):
235
238
  self.orgs = AsyncOrgsResource(self)
236
239
  self.search = AsyncSearchResource(self)
237
240
  self.oauth = AsyncOAuthResource(self)
241
+
242
+ async def __aenter__(self) -> "AsyncGitCode":
243
+ return self