Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebPubSub

Package version

Class representing a WebPubSub.

Hierarchy

  • WebPubSub

Index

Constructors

constructor

  • new WebPubSub(client: AzureWebPubSubServiceRestAPIContext): WebPubSub

Methods

addConnectionToGroup

  • addConnectionToGroup(hub: string, group: string, connectionId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Add a connection to the target group.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • connectionId: string

      Target connection Id

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

addUserToGroup

  • addUserToGroup(hub: string, group: string, userId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Add a user to the target group.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • userId: string

      Target user Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

checkPermission

closeClientConnection

connectionExists

  • connectionExists(hub: string, connectionId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Check if the connection with the given connectionId exists.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • connectionId: string

      The connection Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

grantPermission

groupExists

  • groupExists(hub: string, group: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Check if there are any client connections inside the given group

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

removeConnectionFromGroup

  • removeConnectionFromGroup(hub: string, group: string, connectionId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Remove a connection from the target group.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • connectionId: string

      Target connection Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

removeUserFromAllGroups

  • removeUserFromAllGroups(hub: string, userId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>

removeUserFromGroup

  • removeUserFromGroup(hub: string, group: string, userId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Remove a user from the target group.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • userId: string

      Target user Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

revokePermission

sendToAll

sendToConnection

  • sendToConnection(hub: string, connectionId: string, contentType: ContentType, message: coreHttp.HttpRequestBody, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • sendToConnection(hub: string, connectionId: string, contentType: "text/plain", message: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Send content inside request body to the specific connection.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • connectionId: string

      The connection Id.

    • contentType: ContentType

      Upload file type

    • message: coreHttp.HttpRequestBody

      The payload body.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

  • Send content inside request body to the specific connection.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • connectionId: string

      The connection Id.

    • contentType: "text/plain"

      Upload file type

    • message: string

      The payload body.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

sendToGroup

sendToUser

  • sendToUser(hub: string, userId: string, contentType: ContentType, message: coreHttp.HttpRequestBody, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • sendToUser(hub: string, userId: string, contentType: "text/plain", message: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Send content inside request body to the specific user.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • userId: string

      The user Id.

    • contentType: ContentType

      Upload file type

    • message: coreHttp.HttpRequestBody

      The payload body.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

  • Send content inside request body to the specific user.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • userId: string

      The user Id.

    • contentType: "text/plain"

      Upload file type

    • message: string

      The payload body.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

userExists

  • userExists(hub: string, userId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Check if there are any client connections connected for the given user.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • userId: string

      Target user Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

userExistsInGroup

  • userExistsInGroup(hub: string, group: string, userId: string, options?: coreHttp.OperationOptions): Promise<coreHttp.RestResponse>
  • Check whether a user exists in the target group.

    Parameters

    • hub: string

      Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore.

    • group: string

      Target group name, which length should be greater than 0 and less than 1025.

    • userId: string

      Target user Id.

    • Optional options: coreHttp.OperationOptions

      The options parameters.

    Returns Promise<coreHttp.RestResponse>

Generated using TypeDoc