Skip to content

Files

Latest commit

 

History

History
1374 lines (928 loc) · 46 KB

MetadataApi.md

File metadata and controls

1374 lines (928 loc) · 46 KB

Sendbird.MetadataApi

All URIs are relative to https://api-APP_ID.sendbird.com

Method HTTP request Description
createChannelMetacounter POST /v3/{channel_type}/{channel_url}/metacounter Create a channel metacounter
createChannelMetadata POST /v3/{channel_type}/{channel_url}/metadata Create a channel metadata
createUserMetadata POST /v3/users/{user_id}/metadata Create a user metadata
deleteChannelMetacounter DELETE /v3/{channel_type}/{channel_url}/metacounter Delete a channel metacounter - When deleting all items of a channel metacounter
deleteChannelMetacounterByKey DELETE /v3/{channel_type}/{channel_url}/metacounter/{key} Delete a channel metacounter - When deleting a specific item of a channel metacounter by its key
deleteChannelMetadata DELETE /v3/{channel_type}/{channel_url}/metadata Delete a channel metadata - When deleting all items of a channel metadata
deleteChannelMetadataByKey DELETE /v3/{channel_type}/{channel_url}/metadata/{key} Delete a channel metadata - When deleting a specific item of a channel metadata by its key
deleteUserMetadata DELETE /v3/users/{user_id}/metadata Delete a user metadata - When deleting all items of a user metadata
deleteUserMetadataByKey DELETE /v3/users/{user_id}/metadata/{key} Delete a user metadata - When deleting a specific item of a user metadata by its key
updateChannelMetacounter PUT /v3/{channel_type}/{channel_url}/metacounter Update a channel metacounter - When updating existing items of a channel metacounter by their keys or adding new items to the metacounter
updateChannelMetacounterByKey PUT /v3/{channel_type}/{channel_url}/metacounter/{key} Update a channel metacounter - When updating a specific item of a channel metacounter by its key
updateChannelMetadata PUT /v3/{channel_type}/{channel_url}/metadata Update a channel metadata - When updating existing items of a channel metadata by their keys or adding new items to the metadata
updateChannelMetadataByKey PUT /v3/{channel_type}/{channel_url}/metadata/{key} Update a channel metadata - When updating a specific item of a channel metadata by its key
updateUserMetadata PUT /v3/users/{user_id}/metadata Update a user metadata - When updating existing items of a user metadata by their keys or adding new items to the metadata
updateUserMetadataByKey PUT /v3/users/{user_id}/metadata/{key} Update a user metadata - When updating a specific item of a user metadata by its key
viewChannelMetacounter GET /v3/{channel_type}/{channel_url}/metacounter View a channel metacounter - When retrieving all items of a channel metacounter
viewChannelMetacounterByKey GET /v3/{channel_type}/{channel_url}/metacounter/{key} View a channel metacounter - When retrieving a specific item of a channel metacounter by its key
viewChannelMetadata GET /v3/{channel_type}/{channel_url}/metadata View a channel metadata - When retrieving all items of a channel metadata
viewChannelMetadataByKey GET /v3/{channel_type}/{channel_url}/metadata/{key} View a channel metadata - When retrieving a specific item of a channel metadata by its key
viewUserMetadata GET /v3/users/{user_id}/metadata View a user metadata - When retrieving all items of a user metadata
viewUserMetadataByKey GET /v3/users/{user_id}/metadata/{key} View a user metadata - When retrieving a specific item of a user metadata by its key

createChannelMetacounter

any createChannelMetacounter()

Create a channel metacounter Creates a channel metacounter's items to store in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-create-a-channel-metacounter ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiCreateChannelMetacounterRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // CreateChannelMetacounterData (optional)
  createChannelMetacounterData: {
    channelType: "channelType_example",
    channelUrl: "channelUrl_example",
    metacounter: "metacounter_example",
  },
};

