forked from keighl/postmark
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathserver.go
More file actions
21 lines (18 loc) · 584 Bytes
/
server.go
File metadata and controls
21 lines (18 loc) · 584 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package postmark
import (
"context"
)
// GetCurrentServer gets details for the server associated
// with the currently in-use server API Key
func (client *Client) GetCurrentServer(ctx context.Context) (Server, error) {
res := Server{}
err := client.get(ctx, "server", &res)
return res, err
}
// EditCurrentServer updates details for the server associated
// with the currently in-use server API Key
func (client *Client) EditCurrentServer(ctx context.Context, server Server) (Server, error) {
res := Server{}
err := client.put(ctx, "server", server, &res)
return res, err
}