Skip to content

Commit

Permalink
Merge branch 'master' into dev/main
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalarico committed Sep 24, 2017
2 parents 54de3cb + 7feebdf commit 786bb6e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion airtable/airtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
>>> airtable = Airtable('base_key', 'table_name')
>>> airtable.get_all()
[{{'fields': {{...}}, ...}}]
[{id:'rec123asa23', fields': {'Column': 'Value'}, ...}]
Examples:
>>> airtable.get_all(view='ViewName')
>>> airtable.search('ColumnA', 'SeachValue')
>>> airtable.insert({'First Name', 'John'})
""" #

Expand Down
3 changes: 2 additions & 1 deletion airtable/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def __init__(self, api_key=None):
try:
self.api_key = api_key or os.environ['AIRTABLE_API_KEY']
except KeyError:
raise KeyError('AIRTABLE_API_KEY not found')
raise KeyError('Api Key not found. Pass api_key as a kwarg \
or set an env var AIRTABLE_API_KEY with your key')

def __call__(self, request):
request.headers.update({'Authorization': 'Bearer {}'.format(self.api_key)})
Expand Down

0 comments on commit 786bb6e

Please sign in to comment.