apiInstance.createChannelMetacounter(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createChannelMetacounterData CreateChannelMetacounterData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

any

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createChannelMetadata

CreateChannelMetadataResponse createChannelMetadata()

Create a channel metadata Creates a channel metadata's items to store in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-create-a-channel-metadata ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiCreateChannelMetadataRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // CreateChannelMetadataData (optional)
  createChannelMetadataData: {
    channelType: "channelType_example",
    channelUrl: "channelUrl_example",
    metadata: {},
    includeTs: true,
  },
};

apiInstance.createChannelMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createChannelMetadataData CreateChannelMetadataData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

CreateChannelMetadataResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createUserMetadata

CreateUserMetadataResponse createUserMetadata()

Create a user metadata Creates a user metadata's items to store in a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-create-a-user-metadata ----------------------------

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiCreateUserMetadataRequest = {
  // string
  userId: "user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // CreateUserMetadataData (optional)
  createUserMetadataData: {
    metadata: {},
  },
};

apiInstance.createUserMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createUserMetadataData CreateUserMetadataData
userId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

CreateUserMetadataResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteChannelMetacounter

void deleteChannelMetacounter()

Delete a channel metacounter Deletes a channel metacounter's item that is stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel which has the metacounter to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteChannelMetacounterRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.deleteChannelMetacounter(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteChannelMetacounterByKey

void deleteChannelMetacounterByKey()

Delete a channel metacounter Deletes a channel metacounter's item that is stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel which has the metacounter to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteChannelMetacounterByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.deleteChannelMetacounterByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteChannelMetadata

void deleteChannelMetadata()

Delete a channel metadata Deletes a channel metadata's one or all items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel which has the metadata to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteChannelMetadataRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  key: "key_example",
};

apiInstance.deleteChannelMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
key [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteChannelMetadataByKey

void deleteChannelMetadataByKey()

Delete a channel metadata Deletes a channel metadata's one or all items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the channel which has the metadata to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteChannelMetadataByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.deleteChannelMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUserMetadata

void deleteUserMetadata()

Delete a user metadata Deletes a user metadata's one or all items that are stored in a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user who has the metadata to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteUserMetadataRequest = {
  // string
  userId: "user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  key: "key_example",
};

apiInstance.deleteUserMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
userId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
key [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteUserMetadataByKey

void deleteUserMetadataByKey()

Delete a user metadata Deletes a user metadata's one or all items that are stored in a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-delete-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user who has the metadata to delete.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiDeleteUserMetadataByKeyRequest = {
  // string
  userId: "user_id_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.deleteUserMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
userId [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

void

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateChannelMetacounter

any updateChannelMetacounter()

Update a channel metacounter Updates existing items of a channel metacounter by their keys, or adds new items to the metacounter. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateChannelMetacounterRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // UpdateChannelMetacounterData (optional)
  updateChannelMetacounterData: {
    metacounter: "metacounter_example",
    mode: "mode_example",
    upsert: true,
  },
};

apiInstance.updateChannelMetacounter(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
updateChannelMetacounterData UpdateChannelMetacounterData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

any

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateChannelMetacounterByKey

{ [key: string]: string; } updateChannelMetacounterByKey()

Update a channel metacounter Updates existing items of a channel metacounter by their keys, or adds new items to the metacounter. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateChannelMetacounterByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // any (optional)
  body: {},
};

apiInstance.updateChannelMetacounterByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
body any
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateChannelMetadata

{ [key: string]: string; } updateChannelMetadata()

Update a channel metadata Updates existing items of a channel metadata by their keys, or adds new items to the metadata. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateChannelMetadataRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // UpdateChannelMetadataData (optional)
  updateChannelMetadataData: {
    metadata: {},
    upsert: true,
  },
};

apiInstance.updateChannelMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
updateChannelMetadataData UpdateChannelMetadataData
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateChannelMetadataByKey

{ [key: string]: string; } updateChannelMetadataByKey()

Update a channel metadata Updates existing items of a channel metadata by their keys, or adds new items to the metadata. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateChannelMetadataByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // any (optional)
  body: {},
};

apiInstance.updateChannelMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
body any
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUserMetadata

