def get_warnings()

in libmozdata/lando.py [0:0]


    def get_warnings(self, revision_id, diff_id):
        """
        Gets a list of warnings
        """
        response = requests.get(
            self.api_url,
            params={
                "revision_id": revision_id,
                "diff_id": diff_id,
                "group": "LINT",
            },
            headers={
                "X-Phabricator-API-Key": self.api_key,
                "User-Agent": self.USER_AGENT,
            },
        )
        if response.status_code != 200:
            raise Exception(
                f"Failed to get warnings for revision_id {revision_id} and diff_id {diff_id} with error {response.status_code}:\n{response.text}"
            )

        return response.json()