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.
Merge pull request #1 from AllenAnthes/app-migration
App migration
- Loading branch information
Showing
13 changed files
with
694 additions
and
68 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/ | ||
|
||
|
File renamed without changes.
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
Binary file not shown.
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import logging | ||
from src.app import run_bot | ||
|
||
from src.flask_endpoint import start_server | ||
|
||
if __name__ == '__main__': | ||
run_bot(delay=1) | ||
# run_bot(delay=1) | ||
start_server() |
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
Oops, something went wrong.