Skip to content
Snippets Groups Projects
pod_client.py 576 B
Newer Older
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .resource import API_URLS, Resource
    api_key = ''
    def __init__(self, host_url, api_key, site_id=1):
        self.host_url = host_url
        if not self.host_url:
            raise Exception('Pod host url required')
        self.api_key = api_key
        if not self.api_key:
            raise Exception('Pod api key required')
        for resource_name in API_URLS.keys():
            self.__dict__[resource_name] = Resource(self.host_url, self.api_key, resource_name, site_id)