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

Function build_paginated_response

api/integrations/github/client.py:74–96  ·  view source on GitHub ↗
(
    results: list[dict[str, Any]],
    response: requests.Response,
    total_count: int | None = None,
    incomplete_results: bool | None = None,
)

Source from the content-addressed store, hash-verified

72
73
74def build_paginated_response(
75 results: list[dict[str, Any]],
76 response: requests.Response,
77 total_count: int | None = None,
78 incomplete_results: bool | None = None,
79) -> dict[str, Any]:
80 data: dict[str, Any] = {
81 "results": results,
82 }
83
84 if response.links.get("prev"):
85 data["previous"] = response.links.get("prev")
86
87 if response.links.get("next"):
88 data["next"] = response.links.get("next")
89
90 if total_count:
91 data["total_count"] = total_count
92
93 if incomplete_results:
94 data["incomplete_results"] = incomplete_results
95
96 return data
97
98
99def create_github_issue(

Callers 3

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…