gondole.go
changeset 33 bce8b17415ae
parent 26 dbc7755fbcca
child 34 69711df3beac
equal deleted inserted replaced
32:c28f7e417146 33:bce8b17415ae
     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)