Install the PyUp library using the follow command.
pip install PyUp-LifeUp-API
You will also need to install requests since the requirements.txt isn't working currently.
pip install requests
Once pip finishes installing the PyUp Library, initialize the PyUp API like so
The PyUp class will be used as the basis for all API interactions.
You can add the other modules by adding , module-name after from pyup import PyUp.
for a more in-depth understand of the API, check it the official LifeUp API documentation.
The General class is a class of the pyup library that focuses on the most basic LifeUp API interactions.
from pyup import PyUp, General
pyup = PyUp('host_ip', 'port')
up_gen = General(pyup)returns request.Response
from pyup import PyUp, General
pyup = PyUp('host_ip', 'port')
up_gen = General(pyup)
popup_result = up_gen.toast(text='example text')the message that appears on the prompt.
str
a number from 0-6 defining the text style.
str
display duration, True = long, False = short.
str
returns request.Response
from pyup import PyUp, General
pyup = PyUp('host_ip', 'port')
up_gen = General(pyup)
reward_result = up_gen.reward(content='example text', type='coin', number=10)text that appears on the reward notification
str
reward type (must be either 'coin', 'exp' or 'item').
str
amount of reward given.
int
array of numbers greater than 0. dicates what skills recieve the exp reward.
list
the numerical id of the item the user recieves as a reward.
int
the name of the item the user recieves as a reward.
str
wether the UI notification appears or not.
bool
returns request.Response
from pyup import PyUp, General
pyup = PyUp('host_ip', 'port')
up_gen = General(pyup)
popup_result = up_gen.penality(content='example text', type='coin', number=10)text that appears on the penalty notification
str
penality type (must be either 'coin', 'exp' or 'item').
str
amount of penality taken.
int
array of numbers greater than 0. dicates what skills recieve the exp penality.
list
the numerical id of the item the user recieves as a penality.
int
the name of the item the user recieves as a penality.
str
wether the UI notification appears or not.
bool
The Task class is a class of the pyup library that focuses on task related API calls for the LifeUp API.
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.add_task()returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.complete_task()returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.give_up_task()returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.freeze_task()returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.unfreeze_task()returns request.Response
from pyup import PyUp, Task
pyup = PyUp('host_ip', 'port')
up_task = Task(pyup)
up_task.delete_task()The Shop class is a class of the pyup library that focuses on shop related API calls for the LifeUp API.
from pyup import PyUp, Shop
pyup = PyUp('host_ip', 'port')
up_shop = Shop(pyup)returns request.Response
from pyup import PyUp, Shop
pyup = PyUp('host_ip', 'port')
up_shop = Shop(pyup)
up_shop.add_item()returns request.Response
from pyup import PyUp, Shop
pyup = PyUp('host_ip', 'port')
up_shop = Shop(pyup)
up_shop.edit_item()returns request.Response
from pyup import PyUp, Shop
pyup = PyUp('host_ip', 'port')
up_shop = Shop(pyup)
up_shop.use_item()returns request.Response
from pyup import PyUp, Shop
pyup = PyUp('host_ip', 'port')
up_shop = Shop(pyup)
up_shop.edit_loot_box()The ATM class is a class of the pyup library that focuses on ATM related API calls for the LifeUp API.
from pyup import PyUp, ATM
pyup = PyUp('host_ip', 'port')
up_atm = ATM(pyup)returns request.Response
from pyup import PyUp, ATM
pyup = PyUp('host_ip', 'port')
up_atm = ATM(pyup)
up_atm.deposit()returns request.Response
from pyup import PyUp, ATM
pyup = PyUp('host_ip', 'port')
up_atm = ATM(pyup)
up_atm.withdraw()The Pomodoro class is a class of the pyup library that focuses on Pomodoro related API calls for the LifeUp API.
from pyup import PyUp, Pomodoro
pyup = PyUp('host_ip', 'port')
up_pomo = Pomodoro(pyup)returns request.Response
from pyup import PyUp, Pomodoro
pyup = PyUp('host_ip', 'port')
up_pomo = Pomodoro(pyup)
up_pomo.add_record()returns request.Response
from pyup import PyUp, Pomodoro
pyup = PyUp('host_ip', 'port')
up_pomo = Pomodoro(pyup)
up_pomo.edit_pomodoro()