Exemplo n.º 1
0
    def get_transaction(self, id: str):
        endpoint = inspect.currentframe().f_code.co_name
        url = f"{self.url_base}/{endpoint}"
        args = locals()
        query = build_query(args)
        if query is None:
            raise Exception("Must provide at least one query parameter")

        return get_resp(f"{url}?{query}")
Exemplo n.º 2
0
 def get_abi_snapshot(
     self,
     contract: str,
     block: int = None,
     limit: int = None,
 ) -> requests.models.Response:
     endpoint = inspect.currentframe().f_code.co_name
     url = f"https://{self.server}/{self.api_version}/{endpoint}?contract={contract}"
     if block is not None:
         url += f"&block={int(block)}"
     if limit is not None:
         self.limit = limit
     return get_resp(url)
Exemplo n.º 3
0
    def get_schedule(
        self,
        producer: str = None,
        key: str = None,
        after: str = None,
        before: str = None,
        version: int = None,
    ):
        endpoint = inspect.currentframe().f_code.co_name
        url = f"{self.url_base}/{endpoint}"
        args = locals()
        query = build_query(args)
        if query is None:
            raise Exception("Must provide at least one query parameter")

        return get_resp(f"{url}?{query}")
Exemplo n.º 4
0
    def get_deltas(
        self,
        limit: int = None,
        skip: int = None,
        code: str = None,
        scope: str = None,
        table: str = None,
        payer: str = None,
    ) -> requests.models.Response:
        endpoint = inspect.currentframe().f_code.co_name
        url = f"{self.url_base}/{endpoint}"
        args = locals()
        query = build_query(args)
        if query is None:
            raise Exception("Must provide at least one query parameter")

        return get_resp(f"{url}?{query}")
Exemplo n.º 5
0
    def get_actions(
        self,
        limit: int = None,
        skip: int = None,
        account: str = None,
        track: int = None,
        filter: str = None,
        sort: str = None,
        after: str = None,
        before: str = None,
        simple: bool = None,
        noBinary: bool = None,
        checkLib: bool = None,
    ) -> requests.models.Response:
        endpoint = inspect.currentframe().f_code.co_name
        url = f"{self.url_base}/{endpoint}"
        args = locals()
        query = build_query(args)
        if query is None:
            raise Exception("Must provide at least one query parameter")

        return get_resp(f"{url}?{query}")