MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / get_app

Method get_app

github/MainClass.py:1034–1053  ·  view source on GitHub ↗

:calls: `GET /apps/{app_slug} `_ or `GET /app `_

(self, slug: Opt[str] = NotSet)

Source from the content-addressed store, hash-verified

1032 )
1033
1034 def get_app(self, slug: Opt[str] = NotSet) -> GithubApp:
1035 """
1036 :calls: `GET /apps/{app_slug} <https://docs.github.com/en/rest/reference/apps>`_ or `GET /app <https://docs.github.com/en/rest/reference/apps>`_
1037 """
1038
1039 if slug is NotSet:
1040 # with no slug given, calling /app returns the authenticated app,
1041 # including the actual /apps/{slug}
1042 warnings.warn(
1043 "Argument slug is mandatory, calling this method without the slug argument is deprecated, please use "
1044 "github.GithubIntegration(auth=github.Auth.AppAuth(...)).get_app() instead",
1045 category=DeprecationWarning,
1046 stacklevel=2,
1047 )
1048 return GithubIntegration(**self.__requester.kwargs).get_app()
1049 else:
1050 assert isinstance(slug, str), slug
1051 # with a slug given, we can lazily load the GithubApp
1052 slug = urllib.parse.quote(slug, safe="")
1053 return github.GithubApp.GithubApp(self.__requester, {}, {"url": f"/apps/{slug}"}, completed=False)

Callers 2

setUpMethod · 0.45

Calls 1

GithubIntegrationClass · 0.90

Tested by

no test coverage detected