func (c *Client) DeleteAgreement(name string) *DeleteAgreementResult {
	resp, err := c.do("DELETE", fmt.Sprintf("/tribe/agreements/%s", name), ContentTypeJSON, nil)
	if err != nil {
		return &DeleteAgreementResult{Err: err}
	}
	switch resp.Meta.Type {
	case rbody.TribeDeleteAgreementType:
		return &DeleteAgreementResult{resp.Body.(*rbody.TribeDeleteAgreement), nil}
	case rbody.ErrorType:
		return &DeleteAgreementResult{Err: resp.Body.(*rbody.Error)}
	default:
		return &DeleteAgreementResult{Err: ErrAPIResponseMetaType}
	}
}
DeleteAgreement removes a tribe agreement giving an agreement name from the tribe agreement list
through an HTTP DELETE call. A map of tribe agreements with the specified agreement removed returns
if it succeeds. Otherwise, an error is returned. Note deleting an agreement removes the agreement
from the tribe entirely for all the members of 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}
	}
}
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}
	}
}