示例#1
0
文件: jimm.py 项目: frankban/theblues
    def __init__(self, url, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the JIMM API.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url)
        self.timeout = timeout
示例#2
0
文件: plans.py 项目: johnsca/theblues
    def __init__(self, url, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the Plan API.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url) + PLAN_VERSION + '/'
        self.timeout = timeout
    def __init__(self, url, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the identity manager (IdM) API.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url)
        self.timeout = timeout
示例#4
0
    def __init__(self, url, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the Terms Service API.
        @param timeout How long to wait in seconds before timing out a request;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url) + TERMS_VERSION + '/'
        self.timeout = timeout
示例#5
0
    def __init__(self, url, idm_user, idm_password, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the identity manager (IdM) API.
        @param idm_user The user name for the IdM.
        @param idm_password The password for the IdM.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url)
        self.auth = (idm_user, idm_password)
        self.timeout = timeout
示例#6
0
    def __init__(self, url, idm_user, idm_password, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the identity manager (IdM) API.
        @param idm_user The user name for the IdM.
        @param idm_password The password for the IdM.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url)
        self.auth = (idm_user, idm_password)
        self.timeout = timeout
示例#7
0
    def __init__(self, url, orgId, recordType, timeout=DEFAULT_TIMEOUT):
        """Initializer.

        @param url The url to the Support server.
        @param orgId the organization Id for SalesForce.
        @param recordType the record type.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        """
        self.url = ensure_trailing_slash(url)
        self.orgId = orgId
        self.recordType = recordType
        self.timeout = timeout
示例#8
0
    def __init__(self, url, timeout=DEFAULT_TIMEOUT, client=None):
        """Initializer.

        @param url The url to the Terms Service API.
        @param timeout How long to wait in seconds before timing out a request;
            a value of None means no timeout.
        @param client (httpbakery.Client) holds a context for making http
        requests with macaroons.
        """
        self.url = ensure_trailing_slash(url) + TERMS_VERSION + '/'
        self.timeout = timeout
        if client is None:
            client = httpbakery.Client()
        self._client = client
示例#9
0
    def __init__(self,
                 url,
                 timeout=DEFAULT_TIMEOUT,
                 client=None,
                 cookies=None):
        """Initializer.

        @param url The url to the JIMM API.
        @param timeout How long to wait before timing out a request in seconds;
            a value of None means no timeout.
        @param client (httpbakery.Client) holds a context for making http
        requests with macaroons.
        @param cookies (which act as dict) holds cookies to be sent with the
        requests.
        """
        self.url = ensure_trailing_slash(url)
        self.timeout = timeout
        self.cookies = cookies
        if client is None:
            client = httpbakery.Client()
        self._client = client
示例#10
0
    def __init__(self, url):
        """Initializer.

        @param url The url to the Plan API.
        """
        self.url = ensure_trailing_slash(url) + PLAN_VERSION + '/'
示例#11
0
    def __init__(self, url):
        """Initializer.

        @param url The url to the Terms Service API.
        """
        self.url = ensure_trailing_slash(url) + TERMS_VERSION + '/'
示例#12
0
    def __init__(self, url):
        """Initializer.

        @param url The url to the JEM API.
        """
        self.url = ensure_trailing_slash(url)