use of com.symphony.api.model.V2RoomSearchCriteria in project spring-bot by finos.
the class PodApiIT method testRoomSearch.
@ParameterizedTest
@MethodSource("setupConfigurations")
public void testRoomSearch(TestClientStrategy client) throws Exception {
StreamsApi sApi = client.getPodApi(StreamsApi.class);
V2RoomSearchCriteria criteria = new V2RoomSearchCriteria();
criteria.setQuery("Demo");
criteria.setPrivate(true);
criteria.setActive(true);
criteria.setLabels(Collections.emptyList());
criteria.setSortOrder(SortOrderEnum.BASIC);
V3RoomSearchResults res = sApi.v3RoomSearchPost(criteria, null, 0, 100);
System.out.println(res);
}
use of com.symphony.api.model.V2RoomSearchCriteria in project spring-bot by finos.
the class SymphonyConversationsImpl method loadRoomByName.
@Override
public SymphonyRoom loadRoomByName(String name) {
V2RoomSearchCriteria rsc = new V2RoomSearchCriteria();
rsc.setQuery(name);
V3RoomSearchResults res = streamsApi.v3RoomSearchPost(rsc, null, null, null);
return res.getRooms().stream().filter(r -> r.getRoomAttributes().getName().equals(name)).findFirst().map(rd -> new SymphonyRoom(rd.getRoomAttributes().getName(), rd.getRoomSystemInfo().getId())).orElse(null);
}
Aggregations