C# Класс HipChat.HipChatClient

Class used to encapsulate core HipChat API methods. This is the core class that is used to interact with the API.
https://www.hipchat.com/docs/api
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
FormatMessageUri string
FormatRoomsHistoryUri string
FormatRoomsHistoryUri string
FormatRoomsListUri string

Открытые методы

Метод Описание
HipChatClient ( ) : System
HipChatClient ( string token ) : System
HipChatClient ( string token, ApiResponseFormat format ) : System
HipChatClient ( string token, int room ) : System
HipChatClient ( string token, int room, ApiResponseFormat format ) : System
HipChatClient ( string token, int room, string from ) : System
ListHistoryAsNativeObjects ( ) : List
ListHistoryAsNativeObjects ( System.DateTime dt ) : List

Returns the history as native C# objects

ListRooms ( ) : string

Returns the list of available rooms as XML/JSON

ListRoomsAsNativeObjects ( ) : List

Returns the list of available rooms as native C# objects

RoomHistory ( ) : string
RoomHistory ( System.DateTime date ) : string

Returns the chat history of a single room on a single day.

SendMessage ( string message ) : void

Sends a message to a room.

SendMessage ( string message, BackgroundColor color ) : void

Sends a message to a chat room.

SendMessage ( string message, BackgroundColor color, bool notify ) : void

Sends a message to a chat room.

SendMessage ( string message, int room ) : void

Sends a message to a chat room.

SendMessage ( string message, int room, bool notify ) : void

Sends a message to a chat room.

SendMessage ( string message, int room, string from ) : void

Sends a message to a chat room.

SendMessage ( string message, int room, string from, bool notify ) : void

Sends a message to a chat room.

SendMessage ( string token, int room, string from, string message ) : void

Sends a message to a chat room.

SendMessage ( string token, int room, string from, string message, BackgroundColor color ) : void

Sends a message to a chat room.

SendMessage ( string token, int room, string from, string message, bool notify ) : void

Sends a message to a chat room.

SendMessage ( string token, int room, string from, string message, bool notify, BackgroundColor color ) : void

Sends a message to a chat room.

SendMessage ( string message, string from ) : void

Sends a message to a chat room.

SendMessage ( string message, string from, BackgroundColor color ) : void

Sends a message to a chat room.

SendMessage ( string message, string from, bool notify ) : void

Sends a message to a chat room.

SendMessage ( string message, string from, bool notify, BackgroundColor color ) : void

Sends a message to a chat room.

YieldRooms ( ) : IEnumerable

Yields each individual room as strongly-typed Entities.Room object

Приватные методы

Метод Описание
FormatMessageUri ( string message ) : string

Formats the URI for the /rooms/message API (http://www.hipchat.com/docs/api/method/rooms/message)

FormatRoomsHistoryUri ( ) : string
FormatRoomsHistoryUri ( System.DateTime date ) : string

Formats the URI for the /rooms/history API (http://www.hipchat.com/docs/api/method/rooms/history)

FormatRoomsListUri ( ) : string

Formats the URI for the /rooms/list API (http://www.hipchat.com/docs/api/method/rooms/list)

Описание методов

HipChatClient() публичный Метод

public HipChatClient ( ) : System
Результат System

HipChatClient() публичный Метод

public HipChatClient ( string token ) : System
token string
Результат System

HipChatClient() публичный Метод

public HipChatClient ( string token, ApiResponseFormat format ) : System
token string
format ApiResponseFormat
Результат System

HipChatClient() публичный Метод

public HipChatClient ( string token, int room ) : System
token string
room int
Результат System

HipChatClient() публичный Метод

public HipChatClient ( string token, int room, ApiResponseFormat format ) : System
token string
room int
format ApiResponseFormat
Результат System

HipChatClient() публичный Метод

public HipChatClient ( string token, int room, string from ) : System
token string
room int
from string
Результат System

ListHistoryAsNativeObjects() публичный Метод

public ListHistoryAsNativeObjects ( ) : List
Результат List

ListHistoryAsNativeObjects() публичный Метод

Returns the history as native C# objects
public ListHistoryAsNativeObjects ( System.DateTime dt ) : List
dt System.DateTime
Результат List

ListRooms() публичный Метод

Returns the list of available rooms as XML/JSON
public ListRooms ( ) : string
Результат string

ListRoomsAsNativeObjects() публичный Метод

Returns the list of available rooms as native C# objects
public ListRoomsAsNativeObjects ( ) : List
Результат List

RoomHistory() публичный Метод

public RoomHistory ( ) : string
Результат string

RoomHistory() публичный Метод

Returns the chat history of a single room on a single day.
public RoomHistory ( System.DateTime date ) : string
date System.DateTime
Результат string

SendMessage() публичный Метод

Sends a message to a room.
public SendMessage ( string message ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, BackgroundColor color ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
color BackgroundColor Background color to use with the message
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, BackgroundColor color, bool notify ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
color BackgroundColor Background color to use with the message
notify bool If true, the message triggers a "ping" sound when it hits the room.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, int room ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
room int The id of the room to send the message to - sets the RoomId property.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, int room, bool notify ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
room int The id of the room to send the message to - sets the RoomId property.
notify bool If true, the message triggers a "ping" sound when it hits the room.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, int room, string from ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
room int
from string
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, int room, string from, bool notify ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
room int
from string
notify bool If true, the message triggers a "ping" sound when it hits the room.
Результат void

SendMessage() публичный статический Метод

Sends a message to a chat room.
public static SendMessage ( string token, int room, string from, string message ) : void
token string
room int
from string
message string
Результат void

SendMessage() публичный статический Метод

Sends a message to a chat room.
public static SendMessage ( string token, int room, string from, string message, BackgroundColor color ) : void
token string
room int
from string
message string
color BackgroundColor
Результат void

SendMessage() публичный статический Метод

Sends a message to a chat room.
public static SendMessage ( string token, int room, string from, string message, bool notify ) : void
token string
room int
from string
message string
notify bool
Результат void

SendMessage() публичный статический Метод

Sends a message to a chat room.
public static SendMessage ( string token, int room, string from, string message, bool notify, BackgroundColor color ) : void
token string
room int
from string
message string
notify bool
color BackgroundColor
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, string from ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
from string The name of the sender - sets the From property.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, string from, BackgroundColor color ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
from string The name of the sender - sets the From property.
color BackgroundColor Background color to use with the message
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, string from, bool notify ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
from string The name of the sender - sets the From property.
notify bool If true, the message triggers a "ping" sound when it hits the room.
Результат void

SendMessage() публичный Метод

Sends a message to a chat room.
public SendMessage ( string message, string from, bool notify, BackgroundColor color ) : void
message string The message to send - can contain some HTML and must be valid XHTML.
from string The name of the sender - sets the From property.
notify bool If true, the message triggers a "ping" sound when it hits the room.
color BackgroundColor Background color to use with the message
Результат void

YieldRooms() публичный Метод

Yields each individual room as strongly-typed Entities.Room object
public YieldRooms ( ) : IEnumerable
Результат IEnumerable