worthless-launcher/worthless/classes/launcher/iconotherlink.py
tretrauit a7ddd0c49a
Object-oriented programming
All launcher functions are now return an object instead of a dict
2022-01-29 23:25:03 +07:00

10 lines
295 B
Python

class IconOtherLink:
def __init__(self, title, url):
self.title = title
self.url = url
@staticmethod
def from_dict(data) -> 'IconOtherLink':
"""Creates a launcher icon other link from a dictionary."""
return IconOtherLink(data["title"], data["url"])