func (c *Client) AddAgreement(name string) *AddAgreementResult {
	b, err := json.Marshal(struct {
		Name string `json:"name"`
	}{Name: name})
	if err != nil {
		return &AddAgreementResult{Err: err}
	}
	resp, err := c.do("POST", "/tribe/agreements", ContentTypeJSON, b)
	if err != nil {
		return &AddAgreementResult{Err: err}
	}
	switch resp.Meta.Type {
	case rbody.TribeAddAgreementType:
		return &AddAgreementResult{resp.Body.(*rbody.TribeAddAgreement), nil}
	case rbody.ErrorType:
		return &AddAgreementResult{Err: resp.Body.(*rbody.Error)}
	default:
		return &AddAgreementResult{Err: ErrAPIResponseMetaType}
	}
}
AddAgreement adds a tribe agreement giving an agreement name into tribe agreement list
through an HTTP POST call. A map of tribe agreements with the newly added named agreement
returns if it succeeds. Otherwise, an error is returned. Note that the newly added agreement
has no effect unless members join the agreement.
package client
import (
	"encoding/json"
	"fmt"
	"github.com/intelsdi-x/snap/mgmt/rest/v1/rbody"
)
func (c *Client) ListMembers() *ListMembersResult {
	resp, err := c.do("GET", "/tribe/members", ContentTypeJSON, nil)
	if err != nil {
		return &ListMembersResult{Err: err}
	}
	switch resp.Meta.Type {
	case rbody.TribeMemberListType:
		return &ListMembersResult{resp.Body.(*rbody.TribeMemberList), nil}
	case rbody.ErrorType:
		return &ListMembersResult{Err: resp.Body.(*rbody.Error)}
	default:
		return &ListMembersResult{Err: ErrAPIResponseMetaType}
	}
}
func (c *Client) GetMember(name string) *GetMemberResult {
	resp, err := c.do("GET", fmt.Sprintf("/tribe/member/%s", name), ContentTypeJSON, nil)
	if err != nil {
		return &GetMemberResult{Err: err}
	}
	switch resp.Meta.Type {
	case rbody.TribeMemberShowType:
		return &GetMemberResult{resp.Body.(*rbody.TribeMemberShow), nil}
	case rbody.ErrorType:
		return &GetMemberResult{Err: resp.Body.(*rbody.Error)}
	default:
		return &GetMemberResult{Err: ErrAPIResponseMetaType}
	}
}
func (c *Client) ListAgreements() *ListAgreementResult {
	resp, err := c.do("GET", "/tribe/agreements", ContentTypeJSON, nil)
	if err != nil {
		return &ListAgreementResult{Err: err}
	}
	switch resp.Meta.Type {
	case rbody.TribeListAgreementType:
		return &ListAgreementResult{resp.Body.(*rbody.TribeListAgreement), nil}
	case rbody.ErrorType:
		return &ListAgreementResult{Err: resp.Body.(*rbody.Error)}
	default:
		return &ListAgreementResult{Err: ErrAPIResponseMetaType}
	}
}