app.go
changeset 165 6fe8c96e7263
parent 162 68df3a01e1a7
child 197 485f5cfb4378
--- 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