C# Class HipchatApiV2.HipchatClient

Exibir arquivo Open project: KyleGobel/Hipchat-CS Class Usage Examples

Public Methods

Method Description
AddMember ( string roomName, string idOrEmail ) : bool
CreateRoom ( CreateRoomRequest request ) : HipchatCreateRoomResponse
CreateRoom ( string nameOfRoom, bool guestAccess = false, string ownerUserId = null, RoomPrivacy privacy = RoomPrivacy.Public ) : HipchatCreateRoomResponse
CreateUser ( CreateUserRequest request ) : HipchatCreateUserResponse
CreateWebHook ( int roomId, string url, string pattern, Hipchat.Models.RoomEvent eventType, string name ) : CreateWebHookResponse
CreateWebHook ( string roomName, Hipchat.Models.Requests.CreateWebHookRequest request ) : CreateWebHookResponse
CreateWebHook ( string roomName, string url, string pattern, Hipchat.Models.RoomEvent eventType, string name ) : CreateWebHookResponse
DeleteRoom ( int roomId ) : bool
DeleteRoom ( string roomName ) : bool
DeleteUser ( string idOrEmail ) : bool
DeleteWebhook ( int roomId, int webHookId ) : bool
DeleteWebhook ( string roomName, int webHookId ) : bool
GenerateToken ( GrantType grantType, IEnumerable scopes, string username = null, string code = null, string redirectUri = null, string password = null, string refreshToken = null ) : HipchatGenerateTokenResponse
GetAllEmoticons ( int startIndex, int maxResults = 100, EmoticonType type = EmoticonType.All ) : HipchatGetAllEmoticonsResponse
GetAllRooms ( int startIndex, int maxResults = 100, bool includePrivate = false, bool includeArchived = false ) : HipchatGetAllRoomsResponse
GetAllUsers ( int startIndex, int maxResults = 100, bool includeGuests = false, bool includeDeleted = false ) : HipchatGetAllUsersResponse
GetAllWebhooks ( int roomId, int startIndex, int maxResults ) : HipchatGetAllWebhooksResponse
GetAllWebhooks ( string roomName, int startIndex, int maxResults ) : HipchatGetAllWebhooksResponse
GetEmoticon ( int id ) : HipchatGetEmoticonResponse
GetEmoticon ( string shortcut = "" ) : HipchatGetEmoticonResponse
GetRoom ( int roomId ) : HipchatGetRoomResponse
GetRoom ( string roomName ) : HipchatGetRoomResponse
GetUserInfo ( int userId ) : HipchatGetUserInfoResponse
GetUserInfo ( string emailOrMentionName ) : HipchatGetUserInfoResponse
HipchatClient ( string authToken = null ) : System

Creates a new HipchatClient, you can pass in an optional authToken, or by default it will look in the web/app config file appSettings for 'hipchat_auth_token'

PrivateMessageUser ( string idOrEmailOrMention, string message, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Text ) : void
SendNotification ( int roomId, SendRoomNotificationRequest request ) : bool
SendNotification ( int roomId, string message, RoomColors backgroundColor = RoomColors.Yellow, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Html ) : bool
SendNotification ( string roomName, SendRoomNotificationRequest request ) : bool
SendNotification ( string roomName, string message, RoomColors backgroundColor = RoomColors.Yellow, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Html ) : bool
SetTopic ( int roomId, string topic ) : bool
SetTopic ( string roomName, string topic ) : bool
ShareFileWithRoom ( string roomName, string fileFullPath, string message = null ) : bool
UpdatePhoto ( string idOrEmail, string photo ) : bool
UpdateRoom ( int roomId, UpdateRoomRequest request ) : bool
UpdateRoom ( string roomName, UpdateRoomRequest request ) : bool
UpdateUser ( string idOrEmail, UpdateUserRequest request ) : bool
ViewRecentRoomHistory ( string roomName, string notBefore = "", string timezone = "UTC", int startIndex, int maxResults = 100 ) : HipchatViewRoomHistoryResponse
ViewRoomHistory ( string roomName, string date = "recent", string timezone = "UTC", int startIndex, int maxResults = 100, bool reverse = true ) : HipchatViewRoomHistoryResponse

