mirror of
https://github.com/jwinterm/btcTicker.git
synced 2026-10-17 05:21:25 +02:00
Fixed comments and API call in binary
This commit is contained in:
+4
-3
@@ -7,7 +7,8 @@ from kivy.properties import ObjectProperty
|
||||
from kivy.uix.textinput import TextInput
|
||||
from kivy.clock import Clock
|
||||
|
||||
import datetime
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
|
||||
from getStampTicker import GetTicker
|
||||
@@ -19,13 +20,13 @@ class BigLabel(Label):
|
||||
|
||||
|
||||
class BigTextInput(TextInput):
|
||||
""" Big label class """
|
||||
""" Big text input class """
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BigTextInput, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
class RootWidget(BoxLayout):
|
||||
"""Root Kivy accordion widget class"""
|
||||
"""Root Kivy widget class"""
|
||||
btc_multiplier_input = ObjectProperty()
|
||||
btc_amount_input = ObjectProperty()
|
||||
multiplied_btc_amount_input = ObjectProperty()
|
||||
|
||||
+2
-3
@@ -8,10 +8,9 @@ headers = {'content-type': 'application/json'}
|
||||
|
||||
|
||||
def GetTicker(serverURL=URL):
|
||||
"""Try and get last block info and return formatted text"""
|
||||
# print('Attempting {0} RPC call'.format(CheckLastBlock.__name__))
|
||||
"""Try and get bitstamp ticker info"""
|
||||
try:
|
||||
resp = requests.get(serverURL, headers=headers)
|
||||
resp = requests.get(serverURL, headers=headers, verify=False)
|
||||
output = json.loads(resp.text)
|
||||
print(output)
|
||||
last_price = float(output[u'last'])
|
||||
|
||||
Reference in New Issue
Block a user