Skip to content

Commit

Permalink
some comments in airtable
Browse files Browse the repository at this point in the history
  • Loading branch information
floptical committed Feb 7, 2024
1 parent c373a7d commit 2c891a2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions databridge_etl_tools/airtable/airtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def __init__(self, app_id:str, api_key:str, table_name:str, s3_bucket:str, s3_ke
self.csv_path = f'/tmp/{self.table_name}.csv'

def get_fieldnames(self):

'''Get field names with an initial request, but if get_fields was passed
then filter for only those.'''
request_stmt = f'https://api.airtable.com/v0/{self.app_id}/{self.table_name}?maxRecords={self.rows_per_page}'

if self.get_fields:
Expand Down Expand Up @@ -53,10 +54,7 @@ def get_fieldnames(self):
return fieldnames

def get_records(self, offset=None):
#if 'offset' in kwargs.keys():
# offset = kwargs['offset']
#else:
# offset = None
'''Recursive function to grab records.'''

request_stmt = f'https://api.airtable.com/v0/{self.app_id}/{self.table_name}?maxRecords={self.rows_per_page}'

Expand Down

0 comments on commit 2c891a2

Please sign in to comment.