Commit b08e6606 authored by Alexander Lercher's avatar Alexander Lercher

Merge branch 'feature/discovery-input' into feature/semantic-linking-refactoring

parents 54c8a12d 2dcda56b
......@@ -28,3 +28,39 @@ paths:
responses:
200:
description: "Successful echo of request data"
/graphinfo:
get:
operationId: "rest.graphinfo.get"
tags:
- "GraphInfo"
summary: "Get info about clustered nodes"
description: "Returns multiple metrics for all nodes created by analyzing and clustering the blockchain traces"
parameters: []
responses:
200:
description: "Successful operation"
schema:
$ref: "#/definitions/NodeInfo"
definitions:
NodeInfo:
type: "object"
properties:
label:
type: string
centrality:
type: number
adjacencies:
type: integer
degree:
type: number
betweenness:
type: object
properties:
to_node:
type: integer
value:
type: number
betweenness_centrality:
type: number
\ No newline at end of file
class NodeInfo:
'''Contains information about the individual nodes in the generated graph'''
label = None
centrality = None
adjacencies = None
degree = None
betweenness = None
betweenness_centrality = None
def __init__(self):
self.label = 'Node123'
self.centrality = 0
self.adjacencies = 0
self.degree = 0
self.betweenness = None
self.betweenness_centrality = 0
from flask import request, Response
from initialdemo.NodeInfo import NodeInfo
import pickle as json
def get():
# TODO return real graph infos
ni = NodeInfo()
return [ni.__dict__]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment