MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / get_api_token

Method get_api_token

api/integrations/slack/views.py:42–50  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 queryset = Environment.objects.none()
41
42 def get_api_token(self) -> str:
43 environment = Environment.objects.get(
44 api_key=self.kwargs["environment_api_key"]
45 )
46 try:
47 config = SlackConfiguration.objects.get(project=environment.project)
48 except ObjectDoesNotExist as e:
49 raise SlackConfigurationDoesNotExist() from e
50 return config.api_token # type: ignore[no-any-return]
51
52 def list(self, request, *args, **kwargs): # type: ignore[no-untyped-def]
53 api_token = self.get_api_token()

Callers 1

listMethod · 0.95

Calls 2

getMethod · 0.45

Tested by

no test coverage detected