Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@decorators.accepts(SchemaExample, query_string=False)
def func(self, **kwargs):
return kwargs
@decorators.accepts(SchemaExample)
def func(self, **kwargs):
return kwargs
@accepts(SignalID)
def delete(self, id):
self.client.delete(self.build_url('v1', 'signals/{}'.format(id)))
@accepts(SignalID)
@returns(SavedSignal)
def get(self, id):
return self.client.get(self.build_url('v1', 'signals/{}'.format(id)))
@accepts(CalendarParams)
@returns(CalendarResultSet)
def calendar(self, **params):
return self.client.get(self.build_url('v1', 'events/calendar'), params=params)
@accepts(SignalsSearchParams)
@returns(SignalResultSet)
def search(self, **params):
return self.client.get(self.build_url('v1', 'signals'), params=params)
@accepts(AnalysisParams)
@returns(AnalysisResultSet)
def analysis(self, id, **params):
return self.client.get(self.build_url('v1', 'signals/{}/analysis'.format(id)), params=params)
@accepts(GetTokenParams)
@returns(AccessToken)
def get_token(self, client_id, client_secret, scope, grant_type, **kwargs):
data = {
"grant_type": grant_type,
"scope": scope,
}
data.update(kwargs)
return self.client.post('/oauth2/token/', auth=(client_id, client_secret), data=data)