UpdateUserMetadataResponse updateUserMetadata()

Update a user metadata Updates existing items of a user metadata by their keys, or adds new items to the metadata. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user to update the metadata in.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateUserMetadataRequest = {
  // string
  userId: "user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // UpdateUserMetadataData (optional)
  updateUserMetadataData: {
    metadata: {},
    upsert: true,
  },
};

apiInstance.updateUserMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
updateUserMetadataData UpdateUserMetadataData
userId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

UpdateUserMetadataResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateUserMetadataByKey

{ [key: string]: string; } updateUserMetadataByKey()

Update a user metadata Updates existing items of a user metadata by their keys, or adds new items to the metadata. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-update-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user to update the metadata in.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiUpdateUserMetadataByKeyRequest = {
  // string
  userId: "user_id_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // any (optional)
  body: {},
};

apiInstance.updateUserMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
body any
userId [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewChannelMetacounter

{ [key: string]: string; } viewChannelMetacounter()

View a channel metacounter Retrieves channel metacounter's one or more items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewChannelMetacounterRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  key: "key_example",
  // Array<string> (optional)
  keys: [
    "keys_example",
  ],
};

apiInstance.viewChannelMetacounter(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
key [string] (optional) defaults to undefined
keys Array<string> (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewChannelMetacounterByKey

any viewChannelMetacounterByKey()

View a channel metacounter Retrieves channel metacounter's one or more items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-channel-metacounter ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewChannelMetacounterByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.viewChannelMetacounterByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

any

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewChannelMetadata

{ [key: string]: string; } viewChannelMetadata()

View a channel metadata Retrieves a channel metadata's one or more items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewChannelMetadataRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  key: "key_example",
  // Array<string> (optional)
  keys: [
    "keys_example",
  ],
};

apiInstance.viewChannelMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
key [string] (optional) defaults to undefined
keys Array<string> (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewChannelMetadataByKey

{ [key: string]: string; } viewChannelMetadataByKey()

View a channel metadata Retrieves a channel metadata's one or more items that are stored in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-channel-metadata ---------------------------- channel_type Type: string Description: Specifies the type of the channel. Either open_channels or group_channels. channel_url Type: string Description: Specifies the URL of the target channel.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewChannelMetadataByKeyRequest = {
  // string
  channelType: "channel_type_example",
  // string
  channelUrl: "channel_url_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.viewChannelMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
channelType [string] defaults to undefined
channelUrl [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewUserMetadata

ViewUserMetadataResponse viewUserMetadata()

View a user metadata Retrieves a user metadata's one or more items that are stored in a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user to retrieve the metadata in.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewUserMetadataRequest = {
  // string
  userId: "user_id_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
  // string (optional)
  key: "key_example",
  // Array<string> (optional)
  keys: [
    "keys_example",
  ],
};

apiInstance.viewUserMetadata(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
userId [string] defaults to undefined
apiToken [string] (optional) defaults to undefined
key [string] (optional) defaults to undefined
keys Array<string> (optional) defaults to undefined

Return type

ViewUserMetadataResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

viewUserMetadataByKey

{ [key: string]: string; } viewUserMetadataByKey()

View a user metadata Retrieves a user metadata's one or more items that are stored in a user. https://sendbird.com/docs/chat/v3/platform-api/guides/user-and-channel-metadata#2-view-a-user-metadata ---------------------------- user_id Type: string Description: Specifies the ID of the user to retrieve the metadata in.

Example

import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';

const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.MetadataApi(configuration);

let body:Sendbird.MetadataApiViewUserMetadataByKeyRequest = {
  // string
  userId: "user_id_example",
  // string
  key: "key_example",
  // string (optional)
  apiToken: "{{API_TOKEN}}",
};

apiInstance.viewUserMetadataByKey(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
userId [string] defaults to undefined
key [string] defaults to undefined
apiToken [string] (optional) defaults to undefined

Return type

{ [key: string]: string; }

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

[Back to top] [Back to API list] [Back to Model list] [Back to README]