mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 17:12:05 -04:00
* add endpoints for Mailboxes:
- PATCH mailboxes/{id}
- DELETE mailboxes/{id}
- POST mailboxes
* refactor the pkg/jmap and groupware framework to systematically
return a jmap.State out-of-band of the per-method payloads, since
they are almost always present in JMAP responses, which lead to the
artificial creation of a lot of composed struct types just to also
return the State; on the downside, it adds yet another return
parameter
28 lines
992 B
Go
28 lines
992 B
Go
package jmap
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/opencloud-eu/opencloud/pkg/log"
|
|
)
|
|
|
|
func (j *Client) ParseICalendarBlob(accountId string, session *Session, ctx context.Context, logger *log.Logger, acceptLanguage string, blobIds []string) (CalendarEventParseResponse, SessionState, State, Language, Error) {
|
|
logger = j.logger("ParseICalendarBlob", session, logger)
|
|
|
|
cmd, err := j.request(session, logger,
|
|
invocation(CommandCalendarEventParse, CalendarEventParseCommand{AccountId: accountId, BlobIDs: blobIds}, "0"),
|
|
)
|
|
if err != nil {
|
|
return CalendarEventParseResponse{}, "", "", "", err
|
|
}
|
|
|
|
return command(j.api, logger, ctx, session, j.onSessionOutdated, cmd, acceptLanguage, func(body *Response) (CalendarEventParseResponse, State, Error) {
|
|
var response CalendarEventParseResponse
|
|
err = retrieveResponseMatchParameters(logger, body, CommandCalendarEventParse, "0", &response)
|
|
if err != nil {
|
|
return CalendarEventParseResponse{}, "", err
|
|
}
|
|
return response, "", nil
|
|
})
|
|
}
|