buildSearchBody builds the request body for meeting search API.
(runtime *common.RuntimeContext, startTime, endTime string)
| 125 | |
| 126 | // buildSearchBody builds the request body for meeting search API. |
| 127 | func buildSearchBody(runtime *common.RuntimeContext, startTime, endTime string) map[string]interface{} { |
| 128 | body := map[string]interface{}{} |
| 129 | if q := strings.TrimSpace(runtime.Str("query")); q != "" { |
| 130 | body["query"] = q |
| 131 | } |
| 132 | participants := uniqueIDs(common.SplitCSV(runtime.Str("participant-ids"))) |
| 133 | organizers := common.SplitCSV(runtime.Str("organizer-ids")) |
| 134 | rooms := common.SplitCSV(runtime.Str("room-ids")) |
| 135 | if filter := buildMeetingFilter(participants, organizers, rooms, buildTimeFilter(startTime, endTime)); filter != nil { |
| 136 | body["meeting_filter"] = filter |
| 137 | } |
| 138 | return body |
| 139 | } |
| 140 | |
| 141 | func buildSearchParams(runtime *common.RuntimeContext) map[string]interface{} { |
| 142 | params := map[string]interface{}{} |