All URIs are relative to http://localhost:3000/api
| Method | HTTP request | Description |
|---|---|---|
| EventsGet | Get /events | Get Events related to Semaphore and projects you are part of |
| EventsLastGet | Get /events/last | Get last 200 Events related to Semaphore and projects you are part of |
| InfoGet | Get /info | Fetches information about semaphore |
| PingGet | Get /ping | PING test |
| WsGet | Get /ws | Websocket handler |
[]Event EventsGet(ctx).Execute()
Get Events related to Semaphore and projects you are part of
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/client-api/semaphore-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.EventsGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.EventsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EventsGet`: []Event
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.EventsGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiEventsGetRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json, text/plain; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Event EventsLastGet(ctx).Execute()
Get last 200 Events related to Semaphore and projects you are part of
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/client-api/semaphore-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.EventsLastGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.EventsLastGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `EventsLastGet`: []Event
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.EventsLastGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiEventsLastGetRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json, text/plain; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InfoType InfoGet(ctx).Execute()
Fetches information about semaphore
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/client-api/semaphore-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.InfoGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.InfoGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InfoGet`: InfoType
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.InfoGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiInfoGetRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json, text/plain; charset=utf-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string PingGet(ctx).Execute()
PING test
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/client-api/semaphore-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultAPI.PingGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PingGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PingGet`: string
fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PingGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiPingGetRequest struct via the builder pattern
string
No authorization required
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WsGet(ctx).Execute()
Websocket handler
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/client-api/semaphore-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.DefaultAPI.WsGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.WsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiWsGetRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]