PlugNmeet
in package
The main class for interacting with the plugNmeet API.
Table of Contents
Properties
- $algo : string
- The hashing algorithm used to sign requests.
- $apiKey : string
- The API key for the plugNmeet server.
- $apiSecret : string
- The API secret for the plugNmeet server.
- $defaultPath : string
- The default path for API requests.
- $httpClient : HttpClientInterface
- The HTTP client used to make requests to the plugNmeet server.
- $serverUrl : string
- The URL of the plugNmeet server.
Methods
- __construct() : mixed
- Constructs a new PlugNmeet instance.
- createRoom() : CreateRoomRes
- Creates a new room.
- decodeJWTData() : stdClass
- Decodes a JWT.
- deleteAnalytics() : DeleteAnalyticsRes
- Deletes analytics data.
- deleteArtifact() : DeleteArtifactRes
- Deletes an artifact.
- deleteRecordings() : DeleteRecordingRes
- Deletes a recording.
- endRoom() : RoomEndRes
- Ends an active session.
- fetchAnalytics() : FetchAnalyticsRes
- Retrieves analytics data.
- fetchArtifacts() : FetchArtifactsRes
- Retrieves a list of artifacts.
- fetchPastRoomsInfo() : FetchPastRoomsRes
- Retrieves a list of past rooms.
- fetchRecordings() : FetchRecordingsRes
- Retrieves a list of recordings.
- generateUuid4() : string
- Generates a UUID v4 random string.
- getActiveRoomInfo() : GetActiveRoomInfoRes
- Retrieves information about an active room.
- getActiveRoomsInfo() : GetActiveRoomsInfoRes
- Retrieves information about all active rooms.
- getAnalyticsDownloadToken() : GetAnalyticsDownloadTokenRes
- Generates a download token for analytics data.
- getArtifactDownloadToken() : GetArtifactDownloadTokenRes
- Generates a download token for an artifact.
- getArtifactInfo() : ArtifactInfoRes
- Retrieves information about a specific artifact.
- getClientFiles() : GetClientFilesRes
- Retrieves the client files needed to build the plugNmeet interface.
- getJoinToken() : GenerateTokenRes
- Generates a token for a user to join a room.
- getJWTencodedData() : string
- Encodes a payload into a JWT.
- getRecordingDownloadToken() : GetDownloadTokenRes
- Generates a download link for a recording.
- getRecordingInfo() : RecordingInfoRes
- Retrieves information about a specific recording.
- getUUID() : string
- Generates a UUID v4 random string.
- isRoomActive() : IsRoomActiveRes
- Checks if a room is currently active.
- updateRecordingMetadata() : UpdateRecordingMetadataRes
- Updates the metadata of a recording.
- sendRequest() : stdClass
- Sends a request to the plugNmeet server.
Properties
$algo
The hashing algorithm used to sign requests.
protected
string
$algo
= "sha256"
$apiKey
The API key for the plugNmeet server.
protected
string
$apiKey
$apiSecret
The API secret for the plugNmeet server.
protected
string
$apiSecret
$defaultPath
The default path for API requests.
protected
string
$defaultPath
= "/auth"
$httpClient
The HTTP client used to make requests to the plugNmeet server.
protected
HttpClientInterface
$httpClient
$serverUrl
The URL of the plugNmeet server.
protected
string
$serverUrl
Methods
__construct()
Constructs a new PlugNmeet instance.
public
__construct(string $serverUrl, string $apiKey, string $apiSecret[, int $timeout = 60 ][, bool $verifySSL = true ][, HttpClientInterface|null $httpClient = null ]) : mixed
Parameters
- $serverUrl : string
-
The URL of the plugNmeet server.
- $apiKey : string
-
The API key for the plugNmeet server.
- $apiSecret : string
-
The API secret for the plugNmeet server.
- $timeout : int = 60
-
The timeout for API requests in seconds.
- $verifySSL : bool = true
-
Whether to verify the SSL certificate.
- $httpClient : HttpClientInterface|null = null
-
An optional custom HTTP client.
createRoom()
Creates a new room.
public
createRoom(CreateRoomReq $createRoomRes) : CreateRoomRes
Parameters
- $createRoomRes : CreateRoomReq
-
The request object for creating a room.
Tags
Return values
CreateRoomRes —The response from the createRoom API call.
decodeJWTData()
Decodes a JWT.
public
decodeJWTData(string $raw[, string $algo = "HS256" ]) : stdClass
Parameters
- $raw : string
-
The JWT to decode.
- $algo : string = "HS256"
-
The hashing algorithm used to encode the JWT.
Return values
stdClass —The decoded payload.
deleteAnalytics()
Deletes analytics data.
public
deleteAnalytics(DeleteAnalyticsReq $deleteAnalyticsReq) : DeleteAnalyticsRes
This method is deprecated and will be removed in a future version. Use deleteArtifact instead.
Parameters
- $deleteAnalyticsReq : DeleteAnalyticsReq
-
The request object for deleting analytics.
Tags
Return values
DeleteAnalyticsRes —The response from the deleteAnalytics API call.
deleteArtifact()
Deletes an artifact.
public
deleteArtifact(DeleteArtifactReq $deleteArtifactReq) : DeleteArtifactRes
Parameters
- $deleteArtifactReq : DeleteArtifactReq
-
The request object for deleting an artifact.
Tags
Return values
DeleteArtifactRes —The response from the deleteArtifact API call.
deleteRecordings()
Deletes a recording.
public
deleteRecordings(DeleteRecordingReq $deleteRecordingReq) : DeleteRecordingRes
Parameters
- $deleteRecordingReq : DeleteRecordingReq
-
The request object for deleting a recording.
Tags
Return values
DeleteRecordingRes —The response from the deleteRecordings API call.
endRoom()
Ends an active session.
public
endRoom(RoomEndReq $roomEndReq) : RoomEndRes
Parameters
- $roomEndReq : RoomEndReq
-
The request object for ending a room.
Tags
Return values
RoomEndRes —The response from the endRoom API call.
fetchAnalytics()
Retrieves analytics data.
public
fetchAnalytics(FetchAnalyticsReq $fetchAnalyticsReq) : FetchAnalyticsRes
This method is deprecated and will be removed in a future version. Use fetchArtifacts instead.
Parameters
- $fetchAnalyticsReq : FetchAnalyticsReq
-
The request object for fetching analytics.
Tags
Return values
FetchAnalyticsRes —The response from the fetchAnalytics API call.
fetchArtifacts()
Retrieves a list of artifacts.
public
fetchArtifacts(FetchArtifactsReq $fetchArtifactsReq) : FetchArtifactsRes
Parameters
- $fetchArtifactsReq : FetchArtifactsReq
-
The request object for fetching artifacts.
Tags
Return values
FetchArtifactsRes —The response from the fetchArtifacts API call.
fetchPastRoomsInfo()
Retrieves a list of past rooms.
public
fetchPastRoomsInfo(FetchPastRoomsReq $fetchPastRoomsReq) : FetchPastRoomsRes
Parameters
- $fetchPastRoomsReq : FetchPastRoomsReq
-
The request object for fetching past rooms.
Tags
Return values
FetchPastRoomsRes —The response from the fetchPastRoomsInfo API call.
fetchRecordings()
Retrieves a list of recordings.
public
fetchRecordings(FetchRecordingsReq $fetchRecordingsReq) : FetchRecordingsRes
Parameters
- $fetchRecordingsReq : FetchRecordingsReq
-
The request object for fetching recordings.
Tags
Return values
FetchRecordingsRes —The response from the fetchRecordings API call.
generateUuid4()
Generates a UUID v4 random string.
public
static generateUuid4() : string
Return values
string —The generated UUID v4.
getActiveRoomInfo()
Retrieves information about an active room.
public
getActiveRoomInfo(GetActiveRoomInfoReq $getActiveRoomInfoReq) : GetActiveRoomInfoRes
Parameters
- $getActiveRoomInfoReq : GetActiveRoomInfoReq
-
The request object for getting active room information.
Tags
Return values
GetActiveRoomInfoRes —The response from the getActiveRoomInfo API call.
getActiveRoomsInfo()
Retrieves information about all active rooms.
public
getActiveRoomsInfo() : GetActiveRoomsInfoRes
Tags
Return values
GetActiveRoomsInfoRes —The response from the getActiveRoomsInfo API call.
getAnalyticsDownloadToken()
Generates a download token for analytics data.
public
getAnalyticsDownloadToken(GetAnalyticsDownloadTokenReq $getAnalyticsDownloadTokenReq) : GetAnalyticsDownloadTokenRes
This method is deprecated and will be removed in a future version. Use getArtifactDownloadToken instead.
Parameters
- $getAnalyticsDownloadTokenReq : GetAnalyticsDownloadTokenReq
-
The request object for getting an analytics download token.
Tags
Return values
GetAnalyticsDownloadTokenRes —The response from the getAnalyticsDownloadToken API call.
getArtifactDownloadToken()
Generates a download token for an artifact.
public
getArtifactDownloadToken(GetArtifactDownloadTokenReq $getAnalyticsDownloadTokenReq) : GetArtifactDownloadTokenRes
Parameters
- $getAnalyticsDownloadTokenReq : GetArtifactDownloadTokenReq
-
The request object for getting an artifact download token.
Tags
Return values
GetArtifactDownloadTokenRes —The response from the getArtifactDownloadToken API call.
getArtifactInfo()
Retrieves information about a specific artifact.
public
getArtifactInfo(ArtifactInfoReq $artifactDetailsReq) : ArtifactInfoRes
Parameters
- $artifactDetailsReq : ArtifactInfoReq
-
The request object for getting artifact information.
Tags
Return values
ArtifactInfoRes —The response from the getArtifactInfo API call.
getClientFiles()
Retrieves the client files needed to build the plugNmeet interface.
public
getClientFiles() : GetClientFilesRes
Tags
Return values
GetClientFilesRes —The response from the getClientFiles API call.
getJoinToken()
Generates a token for a user to join a room.
public
getJoinToken(GenerateTokenReq $generateTokenReq) : GenerateTokenRes
Parameters
- $generateTokenReq : GenerateTokenReq
-
The request object for generating a join token.
Tags
Return values
GenerateTokenRes —The response from the getJoinToken API call.
getJWTencodedData()
Encodes a payload into a JWT.
public
getJWTencodedData(array<string|int, mixed> $payload, int $validity[, string $algo = "HS256" ][, array<string|int, mixed> $head = [] ]) : string
Parameters
- $payload : array<string|int, mixed>
-
The payload to encode.
- $validity : int
-
The validity of the token in seconds.
- $algo : string = "HS256"
-
The hashing algorithm to use.
- $head : array<string|int, mixed> = []
-
Optional headers for the JWT.
Return values
string —The encoded JWT.
getRecordingDownloadToken()
Generates a download link for a recording.
public
getRecordingDownloadToken(GetDownloadTokenReq $getDownloadTokenReq) : GetDownloadTokenRes
Parameters
- $getDownloadTokenReq : GetDownloadTokenReq
-
The request object for getting a recording download token.
Tags
Return values
GetDownloadTokenRes —The response from the getRecordingDownloadToken API call.
getRecordingInfo()
Retrieves information about a specific recording.
public
getRecordingInfo(RecordingInfoReq $recordingInfoReq) : RecordingInfoRes
Parameters
- $recordingInfoReq : RecordingInfoReq
-
The request object for getting recording information.
Tags
Return values
RecordingInfoRes —The response from the getRecordingInfo API call.
getUUID()
Generates a UUID v4 random string.
public
getUUID() : string
Return values
string —The generated UUID v4.
isRoomActive()
Checks if a room is currently active.
public
isRoomActive(IsRoomActiveReq $isRoomActiveReq) : IsRoomActiveRes
Parameters
- $isRoomActiveReq : IsRoomActiveReq
-
The request object for checking if a room is active.
Tags
Return values
IsRoomActiveRes —The response from the isRoomActive API call.
updateRecordingMetadata()
Updates the metadata of a recording.
public
updateRecordingMetadata(UpdateRecordingMetadataReq $updateRecordingMetadataReq) : UpdateRecordingMetadataRes
Parameters
- $updateRecordingMetadataReq : UpdateRecordingMetadataReq
-
The request object for updating recording metadata.
Tags
Return values
UpdateRecordingMetadataRes —The response from the updateRecordingMetadata API call.
sendRequest()
Sends a request to the plugNmeet server.
protected
sendRequest(string $path, string $body) : stdClass
Parameters
- $path : string
-
The API endpoint to call.
- $body : string
-
The body of the request.
Return values
stdClass —The response from the server.