Add get node links
This commit is contained in:
8
main.py
8
main.py
@@ -204,26 +204,26 @@ async def fastapi_is_curve(network: str, curve: str) -> bool:
|
||||
async def fastapi_is_pattern(network: str, pattern: str) -> bool:
|
||||
return is_pattern(network, pattern)
|
||||
|
||||
# node
|
||||
@app.get("/getnodes/")
|
||||
async def fastapi_get_nodes(network: str) -> list[str]:
|
||||
return get_nodes(network)
|
||||
|
||||
# link
|
||||
@app.get("/getlinks/")
|
||||
async def fastapi_get_links(network: str) -> list[str]:
|
||||
return get_links(network)
|
||||
|
||||
# curve
|
||||
@app.get("/getcurves/")
|
||||
async def fastapi_get_curves(network: str) -> list[str]:
|
||||
return get_curves(network)
|
||||
|
||||
# parttern
|
||||
@app.get("/getpatterns/")
|
||||
async def fastapi_get_patterns(network: str) -> list[str]:
|
||||
return get_patterns(network)
|
||||
|
||||
@app.get("/getnodelinks/")
|
||||
def get_node_links(network: str, node: str) -> list[str]:
|
||||
return get_node_links(network, node)
|
||||
|
||||
############################################################
|
||||
# title 1.[TITLE]
|
||||
############################################################
|
||||
|
||||
Reference in New Issue
Block a user