func (c *Client) CreateContributor(sp *AuthorParams) (*Author, error) {
	if sp.OrgAlias == "" {
		return nil, fmt.Errorf("AuthorParams.OrgAlias is required.")
	}
	a := &Author{}
	env, err := c.post("/organizations/"+sp.OrgAlias+"/contributors", sp, a)
	if err != nil {
		return nil, err
	}
	var ok bool
	if a, ok = env.Data.(*Author); !ok {
		return nil, fmt.Errorf("Wrong data returned from API.")
	}
	status := env.Code
	if status != http.StatusCreated {
		if status == http.StatusBadRequest {
			return nil, fmt.Errorf("Bad request: %s", env.ErrorMessage)
		}
		return nil, fmt.Errorf("Problem creating author: %d. %s\n", status, env.ErrorMessage)
	}
	return a, nil
}
CreateContributor creates a new contributor on the given organization.
package writeas
import (
	"fmt"
	"net/http"
)
type (
	Author struct {
		User *User
		Name string `json:"name"`
		Slug string `json:"slug"`
	}
	AuthorParams struct {
		Name string `json:"name"`
		Slug string `json:"slug"`
		OrgAlias string `json:"-"`
	}
)