report.go
changeset 156 70aadba26338
parent 155 0c581e0108da
child 159 408aa794d9bb
equal deleted inserted replaced
155:0c581e0108da 156:70aadba26338
    12 
    12 
    13 	"github.com/sendgrid/rest"
    13 	"github.com/sendgrid/rest"
    14 )
    14 )
    15 
    15 
    16 // GetReports returns the current user's reports
    16 // GetReports returns the current user's reports
       
    17 // (I don't know if the limit options are used by the API server.)
    17 func (mc *Client) GetReports(lopt *LimitParams) ([]Report, error) {
    18 func (mc *Client) GetReports(lopt *LimitParams) ([]Report, error) {
    18 	var reports []Report
    19 	var reports []Report
    19 	if err := mc.apiCall("reports", rest.Get, nil, lopt, nil, &reports); err != nil {
    20 	if err := mc.apiCall("reports", rest.Get, nil, lopt, nil, &reports); err != nil {
    20 		return nil, err
    21 		return nil, err
    21 	}
    22 	}