Skip to content

Commit

Permalink
sort
Browse files Browse the repository at this point in the history
  • Loading branch information
vtopc committed Oct 25, 2024
1 parent d88c9b0 commit 519cb67
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import (
"github.com/mailgun/errors"
)

type MetricsPagination struct {
// Colon-separated value indicating column name and sort direction e.g. 'domain:asc'.
Sort string `json:"sort"`
// The number of items to skip over when satisfying the request. To get the first page of data set skip to zero. Then increment the skip by the limit for subsequent calls.
Skip int `json:"skip"`
// The maximum number of items returned in the response.
Limit int `json:"limit"`
// The total number of items in the query result set.
Total int `json:"total"`
}

// ListMetrics returns domain/account metrics.
//
// NOTE: Only for v1 API. To use the /v1 version define MG_URL in the environment variable
Expand Down Expand Up @@ -43,17 +54,6 @@ func (mg *MailgunImpl) ListMetrics(opts MetricsOptions) (*MetricsIterator, error
}, nil
}

type MetricsPagination struct {
// Colon-separated value indicating column name and sort direction e.g. 'domain:asc'.
Sort string `json:"sort"`
// The number of items to skip over when satisfying the request. To get the first page of data set skip to zero. Then increment the skip by the limit for subsequent calls.
Skip int `json:"skip"`
// The maximum number of items returned in the response.
Limit int `json:"limit"`
// The total number of items in the query result set.
Total int `json:"total"`
}

type MetricsIterator struct {
opts MetricsOptions
req *httpRequest
Expand Down

0 comments on commit 519cb67

Please sign in to comment.