Private Methods

Method Description
ConfigureSerializer ( ) : void
JsonSerializerConfigScope ( ) : JsConfigScope

Method Details

AddMember() public method

public AddMember ( string roomName, string idOrEmail ) : bool
roomName string
idOrEmail string
return bool

CreateRoom() public method

public CreateRoom ( CreateRoomRequest request ) : HipchatCreateRoomResponse
request CreateRoomRequest
return HipchatCreateRoomResponse

CreateRoom() public method

public CreateRoom ( string nameOfRoom, bool guestAccess = false, string ownerUserId = null, RoomPrivacy privacy = RoomPrivacy.Public ) : HipchatCreateRoomResponse
nameOfRoom string
guestAccess bool
ownerUserId string
privacy RoomPrivacy
return HipchatCreateRoomResponse

CreateUser() public method

public CreateUser ( CreateUserRequest request ) : HipchatCreateUserResponse
request CreateUserRequest
return HipchatCreateUserResponse

CreateWebHook() public method

public CreateWebHook ( int roomId, string url, string pattern, Hipchat.Models.RoomEvent eventType, string name ) : CreateWebHookResponse
roomId int
url string
pattern string
eventType Hipchat.Models.RoomEvent
name string
return CreateWebHookResponse

CreateWebHook() public method

public CreateWebHook ( string roomName, Hipchat.Models.Requests.CreateWebHookRequest request ) : CreateWebHookResponse
roomName string
request Hipchat.Models.Requests.CreateWebHookRequest
return CreateWebHookResponse

CreateWebHook() public method

public CreateWebHook ( string roomName, string url, string pattern, Hipchat.Models.RoomEvent eventType, string name ) : CreateWebHookResponse
roomName string
url string
pattern string
eventType Hipchat.Models.RoomEvent
name string
return CreateWebHookResponse

DeleteRoom() public method

public DeleteRoom ( int roomId ) : bool
roomId int
return bool

DeleteRoom() public method

public DeleteRoom ( string roomName ) : bool
roomName string
return bool

DeleteUser() public method

public DeleteUser ( string idOrEmail ) : bool
idOrEmail string
return bool

DeleteWebhook() public method

public DeleteWebhook ( int roomId, int webHookId ) : bool
roomId int
webHookId int
return bool

DeleteWebhook() public method

public DeleteWebhook ( string roomName, int webHookId ) : bool
roomName string
webHookId int
return bool

GenerateToken() public method

public GenerateToken ( GrantType grantType, IEnumerable scopes, string username = null, string code = null, string redirectUri = null, string password = null, string refreshToken = null ) : HipchatGenerateTokenResponse
grantType GrantType
scopes IEnumerable
username string
code string
redirectUri string
password string
refreshToken string
return HipchatGenerateTokenResponse

GetAllEmoticons() public method

public GetAllEmoticons ( int startIndex, int maxResults = 100, EmoticonType type = EmoticonType.All ) : HipchatGetAllEmoticonsResponse
startIndex int
maxResults int
type EmoticonType
return HipchatGetAllEmoticonsResponse

GetAllRooms() public method

public GetAllRooms ( int startIndex, int maxResults = 100, bool includePrivate = false, bool includeArchived = false ) : HipchatGetAllRoomsResponse
startIndex int
maxResults int
includePrivate bool
includeArchived bool
return HipchatGetAllRoomsResponse

GetAllUsers() public method

public GetAllUsers ( int startIndex, int maxResults = 100, bool includeGuests = false, bool includeDeleted = false ) : HipchatGetAllUsersResponse
startIndex int
maxResults int
includeGuests bool
includeDeleted bool
return HipchatGetAllUsersResponse

GetAllWebhooks() public method

public GetAllWebhooks ( int roomId, int startIndex, int maxResults ) : HipchatGetAllWebhooksResponse
roomId int
startIndex int
maxResults int
return HipchatGetAllWebhooksResponse

GetAllWebhooks() public method

public GetAllWebhooks ( string roomName, int startIndex, int maxResults ) : HipchatGetAllWebhooksResponse
roomName string
startIndex int
maxResults int
return HipchatGetAllWebhooksResponse

