Skip to content

Commit

Permalink
add eventuser
Browse files Browse the repository at this point in the history
  • Loading branch information
ppone committed Oct 1, 2021
1 parent f1f2a56 commit d064931
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion event.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,22 @@ func (c *Event) List(filter *invdendpoint.Filter, sort *invdendpoint.Sort) (Even
}

func (c *Event) Retrieve(id int64) (*Event, error) {
endpoint := invdendpoint.EventEndpoint + "/" + strconv.FormatInt(id, 10)
endpoint := invdendpoint.EventEndpoint + "/" + strconv.FormatInt(id, 10) + "?include=user"

eventEndpoint := new(invdendpoint.Event)

event := &Event{c.Connection, eventEndpoint}

_, err := c.retrieveDataFromAPI(endpoint, event)
if err != nil {
return nil, err
}

return event, nil
}

func (c *Event) RetrieveWithUser(id int64) (*Event, error) {
endpoint := invdendpoint.EventEndpoint + "/" + strconv.FormatInt(id, 10) + "?include=user"

eventEndpoint := new(invdendpoint.Event)

Expand Down

0 comments on commit d064931

Please sign in to comment.