From 8ac44229df2133cd05b1c5b79d18529416843e95 Mon Sep 17 00:00:00 2001 From: samedamci Date: Thu, 16 Sep 2021 18:33:39 +0200 Subject: [PATCH] Add some docs --- mattebox/consts.py | 4 ++++ mattebox/helpers.py | 2 ++ mattebox/types.py | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/mattebox/consts.py b/mattebox/consts.py index db5b880..1de35a2 100644 --- a/mattebox/consts.py +++ b/mattebox/consts.py @@ -1,5 +1,9 @@ API = "http://app01.luz01.feromedia.tv" +# MatteBOX ID for NanguTV authentication. PLATFORM_ID = "8a5eaad0e39a83621c25f20b0a10d721" + +# NanguTV Client ID and Client Secret. +# Probably your ISP but tested only with this single client. CLIENT_ID = "feromedia-mobile" CLIENT_SECRET = "4SbnLL2BdBmbQ94qdPa2N0kF7Xv4fJzo" diff --git a/mattebox/helpers.py b/mattebox/helpers.py index 2854176..ae0a003 100644 --- a/mattebox/helpers.py +++ b/mattebox/helpers.py @@ -2,4 +2,6 @@ from time import time def now_timestamp() -> int: + """Return current timestamp in milliseconds (ms).""" + return int(time() * 1000) diff --git a/mattebox/types.py b/mattebox/types.py index 314ca66..538eeb9 100644 --- a/mattebox/types.py +++ b/mattebox/types.py @@ -2,6 +2,11 @@ from __future__ import annotations class Program: + """Class for single TV program or recording with basic information about it. + + Methods `from_channel_program` and `from_recording` returns class object + from data received from API.""" + name: str channel: str epg_id: str