File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 66from  googleapiclient .discovery  import  build 
77from  github  import  Github , GithubException 
88
9- def  authenticate_google (credentials_file ):
10-      """ 
11-     Authenticate and create a Google Sheets API client. 
9+ def  authenticate_google (credentials_file : str ) ->  googleapiclient .discovery .Resource :
10+      """Authenticate and create a Google Sheets API client. 
1211
1312    This function reads a Google service account credentials file to authenticate 
1413    and build a client for accessing the Google Sheets API.  
14+      
1515    Args: 
16-         credentials_file (str): The path to the Google service account JSON credentials file.  
17-         GOOGLE_CREDENTIALS stored securely as GitHub Secret on the mc2-centerbot account 
16+         credentials_file: The path to the Google service account JSON credentials file. 
1817
1918    Returns: 
20-         googleapiclient.discovery.Resource: An authenticated client object for interacting 
21-         with the Google Sheets API. 
19+         An authenticated client object for interacting with the Google Sheets API. 
2220     
2321    """ 
2422    creds  =  Credentials .from_service_account_file (credentials_file , scopes = ["https://www.googleapis.com/auth/spreadsheets.readonly" ])
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments