@@ -40,6 +40,7 @@ def __init__(self, api_key: str, delivery_token: str, environment: str,
4040 total = 5 , backoff_factor = 0 , status_forcelist = [408 , 429 ]),
4141 live_preview = None ,
4242 branch = None ,
43+ early_access = None ,
4344 ):
4445 """
4546 # Class that wraps the credentials of the authenticated user. Think of
@@ -92,6 +93,7 @@ def __init__(self, api_key: str, delivery_token: str, environment: str,
9293 self .branch = branch
9394 self .retry_strategy = retry_strategy
9495 self .live_preview = live_preview
96+ self .early_access = early_access
9597 self ._validate_stack ()
9698
9799 def _validate_stack (self ):
@@ -123,6 +125,9 @@ def _validate_stack(self):
123125 'access_token' : self .delivery_token ,
124126 'environment' : self .environment
125127 }
128+ if self .early_access is not None :
129+ early_access_str = ', ' .join (self .early_access )
130+ self .headers ['x-header-ea' ] = early_access_str
126131
127132 if self .branch is not None :
128133 self .headers ['branch' ] = self .branch
@@ -141,6 +146,13 @@ def get_api_key(self):
141146 :return: api_key of the stack
142147 """
143148 return self .api_key
149+
150+ @property
151+ def get_early_access (self ):
152+ """
153+ :return: early access
154+ """
155+ return self .early_access
144156
145157 @property
146158 def get_delivery_token (self ):
0 commit comments