palantir.api.EyeOfSauronAPI
- class palantir.api.EyeOfSauronAPI
Deals with authentication and requests to eyeOfSauron API
- __init__()
Methods
__init__()fillHeaders(headers)getAccessToken()Returns and sets a token to the accessToken attribute.
getRefreshToken()Returns and sets a token to the refreshToken attribute.
getResources(uri[, resources])Executes a GET HTTP request to eyeOfSauron API.
makeHeadersAuth([headers])Adds 'Authorization' key with a Bearer token to headers.
postResources(uri[, payload])Executes a POST HTTP request to eyeOfSauron API.
request(uri, method[, payload, resources, ...])Executes a POST HTTP request to eyeOfSauron API.
sendAlert(channelType, alertCode, detail, ...)transformURI(uri)Attributes
ALERT_INFRAALERT_SIAPI_URLEMAIL_CHANNELEXTERNAL_APIINVALID_CREDENTIALSREDMINE_CHANNELRESPONSE_FORMATSERVER_ERROR