ethereum / node-crawler

Attempts to crawl the Ethereum network of valid Ethereum execution nodes and visualizes them in a nice web dashboard.

Home Page:https://www.ethernets.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API docs outdated

b-m-f opened this issue · comments

/docs/api.md is outdated.

Actual endpoints

defer wg.Done()
	router := mux.NewRouter().StrictSlash(true)
	router.HandleFunc("/", func(rw http.ResponseWriter, r *http.Request) { rw.Write([]byte("Hello")) })
	router.HandleFunc("/v1/dashboard", a.handleDashboard).Queries("filter", "{filter}")
	router.HandleFunc("/v1/dashboard", a.handleDashboard)
	fmt.Println("Start serving on port 10000")
	http.ListenAndServe(":10000", router)

Example output

{"clients":[{"name":"eth2","count":505},{"name":"geth","count":327},{"name":"tmp","count":320},{"name":"go-opera","count":33},{"name":"bor","count":9},{"name":"quai","count":7},{"name":"besu","count":7},{"name":"erigon","count":5},{"name":"coregeth","count":5},{"name":"go-photon","count":4},{"name":"getd","count":2},{"name":"thor","count":1},{"name":"ronin","count":1},{"name":"multigeth","count":1},{"name":"gubiq","count":1},{"name":"godin","count":1},{"name":"gexp","count":1},{"name":"drkchain","count":1}],"languages":[{"name":"","count":825},{"name":"go","count":399},{"name":"java","count":7}],"operatingSystems":[{"name":"","count":825},{"name":"linux","count":403},{"name":"windows","count":3}],"versions":null,"countries":[{"name":"United States","count":360},{"name":"Germany","count":273},{"name":"","count":119},{"name":"Finland","count":103},{"name":"Netherlands","count":66},{"name":"Canada","count":43},{"name":"France","count":42},{"name":"Singapore","count":27},{"name":"United Kingdom","count":25},{"name":"Russia","count":25},{"name":"Japan","count":24},{"name":"Hong Kong","count":16},{"name":"Ireland","count":13},{"name":"Australia","count":13},{"name":"Austria","count":9},{"name":"South Korea","count":8},{"name":"Switzerland","count":6},{"name":"Ukraine","count":5},{"name":"China","count":5},{"name":"Turkey","count":4},{"name":"Brazil","count":4},{"name":"Vietnam","count":3},{"name":"Sweden","count":3},{"name":"Norway","count":3},{"name":"Italy","count":3},{"name":"Bulgaria","count":3},{"name":"United Arab Emirates","count":2},{"name":"Thailand","count":2},{"name":"Taiwan","count":2},{"name":"Spain","count":2},{"name":"Philippines","count":2},{"name":"New Zealand","count":2},{"name":"Chile","count":2},{"name":"South Africa","count":1},{"name":"Seychelles","count":1},{"name":"Portugal","count":1},{"name":"Malaysia","count":1},{"name":"Lithuania","count":1},{"name":"Kyrgyzstan","count":1},{"name":"India","count":1},{"name":"Egypt","count":1},{"name":"Czechia","count":1},{"name":"Croatia","count":1},{"name":"Belgium","count":1},{"name":"Argentina","count":1}]}

That document was done for a different reason, which we decided to drop, we should definitely update it with the existing api, sorry for this