Add 'website' parameter to application registration
authorMikael Berthe <mikael@lilotux.net>
Mon, 01 May 2017 14:54:57 +0200
changeset 165 6fe8c96e7263
parent 164 bc53768d9c8c
child 166 6c1d017e6208
Add 'website' parameter to application registration
app.go
--- a/app.go	Mon May 01 06:34:53 2017 +0000
+++ b/app.go	Mon May 01 14:54:57 2017 +0200
@@ -46,7 +46,7 @@
 }
 
 // NewApp registers a new application with a given instance
-func NewApp(name string, scopes []string, redirectURI, instanceName string) (mc *Client, err error) {
+func NewApp(name, website string, scopes []string, redirectURI, instanceName string) (mc *Client, err error) {
 	instanceURL, err := buildInstanceURL(instanceName)
 	if err != nil {
 		return nil, err
@@ -60,6 +60,9 @@
 
 	params := make(apiCallParams)
 	params["client_name"] = name
+	if website != "" {
+		params["website"] = website
+	}
 	params["scopes"] = strings.Join(scopes, " ")
 	if redirectURI != "" {
 		params["redirect_uris"] = redirectURI