def get()

in src/mapillary/models/client.py [0:0]


    def get(self, url: str = None, params: dict = {}):
        """
        Make GET requests to both mapillary main endpoints

        :param url: The specific path of the request URL
        :type url: str

        :param params: Query parameters to be attached to the URL (Dict)
        :type params: dict
        """
        # Check if an endpoint is specified.
        if url is None:
            logger.error("You need to specify an endpoint!")
            return

        # Determine Authentication method based on the requested endpoint
        if "https://graph.mapillary.com" in url:
            self.session.headers.update(
                {"Authorization": f"OAuth {self.__access_token}"}
            )
        else:
            params["access_token"] = params.get("access_token", self.__access_token)

        return self._initiate_request(url=url, method="GET", params=params)