MCPcopy Index your code
hub / github.com/sdv-dev/SDV / get

Method get

scripts/github_client.py:54–81  ·  view source on GitHub ↗

Get a specific value of a resource from an endpoint in the GitHub API. Args: github_org (str): The name of the GitHub organization to search. repo (str): The name of the repository to search. endpoint (str):

(
        self,
        github_org: str,
        repo: str,
        endpoint: str,
        query_params: dict | None = None,
        timeout: int | None = None,
    )

Source from the content-addressed store, hash-verified

52 return url
53
54 def get(
55 self,
56 github_org: str,
57 repo: str,
58 endpoint: str,
59 query_params: dict | None = None,
60 timeout: int | None = None,
61 ):
62 """Get a specific value of a resource from an endpoint in the GitHub API.
63
64 Args:
65 github_org (str):
66 The name of the GitHub organization to search.
67 repo (str):
68 The name of the repository to search.
69 endpoint (str):
70 The endpoint for the resource. For example, issues/{issue_number}. This means we'd
71 be making a request to https://api.github.com/repos/{github_org}/{repo}/issues/{issue_number}.
72 query_params (dict):
73 A dictionary mapping any query parameters to the desired value. Defaults to None.
74 timeout (int):
75 How long to wait before the request times out. Defaults to None.
76
77 Returns:
78 requests.models.Response
79 """
80 url = self._construct_url(github_org, repo, endpoint)
81 return requests.get(url, headers=self.headers, params=query_params, timeout=timeout)
82
83 def post(self, github_org: str, repo: str, endpoint: str, payload: dict):
84 """Post to an endpooint in the GitHub API.

Callers 15

_get_issues_by_milestoneFunction · 0.95
install_minimumFunction · 0.80
_find_addonsFunction · 0.80
_add_child_rowsMethod · 0.80
_enforce_table_sizeMethod · 0.80
_sample_childrenMethod · 0.80
_finalizeMethod · 0.80
_finalizeMethod · 0.80
__init__Method · 0.80
from_dictMethod · 0.80

Calls 1

_construct_urlMethod · 0.95