Class: GetStream::Generated::CommonClient
- Inherits:
-
Object
- Object
- GetStream::Generated::CommonClient
- Defined in:
- lib/getstream_ruby/generated/common_client.rb
Overview
Common API client with generated methods
Instance Method Summary collapse
-
#add_user_group_members(_id, add_user_group_members_request) ⇒ Models::AddUserGroupMembersResponse
Adds members to a user group.
-
#block_users(block_users_request) ⇒ Models::BlockUsersResponse
Block users.
-
#cancel_import_v2_task(_id) ⇒ Models::CancelImportV2TaskResponse
Requests a controlled stop of an import v2 task.
- #check_external_storage(name) ⇒ Models::CheckExternalStorageResponse
-
#check_gcp_pub_sub(check_gcp_pub_sub_request = nil) ⇒ Models::CheckGCPPubSubResponse
Validates that Stream can publish to a customer-owned GCP Pub/Sub topic.
-
#check_push(check_push_request = nil) ⇒ Models::CheckPushResponse
Sends a test message via push, this is a test endpoint to verify your push settings.
-
#check_sns(check_sns_request = nil) ⇒ Models::CheckSNSResponse
Validates Amazon SNS configuration.
-
#check_sqs(check_sqs_request = nil) ⇒ Models::CheckSQSResponse
Validates Amazon SQS credentials.
-
#claim_guest_user(claim_guest_user_request) ⇒ Models::ClaimGuestUserResponse
Claims a guest user for a regular user.
-
#create_block_list(create_block_list_request) ⇒ Models::CreateBlockListResponse
Creates a new application blocklist, once created the blocklist can be used by any channel type.
-
#create_device(create_device_request) ⇒ Models::Response
Adds a new device to a user, if the same device already exists the call will have no effect.
-
#create_external_storage(create_external_storage_request) ⇒ Models::CreateExternalStorageResponse
Creates new external storage.
- #create_guest(create_guest_request) ⇒ Models::CreateGuestResponse
-
#create_import(create_import_request) ⇒ Models::CreateImportResponse
Creates a new import.
-
#create_import_url(create_import_url_request = nil) ⇒ Models::CreateImportURLResponse
Creates a new import URL.
-
#create_import_v2_task(create_import_v2_task_request) ⇒ Models::CreateImportV2TaskResponse
Creates a new import v2 task.
-
#create_permission(create_permission_request) ⇒ Models::Response
Creates permission.
-
#create_poll(create_poll_request) ⇒ Models::PollResponse
Creates a new poll.
-
#create_poll_option(poll_id, create_poll_option_request) ⇒ Models::PollOptionResponse
Creates a poll optionSends events:- feeds.poll.updated- poll.updated.
-
#create_role(create_role_request) ⇒ Models::CreateRoleResponse
Creates custom role.
-
#create_user_group(create_user_group_request) ⇒ Models::CreateUserGroupResponse
Creates a new user group, optionally with initial members.
-
#deactivate_user(user_id, deactivate_user_request = nil) ⇒ Models::DeactivateUserResponse
Deactivates user with possibility to activate it backSends events:- user.deactivated.
-
#deactivate_users(deactivate_users_request) ⇒ Models::DeactivateUsersResponse
Deactivate users in batchesSends events:- user.deactivated.
-
#delete_block_list(name, team = nil, user_id = nil) ⇒ Models::Response
Deletes previously created application blocklist.
-
#delete_device(_id, user_id = nil) ⇒ Models::Response
Deletes one device.
-
#delete_external_storage(name) ⇒ Models::DeleteExternalStorageResponse
Deletes external storage.
-
#delete_file(url = nil) ⇒ Models::Response
Deletes previously uploaded file.
-
#delete_image(url = nil) ⇒ Models::Response
Deletes previously uploaded image.
-
#delete_import_v2_task(_id) ⇒ Models::DeleteImportV2TaskResponse
Deletes an import v2 task.
-
#delete_importer_external_storage ⇒ Models::DeleteExternalStorageResponse
Removes the external storage configuration for the app.
-
#delete_permission(_id) ⇒ Models::Response
Deletes custom permission.
-
#delete_poll(poll_id, user_id = nil) ⇒ Models::Response
Deletes a pollSends events:- feeds.poll.deleted- poll.deleted.
-
#delete_poll_option(poll_id, option_id, user_id = nil) ⇒ Models::Response
Deletes a poll optionSends events:- feeds.poll.updated- poll.updated.
-
#delete_push_provider(_type, name) ⇒ Models::Response
Delete a push provider from v2 with multi bundle/package support.
-
#delete_role(name) ⇒ Models::Response
Deletes custom role.
-
#delete_user_group(_id, team_id = nil) ⇒ Models::Response
Deletes a user group and all its members.
-
#delete_users(delete_users_request) ⇒ Models::DeleteUsersResponse
Deletes users and optionally all their belongings asynchronously.Sends events:- channel.deleted- user.deleted.
-
#export_user(user_id) ⇒ Models::ExportUserResponse
Exports the user's profile, reactions and messages.
-
#export_users(export_users_request) ⇒ Models::ExportUsersResponse
Exports user profile, reactions and messages for list of given users.
-
#get_app ⇒ Models::GetApplicationResponse
This Method returns the application settings.
-
#get_block_list(name, team = nil) ⇒ Models::GetBlockListResponse
Returns block list by given name.
-
#get_blocked_users(user_id = nil, limit = nil, _next = nil) ⇒ Models::GetBlockedUsersResponse
Returns users blocked by one user, oldest block first.
- #get_hook_events(product = nil) ⇒ Models::GetHookEventsResponse
-
#get_import(_id) ⇒ Models::GetImportResponse
Gets an import.
-
#get_import_v2_task(_id) ⇒ Models::GetImportV2TaskResponse
Gets a single import v2 task by ID.
-
#get_importer_external_storage ⇒ Models::GetExternalStorageResponse
Returns the current external storage configuration for the app.
-
#get_og(url) ⇒ Models::GetOGResponse
Get an OpenGraph attachment for a link.
-
#get_permission(_id) ⇒ Models::GetCustomPermissionResponse
Gets custom permission.
-
#get_poll(poll_id, user_id = nil) ⇒ Models::PollResponse
Retrieves a poll.
-
#get_poll_option(poll_id, option_id, user_id = nil) ⇒ Models::PollOptionResponse
Retrieves a poll option.
-
#get_push_templates(push_provider_type, push_provider_name = nil) ⇒ Models::GetPushTemplatesResponse
Retrieve push notification templates for Chat.
-
#get_rate_limits(server_side = nil, android = nil, ios = nil, web = nil, unity = nil, unity_desktop = nil, unity_console = nil, endpoints = nil) ⇒ Models::GetRateLimitsResponse
Get rate limits usage and quotas, and the query budget status of budgeted endpoints.
-
#get_task(_id) ⇒ Models::GetTaskResponse
Gets status of a task.
-
#get_user_group(_id, team_id = nil) ⇒ Models::GetUserGroupResponse
Gets a user group by ID, including its members.
-
#get_user_live_locations(user_id = nil) ⇒ Models::SharedLocationsResponse
Retrieves all active live locations for a user.
-
#import_block_list(_id, import_block_list_request) ⇒ Models::ImportBlockListResponse
Enqueues an asynchronous bulk import of items into an existing blocklist.Returns a task ID that can be polled via GET /tasks/id to observe progress.AddItems is idempotent: items already present are skipped without error.For lists exceeding the HTTP request-body cap, issue repeated import calls eachcarrying a bounded slice of items — the task result accumulates correctly.
-
#initialize(client) ⇒ CommonClient
constructor
A new instance of CommonClient.
-
#list_block_lists(team = nil, cursor = nil, limit = nil) ⇒ Models::ListBlockListResponse
Returns all available block lists.
-
#list_devices(user_id = nil) ⇒ Models::ListDevicesResponse
Returns all available devices.
-
#list_external_storage ⇒ Models::ListExternalStorageResponse
Lists external storage.
-
#list_import_v2_tasks(state = nil) ⇒ Models::ListImportV2TasksResponse
Lists all import v2 tasks for the app.
-
#list_imports(limit = nil, offset = nil) ⇒ Models::ListImportsResponse
Gets an import.
-
#list_permissions ⇒ Models::ListPermissionsResponse
Lists all available permissions.
-
#list_push_providers ⇒ Models::ListPushProvidersResponse
List details of all push providers.
-
#list_roles ⇒ Models::ListRolesResponse
Lists all available roles.
-
#list_user_groups(limit = nil, id_gt = nil, created_at_gt = nil, team_id = nil) ⇒ Models::ListUserGroupsResponse
Lists user groups with cursor-based pagination.
-
#query_poll_votes(poll_id, query_poll_votes_request = nil, user_id = nil) ⇒ Models::PollVotesResponse
Queries votes.
-
#query_polls(query_polls_request = nil, user_id = nil) ⇒ Models::QueryPollsResponse
Queries polls.
-
#query_users(payload = nil) ⇒ Models::QueryUsersResponse
Find and filter users.
-
#reactivate_user(user_id, reactivate_user_request = nil) ⇒ Models::ReactivateUserResponse
Activates user who's been deactivated previouslySends events:- user.reactivated.
-
#reactivate_users(reactivate_users_request) ⇒ Models::ReactivateUsersResponse
Reactivate users in batchesSends events:- user.reactivated.
-
#remove_user_group_members(_id, remove_user_group_members_request) ⇒ Models::RemoveUserGroupMembersResponse
Removes members from a user group.
-
#restore_users(restore_users_request) ⇒ Models::Response
Restore soft deleted users.
-
#search_roles(query, limit = nil, name_gt = nil, role_type = nil, include_global_roles = nil) ⇒ Models::SearchRolesResponse
Searches mentionable roles (user-assignable + channel-assignable, built-in and custom) by name prefix for autocomplete.
-
#search_user_groups(query, limit = nil, name_gt = nil, id_gt = nil, team_id = nil) ⇒ Models::SearchUserGroupsResponse
Searches user groups by name prefix for autocomplete.
-
#unblock_users(unblock_users_request) ⇒ Models::UnblockUsersResponse
Unblock users.
-
#update_app(update_app_request = nil) ⇒ Models::Response
This Method updates one or more application settings.
-
#update_block_list(name, update_block_list_request = nil) ⇒ Models::UpdateBlockListResponse
Updates contents of the block list.
- #update_external_storage(name, update_external_storage_request) ⇒ Models::UpdateExternalStorageResponse
-
#update_live_location(update_live_location_request, user_id = nil) ⇒ Models::SharedLocationResponse
Updates an existing live location with new coordinates or expiration time.
-
#update_permission(_id, permission_request) ⇒ Models::Response
Updates custom permission.
-
#update_poll(update_poll_request) ⇒ Models::PollResponse
Updates a pollSends events:- feeds.poll.closed- feeds.poll.updated- poll.closed- poll.updated.
-
#update_poll_option(poll_id, update_poll_option_request) ⇒ Models::PollOptionResponse
Updates a poll optionSends events:- feeds.poll.updated- poll.updated.
-
#update_poll_partial(poll_id, update_poll_partial_request = nil) ⇒ Models::PollResponse
Updates a poll partiallySends events:- feeds.poll.closed- feeds.poll.updated- poll.closed- poll.updated.
-
#update_push_notification_preferences(upsert_push_preferences_request) ⇒ Models::UpsertPushPreferencesResponse
Upserts the push preferences for a user and or channel member.
-
#update_user_group(_id, update_user_group_request = nil) ⇒ Models::UpdateUserGroupResponse
Updates a user group's name and/or description.
-
#update_users(update_users_request) ⇒ Models::UpdateUsersResponse
Update or create users in bulkSends events:- user.updated.
-
#update_users_partial(update_users_partial_request) ⇒ Models::UpdateUsersResponse
Updates certain fields of the userSends events:- user.presence.changed- user.updated.
-
#upload_file(file_upload_request = nil) ⇒ Models::FileUploadResponse
Uploads file.
-
#upload_image(image_upload_request = nil) ⇒ Models::ImageUploadResponse
Uploads image.
-
#upsert_importer_external_storage(upsert_external_storage_request) ⇒ Models::UpsertExternalStorageResponse
Creates or updates the external storage configuration for the app.
-
#upsert_push_provider(upsert_push_provider_request = nil) ⇒ Models::UpsertPushProviderResponse
Upsert a push provider for v2 with multi bundle/package support.
-
#upsert_push_template(upsert_push_template_request) ⇒ Models::UpsertPushTemplateResponse
Create or update a push notification template for a specific event type and push provider.
-
#validate_importer_external_storage ⇒ Models::ValidateExternalStorageResponse
Validates the configured external storage.
Constructor Details
#initialize(client) ⇒ CommonClient
Returns a new instance of CommonClient.
12 13 14 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 12 def initialize(client) @client = client end |
Instance Method Details
#add_user_group_members(_id, add_user_group_members_request) ⇒ Models::AddUserGroupMembersResponse
Adds members to a user group. All user IDs must exist. The operation is all-or-nothing.
1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1389 def add_user_group_members(_id, add_user_group_members_request) path = '/api/v2/usergroups/{id}/members' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build request body body = add_user_group_members_request # Make the API request @client.make_request( :post, path, body: body ) end |
#block_users(block_users_request) ⇒ Models::BlockUsersResponse
Block users
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1502 def block_users(block_users_request) path = '/api/v2/users/block' # Build request body body = block_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#cancel_import_v2_task(_id) ⇒ Models::CancelImportV2TaskResponse
Requests a controlled stop of an import v2 task. Allowed only for tasks in queued or processing state; a processing import stops cleanly on its next progress tick.
606 607 608 609 610 611 612 613 614 615 616 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 606 def cancel_import_v2_task(_id) path = '/api/v2/imports/v2/{id}/cancel' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :post, path ) end |
#check_external_storage(name) ⇒ Models::CheckExternalStorageResponse
378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 378 def check_external_storage(name) path = '/api/v2/external_storage/{name}/check' # Replace path parameters path = path.gsub('{name}', name.to_s) # Make the API request @client.make_request( :get, path ) end |
#check_gcp_pub_sub(check_gcp_pub_sub_request = nil) ⇒ Models::CheckGCPPubSubResponse
Validates that Stream can publish to a customer-owned GCP Pub/Sub topic
172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 172 def check_gcp_pub_sub(check_gcp_pub_sub_request = nil) path = '/api/v2/check_gcp_pubsub' # Build request body body = check_gcp_pub_sub_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#check_push(check_push_request = nil) ⇒ Models::CheckPushResponse
Sends a test message via push, this is a test endpoint to verify your push settings
189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 189 def check_push(check_push_request = nil) path = '/api/v2/check_push' # Build request body body = check_push_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#check_sns(check_sns_request = nil) ⇒ Models::CheckSNSResponse
Validates Amazon SNS configuration
206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 206 def check_sns(check_sns_request = nil) path = '/api/v2/check_sns' # Build request body body = check_sns_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#check_sqs(check_sqs_request = nil) ⇒ Models::CheckSQSResponse
Validates Amazon SQS credentials
223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 223 def check_sqs(check_sqs_request = nil) path = '/api/v2/check_sqs' # Build request body body = check_sqs_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#claim_guest_user(claim_guest_user_request) ⇒ Models::ClaimGuestUserResponse
Claims a guest user for a regular user. The guest is deactivated and its channel memberships, owned channels, messages and reactions are moved to the claiming user by an asynchronous task. Server-side only.Sends events:- user.claimed- user.deactivated
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1519 def claim_guest_user(claim_guest_user_request) path = '/api/v2/users/claim_guest' # Build request body body = claim_guest_user_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_block_list(create_block_list_request) ⇒ Models::CreateBlockListResponse
Creates a new application blocklist, once created the blocklist can be used by any channel type
71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 71 def create_block_list(create_block_list_request) path = '/api/v2/blocklists' # Build request body body = create_block_list_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_device(create_device_request) ⇒ Models::Response
Adds a new device to a user, if the same device already exists the call will have no effect
278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 278 def create_device(create_device_request) path = '/api/v2/devices' # Build request body body = create_device_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_external_storage(create_external_storage_request) ⇒ Models::CreateExternalStorageResponse
Creates new external storage
325 326 327 328 329 330 331 332 333 334 335 336 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 325 def create_external_storage(create_external_storage_request) path = '/api/v2/external_storage' # Build request body body = create_external_storage_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_guest(create_guest_request) ⇒ Models::CreateGuestResponse
394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 394 def create_guest(create_guest_request) path = '/api/v2/guest' # Build request body body = create_guest_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_import(create_import_request) ⇒ Models::CreateImportResponse
Creates a new import
466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 466 def create_import(create_import_request) path = '/api/v2/imports' # Build request body body = create_import_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_import_url(create_import_url_request = nil) ⇒ Models::CreateImportURLResponse
Creates a new import URL
429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 429 def create_import_url(create_import_url_request = nil) path = '/api/v2/import_urls' # Build request body body = create_import_url_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#create_import_v2_task(create_import_v2_task_request) ⇒ Models::CreateImportV2TaskResponse
Creates a new import v2 task
501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 501 def create_import_v2_task(create_import_v2_task_request) path = '/api/v2/imports/v2' # Build request body body = create_import_v2_task_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_permission(create_permission_request) ⇒ Models::Response
Creates permission
669 670 671 672 673 674 675 676 677 678 679 680 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 669 def () path = '/api/v2/permissions' # Build request body body = # Make the API request @client.make_request( :post, path, body: body ) end |
#create_poll(create_poll_request) ⇒ Models::PollResponse
Creates a new poll
738 739 740 741 742 743 744 745 746 747 748 749 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 738 def create_poll(create_poll_request) path = '/api/v2/polls' # Build request body body = create_poll_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_poll_option(poll_id, create_poll_option_request) ⇒ Models::PollOptionResponse
Creates a poll optionSends events:- feeds.poll.updated- poll.updated
857 858 859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 857 def create_poll_option(poll_id, create_poll_option_request) path = '/api/v2/polls/{poll_id}/options' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build request body body = create_poll_option_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_role(create_role_request) ⇒ Models::CreateRoleResponse
Creates custom role
1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1114 def create_role(create_role_request) path = '/api/v2/roles' # Build request body body = create_role_request # Make the API request @client.make_request( :post, path, body: body ) end |
#create_user_group(create_user_group_request) ⇒ Models::CreateUserGroupResponse
Creates a new user group, optionally with initial members
1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1283 def create_user_group(create_user_group_request) path = '/api/v2/usergroups' # Build request body body = create_user_group_request # Make the API request @client.make_request( :post, path, body: body ) end |
#deactivate_user(user_id, deactivate_user_request = nil) ⇒ Models::DeactivateUserResponse
Deactivates user with possibility to activate it backSends events:- user.deactivated
1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1662 def deactivate_user(user_id, deactivate_user_request = nil) path = '/api/v2/users/{user_id}/deactivate' # Replace path parameters path = path.gsub('{user_id}', user_id.to_s) # Build request body body = deactivate_user_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#deactivate_users(deactivate_users_request) ⇒ Models::DeactivateUsersResponse
Deactivate users in batchesSends events:- user.deactivated
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1536 def deactivate_users(deactivate_users_request) path = '/api/v2/users/deactivate' # Build request body body = deactivate_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#delete_block_list(name, team = nil, user_id = nil) ⇒ Models::Response
Deletes previously created application blocklist
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 110 def delete_block_list(name, team = nil, user_id = nil) path = '/api/v2/blocklists/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Build query parameters query_params = {} query_params['team'] = team unless team.nil? query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_device(_id, user_id = nil) ⇒ Models::Response
Deletes one device
241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 241 def delete_device(_id, user_id = nil) path = '/api/v2/devices' # Build query parameters query_params = {} query_params['id'] = _id unless _id.nil? query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_external_storage(name) ⇒ Models::DeleteExternalStorageResponse
Deletes external storage
342 343 344 345 346 347 348 349 350 351 352 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 342 def delete_external_storage(name) path = '/api/v2/external_storage/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Make the API request @client.make_request( :delete, path ) end |
#delete_file(url = nil) ⇒ Models::Response
Deletes previously uploaded file. A client can delete its own uploads; deleting another user's upload needs DeleteAttachmentGlobal for uploads of other users (by default, moderators and admins; in a multi-tenant app, within the uploader's team).
1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1189 def delete_file(url = nil) path = '/api/v2/uploads/file' # Build query parameters query_params = {} query_params['url'] = url unless url.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_image(url = nil) ⇒ Models::Response
Deletes previously uploaded image. A client can delete its own uploads; deleting another user's upload needs DeleteAttachmentGlobal for uploads of other users (by default, moderators and admins; in a multi-tenant app, within the uploader's team).
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1224 def delete_image(url = nil) path = '/api/v2/uploads/image' # Build query parameters query_params = {} query_params['url'] = url unless url.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_import_v2_task(_id) ⇒ Models::DeleteImportV2TaskResponse
Deletes an import v2 task. Can only delete tasks in queued state.
574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 574 def delete_import_v2_task(_id) path = '/api/v2/imports/v2/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :delete, path ) end |
#delete_importer_external_storage ⇒ Models::DeleteExternalStorageResponse
Removes the external storage configuration for the app. Idempotent: succeeds even if no configuration exists.
517 518 519 520 521 522 523 524 525 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 517 def delete_importer_external_storage() path = '/api/v2/imports/v2/external-storage' # Make the API request @client.make_request( :delete, path ) end |
#delete_permission(_id) ⇒ Models::Response
Deletes custom permission
686 687 688 689 690 691 692 693 694 695 696 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 686 def (_id) path = '/api/v2/permissions/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :delete, path ) end |
#delete_poll(poll_id, user_id = nil) ⇒ Models::Response
Deletes a pollSends events:- feeds.poll.deleted- poll.deleted
795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 795 def delete_poll(poll_id, user_id = nil) path = '/api/v2/polls/{poll_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_poll_option(poll_id, option_id, user_id = nil) ⇒ Models::Response
Deletes a poll optionSends events:- feeds.poll.updated- poll.updated
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 898 def delete_poll_option(poll_id, option_id, user_id = nil) path = '/api/v2/polls/{poll_id}/options/{option_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) path = path.gsub('{option_id}', option_id.to_s) # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_push_provider(_type, name) ⇒ Models::Response
Delete a push provider from v2 with multi bundle/package support. v1 isn't supported in this endpoint
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1015 def delete_push_provider(_type, name) path = '/api/v2/push_providers/{type}/{name}' # Replace path parameters path = path.gsub('{type}', _type.to_s) path = path.gsub('{name}', name.to_s) # Make the API request @client.make_request( :delete, path ) end |
#delete_role(name) ⇒ Models::Response
Deletes custom role
1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1157 def delete_role(name) path = '/api/v2/roles/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Make the API request @client.make_request( :delete, path ) end |
#delete_user_group(_id, team_id = nil) ⇒ Models::Response
Deletes a user group and all its members
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1327 def delete_user_group(_id, team_id = nil) path = '/api/v2/usergroups/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build query parameters query_params = {} query_params['team_id'] = team_id unless team_id.nil? # Make the API request @client.make_request( :delete, path, query_params: query_params ) end |
#delete_users(delete_users_request) ⇒ Models::DeleteUsersResponse
Deletes users and optionally all their belongings asynchronously.Sends events:- channel.deleted- user.deleted
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1553 def delete_users(delete_users_request) path = '/api/v2/users/delete' # Build request body body = delete_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#export_user(user_id) ⇒ Models::ExportUserResponse
Exports the user's profile, reactions and messages. Raises an error if a user has more than 10k messages or reactions
1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1681 def export_user(user_id) path = '/api/v2/users/{user_id}/export' # Replace path parameters path = path.gsub('{user_id}', user_id.to_s) # Make the API request @client.make_request( :get, path ) end |
#export_users(export_users_request) ⇒ Models::ExportUsersResponse
Exports user profile, reactions and messages for list of given users
295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 295 def export_users(export_users_request) path = '/api/v2/export/users' # Build request body body = export_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#get_app ⇒ Models::GetApplicationResponse
This Method returns the application settings
18 19 20 21 22 23 24 25 26 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 18 def get_app() path = '/api/v2/app' # Make the API request @client.make_request( :get, path ) end |
#get_block_list(name, team = nil) ⇒ Models::GetBlockListResponse
Returns block list by given name
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 132 def get_block_list(name, team = nil) path = '/api/v2/blocklists/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Build query parameters query_params = {} query_params['team'] = team unless team.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_blocked_users(user_id = nil, limit = nil, _next = nil) ⇒ Models::GetBlockedUsersResponse
Returns users blocked by one user, oldest block first. Page with limit (default 500, max 500) and next.
1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1482 def get_blocked_users(user_id = nil, limit = nil, _next = nil) path = '/api/v2/users/block' # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? query_params['limit'] = limit unless limit.nil? query_params['next'] = _next unless _next.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_hook_events(product = nil) ⇒ Models::GetHookEventsResponse
411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 411 def get_hook_events(product = nil) path = '/api/v2/hook/events' # Build query parameters query_params = {} query_params['product'] = product unless product.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_import(_id) ⇒ Models::GetImportResponse
Gets an import
622 623 624 625 626 627 628 629 630 631 632 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 622 def get_import(_id) path = '/api/v2/imports/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :get, path ) end |
#get_import_v2_task(_id) ⇒ Models::GetImportV2TaskResponse
Gets a single import v2 task by ID
590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 590 def get_import_v2_task(_id) path = '/api/v2/imports/v2/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :get, path ) end |
#get_importer_external_storage ⇒ Models::GetExternalStorageResponse
Returns the current external storage configuration for the app. Returns 404 if no configuration exists.
530 531 532 533 534 535 536 537 538 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 530 def get_importer_external_storage() path = '/api/v2/imports/v2/external-storage' # Make the API request @client.make_request( :get, path ) end |
#get_og(url) ⇒ Models::GetOGResponse
Get an OpenGraph attachment for a link
638 639 640 641 642 643 644 645 646 647 648 649 650 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 638 def get_og(url) path = '/api/v2/og' # Build query parameters query_params = {} query_params['url'] = url unless url.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_permission(_id) ⇒ Models::GetCustomPermissionResponse
Gets custom permission
702 703 704 705 706 707 708 709 710 711 712 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 702 def (_id) path = '/api/v2/permissions/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :get, path ) end |
#get_poll(poll_id, user_id = nil) ⇒ Models::PollResponse
Retrieves a poll
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 816 def get_poll(poll_id, user_id = nil) path = '/api/v2/polls/{poll_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_poll_option(poll_id, option_id, user_id = nil) ⇒ Models::PollOptionResponse
Retrieves a poll option
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 921 def get_poll_option(poll_id, option_id, user_id = nil) path = '/api/v2/polls/{poll_id}/options/{option_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) path = path.gsub('{option_id}', option_id.to_s) # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_push_templates(push_provider_type, push_provider_name = nil) ⇒ Models::GetPushTemplatesResponse
Retrieve push notification templates for Chat.
1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1033 def get_push_templates(push_provider_type, push_provider_name = nil) path = '/api/v2/push_templates' # Build query parameters query_params = {} query_params['push_provider_type'] = push_provider_type unless push_provider_type.nil? query_params['push_provider_name'] = push_provider_name unless push_provider_name.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_rate_limits(server_side = nil, android = nil, ios = nil, web = nil, unity = nil, unity_desktop = nil, unity_console = nil, endpoints = nil) ⇒ Models::GetRateLimitsResponse
Get rate limits usage and quotas, and the query budget status of budgeted endpoints
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1076 def get_rate_limits(server_side = nil, android = nil, ios = nil, web = nil, unity = nil, unity_desktop = nil, unity_console = nil, endpoints = nil) path = '/api/v2/rate_limits' # Build query parameters query_params = {} query_params['server_side'] = server_side unless server_side.nil? query_params['android'] = android unless android.nil? query_params['ios'] = ios unless ios.nil? query_params['web'] = web unless web.nil? query_params['unity'] = unity unless unity.nil? query_params['unity_desktop'] = unity_desktop unless unity_desktop.nil? query_params['unity_console'] = unity_console unless unity_console.nil? query_params['endpoints'] = endpoints unless endpoints.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_task(_id) ⇒ Models::GetTaskResponse
Gets status of a task
1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1173 def get_task(_id) path = '/api/v2/tasks/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Make the API request @client.make_request( :get, path ) end |
#get_user_group(_id, team_id = nil) ⇒ Models::GetUserGroupResponse
Gets a user group by ID, including its members
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1348 def get_user_group(_id, team_id = nil) path = '/api/v2/usergroups/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build query parameters query_params = {} query_params['team_id'] = team_id unless team_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#get_user_live_locations(user_id = nil) ⇒ Models::SharedLocationsResponse
Retrieves all active live locations for a user
1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1570 def get_user_live_locations(user_id = nil) path = '/api/v2/users/live_locations' # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#import_block_list(_id, import_block_list_request) ⇒ Models::ImportBlockListResponse
Enqueues an asynchronous bulk import of items into an existing blocklist.Returns a task ID that can be polled via GET /tasks/id to observe progress.AddItems is idempotent: items already present are skipped without error.For lists exceeding the HTTP request-body cap, issue repeated import calls eachcarrying a bounded slice of items — the task result accumulates correctly.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 89 def import_block_list(_id, import_block_list_request) path = '/api/v2/blocklists/{id}/import' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build request body body = import_block_list_request # Make the API request @client.make_request( :post, path, body: body ) end |
#list_block_lists(team = nil, cursor = nil, limit = nil) ⇒ Models::ListBlockListResponse
Returns all available block lists
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 51 def list_block_lists(team = nil, cursor = nil, limit = nil) path = '/api/v2/blocklists' # Build query parameters query_params = {} query_params['team'] = team unless team.nil? query_params['cursor'] = cursor unless cursor.nil? query_params['limit'] = limit unless limit.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#list_devices(user_id = nil) ⇒ Models::ListDevicesResponse
Returns all available devices
260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 260 def list_devices(user_id = nil) path = '/api/v2/devices' # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#list_external_storage ⇒ Models::ListExternalStorageResponse
Lists external storage
311 312 313 314 315 316 317 318 319 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 311 def list_external_storage() path = '/api/v2/external_storage' # Make the API request @client.make_request( :get, path ) end |
#list_import_v2_tasks(state = nil) ⇒ Models::ListImportV2TasksResponse
Lists all import v2 tasks for the app
483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 483 def list_import_v2_tasks(state = nil) path = '/api/v2/imports/v2' # Build query parameters query_params = {} query_params['state'] = state unless state.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#list_imports(limit = nil, offset = nil) ⇒ Models::ListImportsResponse
Gets an import
447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 447 def list_imports(limit = nil, offset = nil) path = '/api/v2/imports' # Build query parameters query_params = {} query_params['limit'] = limit unless limit.nil? query_params['offset'] = offset unless offset.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#list_permissions ⇒ Models::ListPermissionsResponse
Lists all available permissions
655 656 657 658 659 660 661 662 663 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 655 def () path = '/api/v2/permissions' # Make the API request @client.make_request( :get, path ) end |
#list_push_providers ⇒ Models::ListPushProvidersResponse
List details of all push providers.
983 984 985 986 987 988 989 990 991 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 983 def list_push_providers() path = '/api/v2/push_providers' # Make the API request @client.make_request( :get, path ) end |
#list_roles ⇒ Models::ListRolesResponse
Lists all available roles
1100 1101 1102 1103 1104 1105 1106 1107 1108 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1100 def list_roles() path = '/api/v2/roles' # Make the API request @client.make_request( :get, path ) end |
#list_user_groups(limit = nil, id_gt = nil, created_at_gt = nil, team_id = nil) ⇒ Models::ListUserGroupsResponse
Lists user groups with cursor-based pagination
1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1262 def list_user_groups(limit = nil, id_gt = nil, created_at_gt = nil, team_id = nil) path = '/api/v2/usergroups' # Build query parameters query_params = {} query_params['limit'] = limit unless limit.nil? query_params['id_gt'] = id_gt unless id_gt.nil? query_params['created_at_gt'] = created_at_gt unless created_at_gt.nil? query_params['team_id'] = team_id unless team_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#query_poll_votes(poll_id, query_poll_votes_request = nil, user_id = nil) ⇒ Models::PollVotesResponse
Queries votes
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 944 def query_poll_votes(poll_id, query_poll_votes_request = nil, user_id = nil) path = '/api/v2/polls/{poll_id}/votes' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Build request body body = query_poll_votes_request || {} # Make the API request @client.make_request( :post, path, query_params: query_params, body: body ) end |
#query_polls(query_polls_request = nil, user_id = nil) ⇒ Models::QueryPollsResponse
Queries polls
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 773 def query_polls(query_polls_request = nil, user_id = nil) path = '/api/v2/polls/query' # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Build request body body = query_polls_request || {} # Make the API request @client.make_request( :post, path, query_params: query_params, body: body ) end |
#query_users(payload = nil) ⇒ Models::QueryUsersResponse
Find and filter users
1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1428 def query_users(payload = nil) path = '/api/v2/users' # Build query parameters query_params = {} query_params['payload'] = payload unless payload.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#reactivate_user(user_id, reactivate_user_request = nil) ⇒ Models::ReactivateUserResponse
Activates user who's been deactivated previouslySends events:- user.reactivated
1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1698 def reactivate_user(user_id, reactivate_user_request = nil) path = '/api/v2/users/{user_id}/reactivate' # Replace path parameters path = path.gsub('{user_id}', user_id.to_s) # Build request body body = reactivate_user_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#reactivate_users(reactivate_users_request) ⇒ Models::ReactivateUsersResponse
Reactivate users in batchesSends events:- user.reactivated
1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1610 def reactivate_users(reactivate_users_request) path = '/api/v2/users/reactivate' # Build request body body = reactivate_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#remove_user_group_members(_id, remove_user_group_members_request) ⇒ Models::RemoveUserGroupMembersResponse
Removes members from a user group. Users already not in the group are silently ignored.
1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1409 def remove_user_group_members(_id, remove_user_group_members_request) path = '/api/v2/usergroups/{id}/members/delete' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build request body body = remove_user_group_members_request # Make the API request @client.make_request( :post, path, body: body ) end |
#restore_users(restore_users_request) ⇒ Models::Response
Restore soft deleted users
1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1627 def restore_users(restore_users_request) path = '/api/v2/users/restore' # Build request body body = restore_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#search_roles(query, limit = nil, name_gt = nil, role_type = nil, include_global_roles = nil) ⇒ Models::SearchRolesResponse
Searches mentionable roles (user-assignable + channel-assignable, built-in and custom) by name prefix for autocomplete
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1135 def search_roles(query, limit = nil, name_gt = nil, role_type = nil, include_global_roles = nil) path = '/api/v2/roles/search' # Build query parameters query_params = {} query_params['query'] = query unless query.nil? query_params['limit'] = limit unless limit.nil? query_params['name_gt'] = name_gt unless name_gt.nil? query_params['role_type'] = role_type unless role_type.nil? query_params['include_global_roles'] = include_global_roles unless include_global_roles.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#search_user_groups(query, limit = nil, name_gt = nil, id_gt = nil, team_id = nil) ⇒ Models::SearchUserGroupsResponse
Searches user groups by name prefix for autocomplete
1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1304 def search_user_groups(query, limit = nil, name_gt = nil, id_gt = nil, team_id = nil) path = '/api/v2/usergroups/search' # Build query parameters query_params = {} query_params['query'] = query unless query.nil? query_params['limit'] = limit unless limit.nil? query_params['name_gt'] = name_gt unless name_gt.nil? query_params['id_gt'] = id_gt unless id_gt.nil? query_params['team_id'] = team_id unless team_id.nil? # Make the API request @client.make_request( :get, path, query_params: query_params ) end |
#unblock_users(unblock_users_request) ⇒ Models::UnblockUsersResponse
Unblock users
1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1644 def unblock_users(unblock_users_request) path = '/api/v2/users/unblock' # Build request body body = unblock_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#update_app(update_app_request = nil) ⇒ Models::Response
This Method updates one or more application settings
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 32 def update_app(update_app_request = nil) path = '/api/v2/app' # Build request body body = update_app_request || {} # Make the API request @client.make_request( :patch, path, body: body ) end |
#update_block_list(name, update_block_list_request = nil) ⇒ Models::UpdateBlockListResponse
Updates contents of the block list
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 153 def update_block_list(name, update_block_list_request = nil) path = '/api/v2/blocklists/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Build request body body = update_block_list_request || {} # Make the API request @client.make_request( :put, path, body: body ) end |
#update_external_storage(name, update_external_storage_request) ⇒ Models::UpdateExternalStorageResponse
359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 359 def update_external_storage(name, update_external_storage_request) path = '/api/v2/external_storage/{name}' # Replace path parameters path = path.gsub('{name}', name.to_s) # Build request body body = update_external_storage_request # Make the API request @client.make_request( :put, path, body: body ) end |
#update_live_location(update_live_location_request, user_id = nil) ⇒ Models::SharedLocationResponse
Updates an existing live location with new coordinates or expiration time
1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1589 def update_live_location(update_live_location_request, user_id = nil) path = '/api/v2/users/live_locations' # Build query parameters query_params = {} query_params['user_id'] = user_id unless user_id.nil? # Build request body body = update_live_location_request # Make the API request @client.make_request( :put, path, query_params: query_params, body: body ) end |
#update_permission(_id, permission_request) ⇒ Models::Response
Updates custom permission
719 720 721 722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 719 def (_id, ) path = '/api/v2/permissions/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build request body body = # Make the API request @client.make_request( :put, path, body: body ) end |
#update_poll(update_poll_request) ⇒ Models::PollResponse
Updates a pollSends events:- feeds.poll.closed- feeds.poll.updated- poll.closed- poll.updated
755 756 757 758 759 760 761 762 763 764 765 766 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 755 def update_poll(update_poll_request) path = '/api/v2/polls' # Build request body body = update_poll_request # Make the API request @client.make_request( :put, path, body: body ) end |
#update_poll_option(poll_id, update_poll_option_request) ⇒ Models::PollOptionResponse
Updates a poll optionSends events:- feeds.poll.updated- poll.updated
877 878 879 880 881 882 883 884 885 886 887 888 889 890 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 877 def update_poll_option(poll_id, update_poll_option_request) path = '/api/v2/polls/{poll_id}/options' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build request body body = update_poll_option_request # Make the API request @client.make_request( :put, path, body: body ) end |
#update_poll_partial(poll_id, update_poll_partial_request = nil) ⇒ Models::PollResponse
Updates a poll partiallySends events:- feeds.poll.closed- feeds.poll.updated- poll.closed- poll.updated
837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 837 def update_poll_partial(poll_id, update_poll_partial_request = nil) path = '/api/v2/polls/{poll_id}' # Replace path parameters path = path.gsub('{poll_id}', poll_id.to_s) # Build request body body = update_poll_partial_request || {} # Make the API request @client.make_request( :patch, path, body: body ) end |
#update_push_notification_preferences(upsert_push_preferences_request) ⇒ Models::UpsertPushPreferencesResponse
Upserts the push preferences for a user and or channel member. Set to all, mentions or none
967 968 969 970 971 972 973 974 975 976 977 978 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 967 def update_push_notification_preferences(upsert_push_preferences_request) path = '/api/v2/push_preferences' # Build request body body = upsert_push_preferences_request # Make the API request @client.make_request( :post, path, body: body ) end |
#update_user_group(_id, update_user_group_request = nil) ⇒ Models::UpdateUserGroupResponse
Updates a user group's name and/or description. team_id is immutable.
1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1369 def update_user_group(_id, update_user_group_request = nil) path = '/api/v2/usergroups/{id}' # Replace path parameters path = path.gsub('{id}', _id.to_s) # Build request body body = update_user_group_request || {} # Make the API request @client.make_request( :put, path, body: body ) end |
#update_users(update_users_request) ⇒ Models::UpdateUsersResponse
Update or create users in bulkSends events:- user.updated
1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1463 def update_users(update_users_request) path = '/api/v2/users' # Build request body body = update_users_request # Make the API request @client.make_request( :post, path, body: body ) end |
#update_users_partial(update_users_partial_request) ⇒ Models::UpdateUsersResponse
Updates certain fields of the userSends events:- user.presence.changed- user.updated
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1446 def update_users_partial(update_users_partial_request) path = '/api/v2/users' # Build request body body = update_users_partial_request # Make the API request @client.make_request( :patch, path, body: body ) end |
#upload_file(file_upload_request = nil) ⇒ Models::FileUploadResponse
Uploads file
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1207 def upload_file(file_upload_request = nil) path = '/api/v2/uploads/file' # Build request body body = file_upload_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#upload_image(image_upload_request = nil) ⇒ Models::ImageUploadResponse
Uploads image
1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1242 def upload_image(image_upload_request = nil) path = '/api/v2/uploads/image' # Build request body body = image_upload_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#upsert_importer_external_storage(upsert_external_storage_request) ⇒ Models::UpsertExternalStorageResponse
Creates or updates the external storage configuration for the app. Supports AWS S3 (via cross-account IAM role assumption) and GCS (via service-account JSON credentials).
544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 544 def upsert_importer_external_storage(upsert_external_storage_request) path = '/api/v2/imports/v2/external-storage' # Build request body body = upsert_external_storage_request # Make the API request @client.make_request( :put, path, body: body ) end |
#upsert_push_provider(upsert_push_provider_request = nil) ⇒ Models::UpsertPushProviderResponse
Upsert a push provider for v2 with multi bundle/package support
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 997 def upsert_push_provider(upsert_push_provider_request = nil) path = '/api/v2/push_providers' # Build request body body = upsert_push_provider_request || {} # Make the API request @client.make_request( :post, path, body: body ) end |
#upsert_push_template(upsert_push_template_request) ⇒ Models::UpsertPushTemplateResponse
Create or update a push notification template for a specific event type and push provider
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 1052 def upsert_push_template(upsert_push_template_request) path = '/api/v2/push_templates' # Build request body body = upsert_push_template_request # Make the API request @client.make_request( :post, path, body: body ) end |
#validate_importer_external_storage ⇒ Models::ValidateExternalStorageResponse
Validates the configured external storage. For AWS S3, performs a live STS AssumeRole and S3 ListObjectsV2 check. For GCS, performs a live bucket listing check using the configured service-account credentials.
560 561 562 563 564 565 566 567 568 |
# File 'lib/getstream_ruby/generated/common_client.rb', line 560 def validate_importer_external_storage() path = '/api/v2/imports/v2/external-storage/validate' # Make the API request @client.make_request( :post, path ) end |