add filters for courses
This commit is contained in:
@ -82,24 +82,85 @@ type ListEducationProductsParams struct {
|
||||
Offset int
|
||||
}
|
||||
|
||||
type ListEducationProductsRequest struct {
|
||||
Fingerprint string `json:"fingerPrint,omitempty"`
|
||||
ProductName string `json:"productName,omitempty"`
|
||||
AdvertisingOnly bool `json:"advertisingOnly"`
|
||||
Location string `json:"location"`
|
||||
OfferTypes []string `json:"offerTypes"`
|
||||
IsMix bool `json:"isMix"`
|
||||
MixRepeated bool `json:"mixRepeated"`
|
||||
Fields []string `json:"fields"`
|
||||
SortProperty string `json:"sortProperty"`
|
||||
SortDirection string `json:"sortDirection"`
|
||||
LearningType []string `json:"learningtype"`
|
||||
CoursesThematics []string `json:"coursesThematics"`
|
||||
NotSubIsWebinar string `json:"not-sub-isWebinar"`
|
||||
NotB2B string `json:"not-b2b"`
|
||||
type stringifiedBool string
|
||||
|
||||
Limit int `json:"limit"`
|
||||
Offset int `json:"offset"`
|
||||
func AsStringifiedBool(b bool) stringifiedBool {
|
||||
return stringifiedBool(strconv.FormatBool(b))
|
||||
}
|
||||
|
||||
// FilterLevel is a Уровень сложности
|
||||
type FilterLevel string
|
||||
|
||||
const (
|
||||
FilterLevelJunior FilterLevel = "levelJuniorNew"
|
||||
FilterLevelMiddle FilterLevel = "levelMiddleNew"
|
||||
FilterLevelChildren FilterLevel = "levelChildNew"
|
||||
)
|
||||
|
||||
// FilterTime is a срок обучения
|
||||
type FilterTime string
|
||||
|
||||
const (
|
||||
FilterTimeLessMonth FilterTime = "1" // less than month
|
||||
FilterTimeFrom1To3Month FilterTime = "2" // from month to three month
|
||||
FilterTimeFrom3To6 FilterTime = "3" // from three to six months
|
||||
FilterTimeFrom6To12 FilterTime = "4" // from six to twelve months
|
||||
FilterTimeFrom12 FilterTime = "5" // from twelve months
|
||||
)
|
||||
|
||||
// FilterFormat is a Форма обучение
|
||||
type FilterFormat string
|
||||
|
||||
const (
|
||||
FilterFormatRecord FilterFormat = "formatRecordNew"
|
||||
FilterFormatOnline FilterFormat = "formatOnlineNew"
|
||||
FilterFormatOffline FilterFormat = "formatOfflineNew"
|
||||
)
|
||||
|
||||
// FilterGraphic is a График прохождения
|
||||
type FilterGraphic string
|
||||
|
||||
const (
|
||||
FilterGraphicTimeLength FilterGraphic = "courseTimeLengthNew"
|
||||
FilterGraphicTerm FilterGraphic = "courseTimeTermNew"
|
||||
)
|
||||
|
||||
type ListEducationProductsRequest struct {
|
||||
Fingerprint string `json:"fingerPrint,omitempty"`
|
||||
ProductName string `json:"productName,omitempty"`
|
||||
Location string `json:"location"`
|
||||
OfferTypes []string `json:"offerTypes"`
|
||||
IsMix bool `json:"isMix"`
|
||||
MixRepeated bool `json:"mixRepeated"`
|
||||
Fields []string `json:"fields"`
|
||||
|
||||
// Filters
|
||||
LearningType []string `json:"learningtype"`
|
||||
CoursesThematics []string `json:"coursesThematics"`
|
||||
Organizations []string `json:"organizations"` // list of ids
|
||||
DictionatyFormatFilterNew []FilterFormat `json:"dictionaryFormatFilterNew"`
|
||||
DictionaryTimeFilter []FilterTime `json:"dictionaryTimeFilter"`
|
||||
DictionaryGraphicFilterNew []FilterGraphic `json:"dictionaryGraphicFilterNew"`
|
||||
DictionatyLevelFilterNew []FilterLevel `json:"dictionaryLevelFilterNew"`
|
||||
|
||||
// Options
|
||||
SubMentor []stringifiedBool `json:"sub-mentor"` // option with mentor
|
||||
SubTimeFree []stringifiedBool `json:"sub-timeFree"` // option with trial
|
||||
SubJobGarantSub []stringifiedBool `json:"sub-jobGarantsub"` // option for job garantee
|
||||
SubPriceFree []stringifiedBool `json:"sub-priceFree"` // only free
|
||||
SubInstallment []stringifiedBool `json:"sub-installment"` // with credit
|
||||
SubIsCourseProfession []stringifiedBool `json:"sub-isCourseProfession"` // освоить профессию с нуля
|
||||
DevelopSkills []stringifiedBool `json:"developSkills"` // развить навыки
|
||||
|
||||
NotSubIsWebinar string `json:"not-sub-isWebinar"`
|
||||
NotB2B string `json:"not-b2b"`
|
||||
AdvertisingOnly bool `json:"advertisingOnly"`
|
||||
|
||||
// Pagination and sorting
|
||||
Limit int `json:"limit"`
|
||||
Offset int `json:"offset"`
|
||||
SortProperty string `json:"sortProperty"`
|
||||
SortDirection string `json:"sortDirection"`
|
||||
}
|
||||
|
||||
type ListEducationProductsResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user