equal
deleted
inserted
replaced
2 |
2 |
3 import () |
3 import () |
4 import ( |
4 import ( |
5 "github.com/sendgrid/rest" |
5 "github.com/sendgrid/rest" |
6 "fmt" |
6 "fmt" |
|
7 "errors" |
7 ) |
8 ) |
8 |
9 |
9 const ( |
10 const ( |
10 APIVersion = "0.0" |
11 APIVersion = "0.0" |
11 |
12 |
12 APIEndpoint = "/api/v1" |
13 APIEndpoint = "/api/v1" |
13 |
14 |
14 NoRedirect = "urn:ietf:wg:oauth:2.0:oob" |
15 NoRedirect = "urn:ietf:wg:oauth:2.0:oob" |
|
16 ) |
|
17 |
|
18 var ( |
|
19 ErrAlreadyRegistered = errors.New("App already registered") |
15 ) |
20 ) |
16 |
21 |
17 // prepareRequest insert all pre-defined stuff |
22 // prepareRequest insert all pre-defined stuff |
18 func (g *Gondole) prepareRequest(what string) (req rest.Request) { |
23 func (g *Gondole) prepareRequest(what string) (req rest.Request) { |
19 endPoint := APIEndpoint + fmt.Sprintf("/%s/", what) |
24 endPoint := APIEndpoint + fmt.Sprintf("/%s/", what) |