Skip to content

Commit

Permalink
Add support start and stop radio
Browse files Browse the repository at this point in the history
  • Loading branch information
bb4L committed Dec 14, 2019
1 parent 9c02333 commit a426e18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ idna==2.8
multidict==4.5.2
python-dotenv==0.10.3
websockets==6.0
yarl==1.3.0
yarl==1.3.0
twine
3 changes: 2 additions & 1 deletion rpiradioalarm/ApiHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class ApiHelper(object):
def __init__(self):
load_dotenv()
self.FUNCTIONS = {COMMANDS.GET_ALARMS: self.__get_alarms, COMMANDS.GET_ALARM: self.__get_alarms,
COMMANDS.CHANGE_ALARM: self.__change_alarm}
COMMANDS.CHANGE_ALARM: self.__change_alarm, COMMANDS.START_RADIO: self.__start_radio,
COMMANDS.STOP_RADIO: self.__stop_radio}

def do_command(self, cmd, args):
self.conn = HTTPConnection(os.getenv('RPI-RADIO-ALARM-URL'))
Expand Down
11 changes: 3 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
from distutils.core import setup
from setuptools import setup, find_packages, find_namespace_packages
from os import path
from setuptools import setup

# this_directory = path.abspath(path.dirname(__file__))
# with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
# long_description = f.read()

setup(
name='rpi-radio-alarm',
version='0.1.22',
version='0.2.0',
license='BSD-3',
description='rpi-radio-alarm library',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='bb4L',
author_email='39266013+bb4L@users.noreply.github.com',
url='https://github.com/bb4L/rpi-radio-alarm-pip',
# packages=['rpi-radio-alarm.helper'],
packages=['rpiradioalarm'],
keywords=['Raspberry Pi', 'radio', 'alarm'],
install_requires=[
Expand All @@ -42,3 +36,4 @@
],
include_package_data=True,
)
# python setup.py sdist && twine upload dist/*

0 comments on commit a426e18

Please sign in to comment.