правки
This commit is contained in:
@@ -634,6 +634,14 @@ type GetPlacementsOutput struct {
|
||||
Placements []PlacementOutput `json:"placements"`
|
||||
}
|
||||
|
||||
type PlacementsPage struct {
|
||||
Items []PlacementOutput `json:"items"`
|
||||
Total int `json:"total"`
|
||||
Page int `json:"page"`
|
||||
Size int `json:"size"`
|
||||
Pages int `json:"pages"`
|
||||
}
|
||||
|
||||
type CreativePreviewOutput struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
@@ -687,10 +695,15 @@ func (c *Client) GetPlacements(
|
||||
jwt string,
|
||||
workspaceID string,
|
||||
projectID string,
|
||||
) (*GetPlacementsOutput, error) {
|
||||
path := fmt.Sprintf("api/v1/workspaces/%s/projects/%s/placements", workspaceID, projectID)
|
||||
page, size int,
|
||||
) (*PlacementsPage, error) {
|
||||
q := url.Values{}
|
||||
q.Set("page", fmt.Sprint(page))
|
||||
q.Set("size", fmt.Sprint(size))
|
||||
|
||||
var resp GetPlacementsOutput
|
||||
path := fmt.Sprintf("api/v1/workspaces/%s/projects/%s/placements?%s", workspaceID, projectID, q.Encode())
|
||||
|
||||
var resp PlacementsPage
|
||||
|
||||
err := c.do(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user