implement organization repo

This commit is contained in:
Aleksandr Trushkin
2024-03-24 16:51:39 +03:00
parent 88a3cae4fa
commit 9d2efcc1c4
21 changed files with 1946 additions and 456 deletions

View File

@ -31,7 +31,7 @@ type Client interface {
ListEducationalProducts(
ctx context.Context,
params ListEducationProductsParams,
) (result listEducationProductsResponse, err error)
) (result ListEducationProductsResponse, err error)
ListEducationalProductsFilterCount(
ctx context.Context,
params ListEducationProductsParams,
@ -177,7 +177,7 @@ type listEducationProductsRequest struct {
SortDirection string `json:"sortDirection"`
}
type listEducationProductsResponse struct {
type ListEducationProductsResponse struct {
Items []Course `json:"items"`
Organizations map[string]Organization `json:"organizations"`
@ -188,7 +188,7 @@ type listEducationProductsResponse struct {
func (c *client) ListEducationalProducts(
ctx context.Context,
params ListEducationProductsParams,
) (result listEducationProductsResponse, err error) {
) (result ListEducationProductsResponse, err error) {
const urlPath = "/v1/education/products"
const defaultLimit = 1
const defaultSortProp = "advertising.position"