forked from maso0310/linebot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataBaseGet.py
More file actions
25 lines (21 loc) · 849 Bytes
/
DataBaseGet.py
File metadata and controls
25 lines (21 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#===============這些是LINE提供的功能套組,先用import叫出來=============
from linebot import (LineBotApi, WebhookHandler)
from linebot.exceptions import (InvalidSignatureError)
from linebot.models import *
#===============LINEAPI=============================================
#======這裡是匯入資料庫=====
#import firebase_admin
from firebase import firebase
url = "https://eggrollbase.firebaseio.com/"
fb = firebase.FirebaseApplication(url, None)
Price = fb.get('/Product', None)
print("資料庫找到以下的價位")
for price in Price:
print(Price[price]['Name'])
print(Price[price]['Price'])
Setting = fb.get('/Settings', None)
print("資料庫找到以下的設定")
for setting in Setting:
print(Setting[setting]['Type'])
print(Setting[setting]['Response'])
#======這裡是匯入資料庫=====