This repository has been archived by the owner on Jun 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05bd15f
commit 8ee71f2
Showing
7 changed files
with
298 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
credentials.json | ||
creds.py | ||
|
||
|
||
# remove pycharm ide files | ||
.idea/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import json | ||
from pprint import pprint | ||
|
||
import requests | ||
from airtable import Airtable | ||
from decouple import config | ||
|
||
BASE_KEY = config('PERSONAL_AIRTABLE_BASE_KEY') | ||
API_KEY = config('PERSONAL_AIRTABLE_TOKEN') | ||
TABLE_NAME = 'Mentor Request' | ||
|
||
|
||
|
||
def get_table(table): | ||
airtable = Airtable(BASE_KEY, table, api_key=API_KEY) | ||
res = airtable.get_all() | ||
pprint(res) | ||
|
||
|
||
|
||
|
||
def test(): | ||
params = { | ||
'fields': { | ||
'Slack User': 'Allen2', | ||
'Email': 'email@email.com', | ||
'Service': ['recBxmDasLXwmVB78'], | ||
'Skillsets': ["Web (Frontend Development)"], | ||
'Additional Details': 'Details'} | ||
} | ||
|
||
headers = { | ||
'authorization': "Bearer " + API_KEY | ||
} | ||
res = requests.post("https://api.airtable.com/v0/app2p4KgQKx35WoCm/Mentor%20Request", json=params, | ||
headers=headers) | ||
print(res.content) | ||
|
||
|
||
if __name__ == '__main__': | ||
# test() | ||
get_table('Services') | ||
|
||
|
||
services_records = { | ||
'General Guidance - Slack Chat': 'recBxmDasLXwmVB78', | ||
'General Guidance - Voice Chat': 'recDyu4PMbPl7Ti58', | ||
'Pair Programming': 'recHCFAO9uNSy1WDs', | ||
'Code Review': 'recUK55xJXOfAaYNb', | ||
'Resume Review': 'recXZzUduWfaxWvSF', | ||
'Mock Interview': 'recdY4XLeN1CPz1l8' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.