Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
riban-bw committed Apr 1, 2024
1 parent 48f2d6b commit a23fd99
Showing 1 changed file with 57 additions and 56 deletions.
113 changes: 57 additions & 56 deletions docs/JSON-RPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,49 +129,43 @@ Results:
| result.version | string | The Jamulus version. |


### jamulusclient/getChannelInfo
### jamulus/pollServerList

Returns the client's profile information.
Request list of servers in a directory

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params | object | No parameters (empty object). |
| params.directory | string | socket address of directory to query, e.g. anygenre1.jamulus.io:22124. |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result.id | number | The channel ID. |
| result.name | string | The musician’s name. |
| result.skillLevel | string | The musician’s skill level (beginner, intermediate, expert, or null). |
| result.countryId | number | The musician’s country ID (see QLocale::Country). |
| result.city | string | The musician’s city. |
| result.instrument | string | The musician’s instrument. |
| result.skillLevel | string | Your skill level (beginner, intermediate, expert, or null). |
| result | string | "ok" or "error" if bad arguments. |


### jamulusclient/getClientInfo
### jamulusclient/connect

Returns the client information.
Disconnect client from server

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params | object | No parameters (empty object). |
| params.address | string | Server socket address (ip_addr:port). |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result.connected | boolean | Whether the client is connected to the server. |
| result | string | Always "ok". |


### jamulusclient/getClientList
### jamulusclient/disconnect

Returns the client list.
Disconnect client from server

Parameters:

Expand All @@ -183,74 +177,81 @@ Results:

| Name | Type | Description |
| --- | --- | --- |
| result.clients | array | The client list. See jamulusclient/clientListReceived for the format. |
| result | string | Always "ok". |


### jamulusclient/pollServerList
### jamulusclient/getChannelInfo

Requests the server list from a specified directory.
Returns the client's profile information.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.directory | string | Socket address of directory (hostname:port), e.g. anygenre1.jamulus.io:22124 |
| params | object | No parameters (empty object). |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result | string | "ok" or "error" if invalid socket address |
| result.id | number | The channel ID. |
| result.name | string | The musician’s name. |
| result.skillLevel | string | The musician’s skill level (beginner, intermediate, expert, or null). |
| result.country | string | The musician’s country. |
| result.city | string | The musician’s city. |
| result.instrument | number | The musician’s instrument. |
| result.skillLevel | string | Your skill level (beginner, intermediate, expert, or null). |

### jamulusclient/sendChatText

Sends a chat text message.
### jamulusclient/getClientInfo

Returns the client information.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.chatText | string | The chat text message. |
| params | object | No parameters (empty object). |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result | string | Always "ok". |
| result.connected | boolean | Whether the client is connected to the server. |


### jamulusclient/connect
### jamulusclient/getClientList

Connect client to a server.
Returns the client list.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.address | string | Server socket address (hostname:port) |
| params | object | No parameters (empty object). |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result | string | "ok" or error if invalid address.
| result.clients | array | The client list. See jamulusclient/clientListReceived for the format. |


### jamulusclient/disconnect
### jamulusclient/sendChatText

Disconnect client from server.
Sends a chat text message.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params | object | No parameters (empty object). |
| params.chatText | string | The chat text message. |

Results:

| Name | Type | Description |
| --- | --- | --- |
| result | string | Always "ok".
| result | string | Always "ok". |


### jamulusclient/setName
Expand Down Expand Up @@ -308,9 +309,9 @@ Results:
| result.clients[*].name | string | The client’s name. |
| result.clients[*].jitterBufferSize | number | The client’s jitter buffer size. |
| result.clients[*].channels | number | The number of audio channels of the client. |
| result.clients[*].instrument | string | The instrument name provided by the user for this channel. |
| result.clients[*].instrumentCode | number | The id of the instrument for this channel. |
| result.clients[*].city | string | The city name provided by the user for this channel. |
| result.clients[*].countryName | string | The country name provided by the user for this channel. |
| result.clients[*].countryName | number | The text name of the country specified by the user for this channel (see QLocale::Country). |
| result.clients[*].skillLevelCode | number | The skill level id provided by the user for this channel. |


Expand Down Expand Up @@ -499,64 +500,64 @@ Parameters:
| params.clients[*].instrument | string | The musician’s instrument. |


### jamulusclient/serverListReceived
### jamulusclient/connected

Emitted when the server list is received.
Emitted when the client is connected to the server.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.servers | array | The server list. |
| params.servers[*].address | string | The server's socket address (hostname:port). |
| params.servers[*].name | string | The server’s name. |
| params.servers[*].country | string | The servers’s country. |
| params.servers[*].city | string | The server’s city. |
| params.id | number | The channel ID assigned to the client. |


### jamulusclient/serverInfoReceived
### jamulusclient/disconnected

Emitted when a server info is received.
Emitted when the client is disconnected from the server.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.servers[*].address | string | The server's socket address (hostname:port). |
| params.servers[*].pingTime | number | The round-trip ping time in ms. |
| params.servers[*].numClients | number | The quantity of clients connected to the server . |
| params | object | No parameters (empty object). |


### jamulusclient/connected
### jamulusclient/recorderState

Emitted when the client is connected to the server.
Emitted when the client is connected to a server who's recorder state changes.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.id | number | The channel ID assigned to the client. |
| params.state | number | The recorder state |


### jamulusclient/disconnected
### jamulusclient/serverInfoReceived

Emitted when the client is disconnected from the server.
Emitted when a server info is received.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params | object | No parameters (empty object). |
| params.address | string | The server socket address |
| params.pingtime | number | The round-trip ping time in ms |
| params.numClients | number | The quantity of clients connected to the server |


### jamulusclient/recorderState
### jamulusclient/serverListReceived

Emitted when the client is connected to a server who's recorder state changes.
Emitted when the server list is received.

Parameters:

| Name | Type | Description |
| --- | --- | --- |
| params.state | number | The recorder state (see ERecorderState). |
| params.servers | array | The server list. |
| params.servers[*].address | string | Socket address (ip_address:port) |
| params.servers[*].name | string | Server name |
| params.servers[*].country | string | Server country |
| params.servers[*].city | string | Server city |


0 comments on commit a23fd99

Please sign in to comment.