(self, path, api: Any = 'public', method='GET', params={}, headers: dict = None, body: Str = None)
| 3333 | return None |
| 3334 | |
| 3335 | def sign(self, path, api: Any = 'public', method='GET', params={}, headers: dict = None, body: Str = None): |
| 3336 | version = self.safe_string(api, 0) |
| 3337 | accessibility = self.safe_string(api, 1) |
| 3338 | endpoint = '/' + self.implode_params(path, params) |
| 3339 | query = self.omit(params, self.extract_params(path)) |
| 3340 | queryPost = (path == 'user/deadmanswitch') |
| 3341 | url = self.implode_hostname(self.urls['api']['rest']) |
| 3342 | if accessibility == 'private': |
| 3343 | # self.check_required_credentials() |
| 3344 | if self.apiKey is None: |
| 3345 | raise AuthenticationError(self.id + ' sign() requires an apiKey for private endpoints') |
| 3346 | headers = { |
| 3347 | 'X-Api-Key': self.apiKey, |
| 3348 | } |
| 3349 | if ((method == 'POST') or (method == 'PATCH')) and not queryPost: |
| 3350 | body = self.json(query) |
| 3351 | headers['Content-Type'] = 'application/json' |
| 3352 | url = url + '/api/' + version + endpoint |
| 3353 | if (method == 'GET' or method == 'DELETE' or queryPost) and query: |
| 3354 | url += '?' + self.urlencode_with_array_repeat(query) |
| 3355 | return {'url': url, 'method': method, 'body': body, 'headers': headers} |
nothing calls this directly
no test coverage detected