Esempio n. 1
0
 def pages(self) -> Iterable[List[dict]]:
     """Iterate over pages returned from the endpoint"""
     data = self._initial_request()
     yield data["results"]
     while data["next"]:
         data = get_json(data["next"], base_url="")
         if data["results"]:
             yield data["results"]
Esempio n. 2
0
def paginated_output_data(environment_uid: str, graph_uid: str,
                          store_name: str):
    return get_json(
        Endpoints.OUTPUT_DATA,
        params={
            "environment_uid": environment_uid,
            "graph_uid": graph_uid,
            "store_name": store_name,
        },
    )
Esempio n. 3
0
def paginated_execution_events(environment_uid: str, graph_uid: str,
                               node_id: str):
    return get_json(
        Endpoints.EXECUTION_EVENTS,
        params={
            "environment_uid": environment_uid,
            "graph_uid": graph_uid,
            "node_id": node_id,
        },
    )
Esempio n. 4
0
def paginated_webhook_urls(
    environment_uid: str,
    graph_uid: str,
):
    return get_json(
        Endpoints.WEBHOOKS,
        params={
            "environment_uid": environment_uid,
            "graph_uid": graph_uid
        },
    )
Esempio n. 5
0
def get_graph_by_uid(graph_uid: str) -> dict:
    return get_json(Endpoints.graphs_latest(graph_uid))
Esempio n. 6
0
def get_graph_by_slug(organization_uid: str, slug: str) -> dict:
    return get_json(Endpoints.graph_by_slug(organization_uid, slug))
Esempio n. 7
0
def get_graph_version_by_id(graph_version_uid) -> dict:
    return get_json(Endpoints.graph_version_by_id(graph_version_uid))
Esempio n. 8
0
def paginated_graphs(organization_uid: str):
    return get_json(Endpoints.graphs_list(organization_uid))
Esempio n. 9
0
def paginated_graph_components():
    """All public components"""
    return get_json(Endpoints.COMPONENTS_LIST)
Esempio n. 10
0
def get_environment_by_name(organization_uid: str, name: str) -> dict:
    return get_json(Endpoints.environment_by_slug(organization_uid, name))
Esempio n. 11
0
def paginated_environments(environment_uid: str):
    return get_json(Endpoints.environments_list(environment_uid))
Esempio n. 12
0
def get_environment_by_id(environment_uid: str) -> dict:
    return get_json(Endpoints.environment_by_id(environment_uid))
Esempio n. 13
0
def get_organization_by_name(name: str) -> dict:
    return get_json(Endpoints.organization_by_slug(name))
Esempio n. 14
0
def paginated_organizations():
    return get_json(Endpoints.ORGANIZATIONS_LIST)
Esempio n. 15
0
def get_organization_by_id(organization_uid: str) -> dict:
    return get_json(Endpoints.organization_by_id(organization_uid))