GetEmoticon() public method

public GetEmoticon ( int id ) : HipchatGetEmoticonResponse
id int
return HipchatGetEmoticonResponse

GetEmoticon() public method

public GetEmoticon ( string shortcut = "" ) : HipchatGetEmoticonResponse
shortcut string
return HipchatGetEmoticonResponse

GetRoom() public method

public GetRoom ( int roomId ) : HipchatGetRoomResponse
roomId int
return HipchatGetRoomResponse

GetRoom() public method

public GetRoom ( string roomName ) : HipchatGetRoomResponse
roomName string
return HipchatGetRoomResponse

GetUserInfo() public method

public GetUserInfo ( int userId ) : HipchatGetUserInfoResponse
userId int
return HipchatGetUserInfoResponse

GetUserInfo() public method

public GetUserInfo ( string emailOrMentionName ) : HipchatGetUserInfoResponse
emailOrMentionName string
return HipchatGetUserInfoResponse

HipchatClient() public method

Creates a new HipchatClient, you can pass in an optional authToken, or by default it will look in the web/app config file appSettings for 'hipchat_auth_token'
public HipchatClient ( string authToken = null ) : System
authToken string the auth token given by hipchat
return System

PrivateMessageUser() public method

public PrivateMessageUser ( string idOrEmailOrMention, string message, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Text ) : void
idOrEmailOrMention string
message string
notify bool
messageFormat HipchatMessageFormat
return void

SendNotification() public method

public SendNotification ( int roomId, SendRoomNotificationRequest request ) : bool
roomId int
request SendRoomNotificationRequest
return bool

SendNotification() public method

public SendNotification ( int roomId, string message, RoomColors backgroundColor = RoomColors.Yellow, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Html ) : bool
roomId int
message string
backgroundColor RoomColors
notify bool
messageFormat HipchatMessageFormat
return bool

SendNotification() public method

public SendNotification ( string roomName, SendRoomNotificationRequest request ) : bool
roomName string
request SendRoomNotificationRequest
return bool

SendNotification() public method

public SendNotification ( string roomName, string message, RoomColors backgroundColor = RoomColors.Yellow, bool notify = false, HipchatMessageFormat messageFormat = HipchatMessageFormat.Html ) : bool
roomName string
message string
backgroundColor RoomColors
notify bool
messageFormat HipchatMessageFormat
return bool

SetTopic() public method

public SetTopic ( int roomId, string topic ) : bool
roomId int
topic string
return bool

SetTopic() public method

public SetTopic ( string roomName, string topic ) : bool
roomName string
topic string
return bool

ShareFileWithRoom() public method

public ShareFileWithRoom ( string roomName, string fileFullPath, string message = null ) : bool
roomName string
fileFullPath string
message string
return bool

UpdatePhoto() public method

public UpdatePhoto ( string idOrEmail, string photo ) : bool
idOrEmail string
photo string
return bool

UpdateRoom() public method

public UpdateRoom ( int roomId, UpdateRoomRequest request ) : bool
roomId int
request UpdateRoomRequest
return bool

UpdateRoom() public method

public UpdateRoom ( string roomName, UpdateRoomRequest request ) : bool
roomName string
request UpdateRoomRequest
return bool

UpdateUser() public method

public UpdateUser ( string idOrEmail, UpdateUserRequest request ) : bool
idOrEmail string
request UpdateUserRequest
return bool

ViewRecentRoomHistory() public method

public ViewRecentRoomHistory ( string roomName, string notBefore = "", string timezone = "UTC", int startIndex, int maxResults = 100 ) : HipchatViewRoomHistoryResponse
roomName string
notBefore string
timezone string
startIndex int
maxResults int
return HipchatViewRoomHistoryResponse

ViewRoomHistory() public method

public ViewRoomHistory ( string roomName, string date = "recent", string timezone = "UTC", int startIndex, int maxResults = 100, bool reverse = true ) : HipchatViewRoomHistoryResponse
roomName string
date string
timezone string
startIndex int
maxResults int
reverse bool
return HipchatViewRoomHistoryResponse