Search in sources :

Example 1 with UsersApi

use of com.symphony.api.pod.UsersApi in project spring-bot by finos.

the class KoreAIBridgeFactoryImpl method koreAIEventHandler.

public StreamEventConsumer koreAIEventHandler(KoreAIRequester requester, ApiInstance api, KoreAIInstanceProperties props) {
    UsersApi usersApi = api.getPodApi(UsersApi.class);
    UserV2 u = usersApi.v2UserGet(null, null, api.getIdentity().getEmail(), null, true);
    long id = 0;
    if (u != null) {
        id = u.getId();
    }
    return new KoreAIEventHandler(api.getIdentity(), id, requester, om, props.isOnlyAddressed());
}
Also used : UsersApi(com.symphony.api.pod.UsersApi) UserV2(com.symphony.api.model.UserV2)

Example 2 with UsersApi

use of com.symphony.api.pod.UsersApi in project spring-bot by finos.

the class PodApiIT method testUserLookup.

@ParameterizedTest
@MethodSource("setupConfigurations")
public void testUserLookup(TestClientStrategy client) throws Exception {
    UsersApi uApi = client.getPodApi(UsersApi.class);
    UserV2 u = uApi.v2UserGet(null, null, client.getIdentity().getEmail(), null, false);
    System.out.println(u);
    Assertions.assertTrue(u.getDisplayName().contains("Symphony Practice"));
}
Also used : UsersApi(com.symphony.api.pod.UsersApi) UserV2(com.symphony.api.model.UserV2) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

UserV2 (com.symphony.api.model.UserV2)2 UsersApi (com.symphony.api.pod.UsersApi)2 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1