import json
import requests
from api_auth import APICredentials, APIParams

class GetSummaryStats:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        """
        Get summarized statistics for your assets.
        """
        self._get_summary_stats()

    def _get_summary_stats(self):
        user_id = "1234567890abcdefghijklmnopqrstu" # Replace with your user ID.
        url = "{}{}{}".format(self.host, "/api/v4/monitoring/vod-stats/owner-summary/", user_id)

        response = requests.get(
            url, params=APIParams(APICredentials()).get_params({})
        )

        if response.status_code == 200:
            print(response.json())
        else:
            print(response.status_code)

GetSummaryStats().run()