Open tristancaron opened 9 years ago
Hello,
I haven't found an example using this method, so I tried by my self. But it doesn't work.
ptxService := &PtxService{} ptzService := &PtzService{} apiPtx, err := endpoints.RegisterService(ptxService, "ptx", "v1", "Ptx API", true) if err != nil { panic(err.Error()) } apiPtz, err := endpoints.RegisterServiceWithDefaults(ptzService) if err != nil { panic(err.Error()) } registerPtx := func(orig, name, method, path, desc string) { m := apiPtx.MethodByName(orig) if m == nil { panic("No methods found.") } i := m.Info() i.Name, i.HTTPMethod, i.Path, i.Desc = name, method, path, desc } registerPtz := func(orig, name, method, path, desc string) { m := apiPtz.MethodByName(orig) if m == nil { panic("No methods found.") } i := m.Info() i.Name, i.HTTPMethod, i.Path, i.Desc = name, method, path, desc } registerPtx("Connect", "connect", "GET", "connect", "Connect.") registerPtz("Estimation", "ptz.estimation", "GET", "ptz/estimation", "Get some informations.") endpoints.HandleHTTP()
It's a bug, or I'm missing something?
What do you mean by "it doesn't work" do you get any errors? Please describe.
Hello,
I haven't found an example using this method, so I tried by my self. But it doesn't work.
It's a bug, or I'm missing something?