2424 get_async_library ,
2525)
2626from ._version import __version__
27- from .resources import editors , identity , projects , automations_files , environment_classes , personal_access_tokens
27+ from .resources import projects , environment_classes , personal_access_tokens
2828from ._streaming import Stream as Stream , AsyncStream as AsyncStream
29- from ._exceptions import GitpodError , APIStatusError
29+ from ._exceptions import APIStatusError
3030from ._base_client import (
3131 DEFAULT_MAX_RETRIES ,
3232 SyncAPIClient ,
4141
4242
4343class Gitpod (SyncAPIClient ):
44- automations_files : automations_files .AutomationsFilesResource
45- editors : editors .EditorsResource
4644 environments : environments .EnvironmentsResource
47- identity : identity .IdentityResource
4845 environment_classes : environment_classes .EnvironmentClassesResource
4946 organizations : organizations .OrganizationsResource
5047 projects : projects .ProjectsResource
@@ -55,12 +52,10 @@ class Gitpod(SyncAPIClient):
5552 with_streaming_response : GitpodWithStreamedResponse
5653
5754 # client options
58- auth_token : str
5955
6056 def __init__ (
6157 self ,
6258 * ,
63- auth_token : str | None = None ,
6459 base_url : str | httpx .URL | None = None ,
6560 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
6661 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -80,18 +75,7 @@ def __init__(
8075 # part of our public interface in the future.
8176 _strict_response_validation : bool = False ,
8277 ) -> None :
83- """Construct a new synchronous gitpod client instance.
84-
85- This automatically infers the `auth_token` argument from the `GITPOD_API_KEY` environment variable if it is not provided.
86- """
87- if auth_token is None :
88- auth_token = os .environ .get ("GITPOD_API_KEY" )
89- if auth_token is None :
90- raise GitpodError (
91- "The auth_token client option must be set either by passing auth_token to the client or by setting the GITPOD_API_KEY environment variable"
92- )
93- self .auth_token = auth_token
94-
78+ """Construct a new synchronous gitpod client instance."""
9579 if base_url is None :
9680 base_url = os .environ .get ("GITPOD_BASE_URL" )
9781 if base_url is None :
@@ -108,10 +92,7 @@ def __init__(
10892 _strict_response_validation = _strict_response_validation ,
10993 )
11094
111- self .automations_files = automations_files .AutomationsFilesResource (self )
112- self .editors = editors .EditorsResource (self )
11395 self .environments = environments .EnvironmentsResource (self )
114- self .identity = identity .IdentityResource (self )
11596 self .environment_classes = environment_classes .EnvironmentClassesResource (self )
11697 self .organizations = organizations .OrganizationsResource (self )
11798 self .projects = projects .ProjectsResource (self )
@@ -138,7 +119,6 @@ def default_headers(self) -> dict[str, str | Omit]:
138119 def copy (
139120 self ,
140121 * ,
141- auth_token : str | None = None ,
142122 base_url : str | httpx .URL | None = None ,
143123 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
144124 http_client : httpx .Client | None = None ,
@@ -172,7 +152,6 @@ def copy(
172152
173153 http_client = http_client or self ._client
174154 return self .__class__ (
175- auth_token = auth_token or self .auth_token ,
176155 base_url = base_url or self .base_url ,
177156 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
178157 http_client = http_client ,
@@ -221,10 +200,7 @@ def _make_status_error(
221200
222201
223202class AsyncGitpod (AsyncAPIClient ):
224- automations_files : automations_files .AsyncAutomationsFilesResource
225- editors : editors .AsyncEditorsResource
226203 environments : environments .AsyncEnvironmentsResource
227- identity : identity .AsyncIdentityResource
228204 environment_classes : environment_classes .AsyncEnvironmentClassesResource
229205 organizations : organizations .AsyncOrganizationsResource
230206 projects : projects .AsyncProjectsResource
@@ -235,12 +211,10 @@ class AsyncGitpod(AsyncAPIClient):
235211 with_streaming_response : AsyncGitpodWithStreamedResponse
236212
237213 # client options
238- auth_token : str
239214
240215 def __init__ (
241216 self ,
242217 * ,
243- auth_token : str | None = None ,
244218 base_url : str | httpx .URL | None = None ,
245219 timeout : Union [float , Timeout , None , NotGiven ] = NOT_GIVEN ,
246220 max_retries : int = DEFAULT_MAX_RETRIES ,
@@ -260,18 +234,7 @@ def __init__(
260234 # part of our public interface in the future.
261235 _strict_response_validation : bool = False ,
262236 ) -> None :
263- """Construct a new async gitpod client instance.
264-
265- This automatically infers the `auth_token` argument from the `GITPOD_API_KEY` environment variable if it is not provided.
266- """
267- if auth_token is None :
268- auth_token = os .environ .get ("GITPOD_API_KEY" )
269- if auth_token is None :
270- raise GitpodError (
271- "The auth_token client option must be set either by passing auth_token to the client or by setting the GITPOD_API_KEY environment variable"
272- )
273- self .auth_token = auth_token
274-
237+ """Construct a new async gitpod client instance."""
275238 if base_url is None :
276239 base_url = os .environ .get ("GITPOD_BASE_URL" )
277240 if base_url is None :
@@ -288,10 +251,7 @@ def __init__(
288251 _strict_response_validation = _strict_response_validation ,
289252 )
290253
291- self .automations_files = automations_files .AsyncAutomationsFilesResource (self )
292- self .editors = editors .AsyncEditorsResource (self )
293254 self .environments = environments .AsyncEnvironmentsResource (self )
294- self .identity = identity .AsyncIdentityResource (self )
295255 self .environment_classes = environment_classes .AsyncEnvironmentClassesResource (self )
296256 self .organizations = organizations .AsyncOrganizationsResource (self )
297257 self .projects = projects .AsyncProjectsResource (self )
@@ -318,7 +278,6 @@ def default_headers(self) -> dict[str, str | Omit]:
318278 def copy (
319279 self ,
320280 * ,
321- auth_token : str | None = None ,
322281 base_url : str | httpx .URL | None = None ,
323282 timeout : float | Timeout | None | NotGiven = NOT_GIVEN ,
324283 http_client : httpx .AsyncClient | None = None ,
@@ -352,7 +311,6 @@ def copy(
352311
353312 http_client = http_client or self ._client
354313 return self .__class__ (
355- auth_token = auth_token or self .auth_token ,
356314 base_url = base_url or self .base_url ,
357315 timeout = self .timeout if isinstance (timeout , NotGiven ) else timeout ,
358316 http_client = http_client ,
@@ -402,10 +360,7 @@ def _make_status_error(
402360
403361class GitpodWithRawResponse :
404362 def __init__ (self , client : Gitpod ) -> None :
405- self .automations_files = automations_files .AutomationsFilesResourceWithRawResponse (client .automations_files )
406- self .editors = editors .EditorsResourceWithRawResponse (client .editors )
407363 self .environments = environments .EnvironmentsResourceWithRawResponse (client .environments )
408- self .identity = identity .IdentityResourceWithRawResponse (client .identity )
409364 self .environment_classes = environment_classes .EnvironmentClassesResourceWithRawResponse (
410365 client .environment_classes
411366 )
@@ -422,12 +377,7 @@ def __init__(self, client: Gitpod) -> None:
422377
423378class AsyncGitpodWithRawResponse :
424379 def __init__ (self , client : AsyncGitpod ) -> None :
425- self .automations_files = automations_files .AsyncAutomationsFilesResourceWithRawResponse (
426- client .automations_files
427- )
428- self .editors = editors .AsyncEditorsResourceWithRawResponse (client .editors )
429380 self .environments = environments .AsyncEnvironmentsResourceWithRawResponse (client .environments )
430- self .identity = identity .AsyncIdentityResourceWithRawResponse (client .identity )
431381 self .environment_classes = environment_classes .AsyncEnvironmentClassesResourceWithRawResponse (
432382 client .environment_classes
433383 )
@@ -444,12 +394,7 @@ def __init__(self, client: AsyncGitpod) -> None:
444394
445395class GitpodWithStreamedResponse :
446396 def __init__ (self , client : Gitpod ) -> None :
447- self .automations_files = automations_files .AutomationsFilesResourceWithStreamingResponse (
448- client .automations_files
449- )
450- self .editors = editors .EditorsResourceWithStreamingResponse (client .editors )
451397 self .environments = environments .EnvironmentsResourceWithStreamingResponse (client .environments )
452- self .identity = identity .IdentityResourceWithStreamingResponse (client .identity )
453398 self .environment_classes = environment_classes .EnvironmentClassesResourceWithStreamingResponse (
454399 client .environment_classes
455400 )
@@ -466,12 +411,7 @@ def __init__(self, client: Gitpod) -> None:
466411
467412class AsyncGitpodWithStreamedResponse :
468413 def __init__ (self , client : AsyncGitpod ) -> None :
469- self .automations_files = automations_files .AsyncAutomationsFilesResourceWithStreamingResponse (
470- client .automations_files
471- )
472- self .editors = editors .AsyncEditorsResourceWithStreamingResponse (client .editors )
473414 self .environments = environments .AsyncEnvironmentsResourceWithStreamingResponse (client .environments )
474- self .identity = identity .AsyncIdentityResourceWithStreamingResponse (client .identity )
475415 self .environment_classes = environment_classes .AsyncEnvironmentClassesResourceWithStreamingResponse (
476416 client .environment_classes
477417 )
0 commit comments