forked from keighl/postmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.go
More file actions
29 lines (25 loc) · 741 Bytes
/
server.go
File metadata and controls
29 lines (25 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package postmark
// GetCurrentServer gets details for the server associated
// with the currently in-use server API Key
func (client *Client) GetCurrentServer() (Server, error) {
res := Server{}
err := client.doRequest(parameters{
Method: "GET",
Path: "server",
TokenType: server_token,
}, &res)
return res, err
}
///////////////////////////////////////
///////////////////////////////////////
// EditCurrentServer updates details for the server associated
// with the currently in-use server API Key
func (client *Client) EditCurrentServer(server Server) (Server, error) {
res := Server{}
err := client.doRequest(parameters{
Method: "PUT",
Path: "server",
TokenType: server_token,
}, &res)
return res, err
}