public void CanGetUserInfo() { var userId = 42494; var client = new HipchatClient(); var userInfo = client.GetUserInfo(userId); Assert.NotNull(userInfo); }
public UpdateUserTests() { HipchatApiConfig.AuthToken = TestsConfig.AuthToken; _client = new HipchatClient(); try { _client.GetUserInfo(UserEmail); } catch (Exception) { _client.CreateUser(new CreateUserRequest() {Email = UserEmail, Name = UserName}); } }
public HipchatUser GetUser(string userName) { string authToken = ConfigurationManager.AppSettings["AuthTokens.Admin"]; try { HipchatClient client = new HipchatClient(authToken); var response = client.GetUserInfo(userName); return new HipchatUser() {Id = response.Id, MentionName = response.MentionName, Name = response.Name}; } catch { return null; } }