Skip to content

Latest commit

 

History

History
94 lines (63 loc) · 2.4 KB

File metadata and controls

94 lines (63 loc) · 2.4 KB

EventsService

A list of all methods in the EventsService service. Click on the method name to view detailed information about that method.

Methods Description
ListEvents Retrieves a paginated list of events for the project.
GetEvent Retrieves a project event by its ID.

ListEvents

Retrieves a paginated list of events for the project.

  • HTTP Method: GET
  • Endpoint: /events

Parameters

Name Type Required Description
ctx Context Default go language context
params ListEventsRequestParams Additional request parameters

Return Type

EventCollection

Example Usage Code Snippet

import (
  "fmt"
  "encoding/json"
  "github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclientconfig"
  "github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclient"

  "github.com/magicbell/magicbell-go-project-client/pkg/events"
)

config := magicbellprojectclientconfig.NewConfig()
client := magicbellprojectclient.NewMagicbellProjectClient(config)


params := events.ListEventsRequestParams{

}

response, err := client.Events.ListEvents(context.Background(), params)
if err != nil {
  panic(err)
}

fmt.Println(response)

GetEvent

Retrieves a project event by its ID.

  • HTTP Method: GET
  • Endpoint: /events/{id}

Parameters

Name Type Required Description
ctx Context Default go language context
id string

Return Type

Event

Example Usage Code Snippet

import (
  "fmt"
  "encoding/json"
  "github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclientconfig"
  "github.com/magicbell/magicbell-go-project-client/pkg/magicbellprojectclient"

)

config := magicbellprojectclientconfig.NewConfig()
client := magicbellprojectclient.NewMagicbellProjectClient(config)

response, err := client.Events.GetEvent(context.Background(), "id")
if err != nil {
  panic(err)
}

fmt.Println(response)