source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/network_authentication/server_authentication.rb | Ruby | apache-2.0 | 220 | main | 1,093 | # typed: true
# frozen_string_literal: true
module Vonage
class NetworkAuthentication::ServerAuthentication < Namespace
extend T::Sig
self.authentication = BearerToken
self.host = :vonage_host
self.request_headers['Content-Type'] = 'application/x-www-form-urlencoded'
def token(purpose:, api_s... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/user.rb | Ruby | apache-2.0 | 220 | main | 2,327 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversation::User < Namespace
self.authentication = BearerToken
# List conversations associated with a user.
#
# @example
# response = client.conversation.user.list_conversations(user_id: 'USR-82e028d9-5201-4f1e-8188-604b2d3471ec... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/member.rb | Ruby | apache-2.0 | 220 | main | 4,376 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversation::Member < Namespace
self.authentication = BearerToken
self.request_body = JSON
# List members of a conversation
#
# @example
# response = client.conversation.member.list(conversation_id: 'CON-d66d47de-5bcb-4300-9... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/list_response.rb | Ruby | apache-2.0 | 220 | main | 229 | # typed: true
class Vonage::Conversation::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.conversations.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/event.rb | Ruby | apache-2.0 | 220 | main | 3,314 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversation::Event < Namespace
self.authentication = BearerToken
self.request_body = JSON
# List conversation events
#
# @example
# response = client.conversation.event.list(conversation_id: 'CON-d66d47de-5bcb-4300-94f0-0c9d... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/member/list_response.rb | Ruby | apache-2.0 | 220 | main | 231 | # typed: true
class Vonage::Conversation::Member::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.members.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/user/conversations_list_response.rb | Ruby | apache-2.0 | 220 | main | 248 | # typed: true
class Vonage::Conversation::User::ConversationsListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.conversations.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/user/sessions_list_response.rb | Ruby | apache-2.0 | 220 | main | 238 | # typed: true
class Vonage::Conversation::User::SessionsListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.sessions.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversation/event/list_response.rb | Ruby | apache-2.0 | 220 | main | 222 | # typed: true
class Vonage::Conversation::Event::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/sip.rb | Ruby | apache-2.0 | 220 | main | 1,193 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::SIP < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Initiate an outbound SIP call.
#
def dial(session_id:, token:, sip_uri:, **params)
request(
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/renders.rb | Ruby | apache-2.0 | 220 | main | 3,923 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Renders < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Start an Experience Composer Render
#
# @example
# response = client.video.renders.start(
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/signals.rb | Ruby | apache-2.0 | 220 | main | 1,700 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Signals < Namespace
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Send a signal to a specific participant in an active Vonage Video session.
#
# @param [optional, String] :applicat... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/captions.rb | Ruby | apache-2.0 | 220 | main | 2,463 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Captions < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Start Live Captions for a Vonage Video stream
#
# @example
# response = client.video.capt... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/web_socket.rb | Ruby | apache-2.0 | 220 | main | 2,748 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::WebSocket < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Start an audio connector websocket connection
#
# @example
# response = client.video.we... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/archives.rb | Ruby | apache-2.0 | 220 | main | 4,532 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Archives < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Get a list of archives for a specified Vonage application.
#
# @param [optional, Integer] :offs... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/streams.rb | Ruby | apache-2.0 | 220 | main | 2,131 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Streams < Namespace
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Get a list of streams for a specified session.
#
# @param [optional, String] :application_id (Required unless alr... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/moderation.rb | Ruby | apache-2.0 | 220 | main | 1,696 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Moderation < Namespace
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Force a client to disconnect from a session.
#
# @param [required, String] :session_id
#
# @param [requ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/broadcasts.rb | Ruby | apache-2.0 | 220 | main | 2,056 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Broadcasts < Namespace
include Keys
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Get a list of live streaming broadcasts for a specified Vonage application.
#
def list(**para... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/connections.rb | Ruby | apache-2.0 | 220 | main | 718 | # typed: true
# frozen_string_literal: true
module Vonage
class Video::Connections < Namespace
self.authentication = BearerToken
self.request_body = JSON
self.host = :video_host
# Get a list of connections for a specified session.
#
# @param [optional, String] :application_id (Required un... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/connections/list_response.rb | Ruby | apache-2.0 | 220 | main | 217 | # typed: true
class Vonage::Video::Connections::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/renders/list_response.rb | Ruby | apache-2.0 | 220 | main | 213 | # typed: true
class Vonage::Video::Renders::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/streams/list_response.rb | Ruby | apache-2.0 | 220 | main | 213 | # typed: true
class Vonage::Video::Streams::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/archives/list_response.rb | Ruby | apache-2.0 | 220 | main | 214 | # typed: true
class Vonage::Video::Archives::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/video/broadcasts/list_response.rb | Ruby | apache-2.0 | 220 | main | 216 | # typed: true
class Vonage::Video::Broadcasts::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.items.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/identity_insights/insights_builder.rb | Ruby | apache-2.0 | 220 | main | 1,980 | # typed: true
# frozen_string_literal: true
module Vonage
class IdentityInsights::InsightsBuilder
def initialize
@insights = {}
end
# Add a Format insight.
# @example
# builder = Vonage::IdentityInsights::InsightsBuilder.new
# builder.add_format
# @return [InsightsBuilder] The ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/message.rb | Ruby | apache-2.0 | 220 | main | 1,042 | # typed: true
module Vonage
class Messaging::Message
CHANNELS = {
sms: Vonage::Messaging::Channels::SMS,
mms: Vonage::Messaging::Channels::MMS,
rcs: Vonage::Messaging::Channels::RCS,
whatsapp: Vonage::Messaging::Channels::WhatsApp,
messenger: Vonage::Messaging::Channels::Messenger,
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/whats_app.rb | Ruby | apache-2.0 | 220 | main | 1,760 | # typed: true
module Vonage
class Messaging::Channels::WhatsApp < Messaging::Message
MESSAGE_TYPES = ['text', 'image', 'audio', 'video', 'file', 'template', 'sticker', 'custom']
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/rcs.rb | Ruby | apache-2.0 | 220 | main | 1,413 | # typed: true
module Vonage
class Messaging::Channels::RCS < Messaging::Message
MESSAGE_TYPES = ['text', 'image', 'video', 'file', 'card', 'carousel', 'custom']
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from, nil)
@typ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/messenger.rb | Ruby | apache-2.0 | 220 | main | 1,061 | # typed: true
module Vonage
class Messaging::Channels::Messenger < Messaging::Message
MESSAGE_TYPES = ['text', 'image', 'audio', 'video', 'file']
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from, nil)
@type = attributes.... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/sms.rb | Ruby | apache-2.0 | 220 | main | 734 | # typed: true
module Vonage
class Messaging::Channels::SMS < Messaging::Message
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from, nil)
@type = attributes.fetch(:type, 'text')
@message = attributes.fetch(:message, nil)
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/viber.rb | Ruby | apache-2.0 | 220 | main | 1,565 | # typed: true
module Vonage
class Messaging::Channels::Viber < Messaging::Message
MESSAGE_TYPES = ['text', 'image', 'video', 'file']
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from, nil)
@type = attributes.fetch(:type,... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/messaging/channels/mms.rb | Ruby | apache-2.0 | 220 | main | 1,411 | # typed: true
module Vonage
class Messaging::Channels::MMS < Messaging::Message
MESSAGE_TYPES = ['text', 'image', 'vcard', 'audio', 'video', 'file', 'content'].freeze
attr_reader :data
def initialize(attributes = {})
@to = attributes.fetch(:to, nil)
@from = attributes.fetch(:from, nil)
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversations/users.rb | Ruby | apache-2.0 | 220 | main | 3,429 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversations::Users < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Create a user.
#
# @deprecated Please use {Vonage::Users#create} instead
#
# @option params [String] :name
# Unique name fo... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversations/legs.rb | Ruby | apache-2.0 | 220 | main | 1,042 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversations::Legs < Namespace
self.authentication = BearerToken
# List legs.
#
# @deprecated
#
# @option params [Boolean] :auto_advance
# Set this to `false` to not auto-advance through all the pages in the record
# ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversations/events.rb | Ruby | apache-2.0 | 220 | main | 2,909 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversations::Events < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Create an event.
#
# @deprecated Please use {Vonage::Conversation::Event#create} instead
#
# @option params [required, String] :... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/conversations/members.rb | Ruby | apache-2.0 | 220 | main | 4,155 | # typed: true
# frozen_string_literal: true
module Vonage
class Conversations::Members < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Create a member.
#
# @deprecated Please use {Vonage::Conversation::Member#create} instead
#
# @option params [String] :action
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/numbers/list_response.rb | Ruby | apache-2.0 | 220 | main | 208 | # typed: true
class Vonage::Numbers::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.numbers.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/templates.rb | Ruby | apache-2.0 | 220 | main | 2,809 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2::Templates < Namespace
self.authentication = BasicAndBearerToken
self.request_body = JSON
# Get a list of all templates.
#
# @example
# template_list = client.verify2.templates.list
#
# @param [optional, Integ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/workflow_builder.rb | Ruby | apache-2.0 | 220 | main | 502 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2::WorkflowBuilder
def self.build
builder = self.new
yield builder if block_given?
builder.workflow
end
attr_reader :workflow
def initialize
@workflow = Vonage::Verify2::Workflow.new
end
Vonage::... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/start_verification_options.rb | Ruby | apache-2.0 | 220 | main | 1,797 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2::StartVerificationOptions
VALID_OPTS = [:locale, :channel_timeout, :client_ref, :code_length, :code, :fraud_check].freeze
MIN_CHANNEL_TIMEOUT, MAX_CHANNEL_TIMEOUT = [15, 900]
MIN_CODE_LENGTH, MAX_CODE_LENGTH = [4, 10]
attr_rea... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/workflow.rb | Ruby | apache-2.0 | 220 | main | 930 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2::Workflow
CHANNELS = {
sms: Verify2::Channels::SMS,
whatsapp: Verify2::Channels::WhatsApp,
whatsapp_interactive: Verify2::Channels::WhatsAppInteractive,
voice: Verify2::Channels::Voice,
email: Verify2::Channels:... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/template_fragments.rb | Ruby | apache-2.0 | 220 | main | 5,276 | # typed: true
# frozen_string_literal: true
module Vonage
class Verify2::TemplateFragments < Namespace
CHANNELS = ['sms', 'voice'].freeze
self.authentication = BasicAndBearerToken
self.request_body = JSON
# Get a list of of template fragments for a specific template.
#
# @example
# t... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/template_fragments/list_response.rb | Ruby | apache-2.0 | 220 | main | 248 | # typed: true
class Vonage::Verify2::TemplateFragments::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.template_fragments.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/templates/list_response.rb | Ruby | apache-2.0 | 220 | main | 231 | # typed: true
class Vonage::Verify2::Templates::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.templates.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/voice.rb | Ruby | apache-2.0 | 220 | main | 624 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Verify2::Channels::Voice
attr_reader :channel, :to
def initialize(to:)
self.channel = 'voice'
self.to = to
end
def to=(to)
raise ArgumentError, "Invalid 'to' value #{to}. Expected to be in E.164 fo... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/email.rb | Ruby | apache-2.0 | 220 | main | 606 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Verify2::Channels::Email
attr_reader :channel, :to, :from
def initialize(to:, from: nil)
self.channel = 'email'
self.to = to
self.from = from unless from.nil?
end
def to=(to)
@to = to
end... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/whats_app_interactive.rb | Ruby | apache-2.0 | 220 | main | 653 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Verify2::Channels::WhatsAppInteractive
attr_reader :channel, :to
def initialize(to:)
self.channel = 'whatsapp_interactive'
self.to = to
end
def to=(to)
raise ArgumentError, "Invalid 'to' value #{to... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/silent_auth.rb | Ruby | apache-2.0 | 220 | main | 1,318 | # typed: true
# frozen_string_literal: true
require 'phonelib'
require 'uri'
module Vonage
class Verify2::Channels::SilentAuth
attr_reader :channel, :to, :sandbox, :redirect_url
def initialize(to:, redirect_url: nil, sandbox: nil)
self.channel = 'silent_auth'
self.to = to
self.redirect_ur... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/sms.rb | Ruby | apache-2.0 | 220 | main | 1,997 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Verify2::Channels::SMS
APP_HASH_LENGTH = 11
attr_reader :channel, :to, :from, :entity_id, :content_id, :app_hash
def initialize(to:, app_hash: nil)
self.channel = 'sms'
self.to = to
self.app_hash = app_... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/verify2/channels/whats_app.rb | Ruby | apache-2.0 | 220 | main | 985 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Verify2::Channels::WhatsApp
attr_reader :channel, :to, :from
def initialize(to:, from:)
self.channel = 'whatsapp'
self.to = to
self.from = from
end
def to=(to)
raise ArgumentError, "Invalid '... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/recordings.rb | Ruby | apache-2.0 | 220 | main | 1,156 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::Recordings < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Return information for specified recording.
#
# @deprecated
#
# @param [required... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/dial_in_numbers.rb | Ruby | apache-2.0 | 220 | main | 613 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::DialInNumbers < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Get numbers that can be used to dial into a meeting.
#
# @deprecated
#
# @ret... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/applications.rb | Ruby | apache-2.0 | 220 | main | 765 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::Applications < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Update an existing application.
#
# @deprecated
#
# @param [required, String] ... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/themes.rb | Ruby | apache-2.0 | 220 | main | 7,864 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::Themes < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Get a list of themes associated with the Vonage application.
#
# @deprecated
#
# @re... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/rooms.rb | Ruby | apache-2.0 | 220 | main | 7,874 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::Rooms < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Get a list of rooms associated with the Vonage application.
#
# @deprecated
#
# @para... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/sessions.rb | Ruby | apache-2.0 | 220 | main | 803 | # typed: true
# frozen_string_literal: true
module Vonage
class Meetings::Sessions < Namespace
extend T::Sig
self.authentication = BearerToken
self.request_body = JSON
self.host = :vonage_host
# Return a list of recordings for a specified session.
#
# @deprecated
#
# @param [r... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/themes/list_response.rb | Ruby | apache-2.0 | 220 | main | 209 | # typed: true
class Vonage::Meetings::Themes::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/rooms/list_response.rb | Ruby | apache-2.0 | 220 | main | 218 | # typed: true
class Vonage::Meetings::Rooms::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/dial_in_numbers/list_response.rb | Ruby | apache-2.0 | 220 | main | 216 | # typed: true
class Vonage::Meetings::DialInNumbers::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/meetings/sessions/list_response.rb | Ruby | apache-2.0 | 220 | main | 232 | # typed: true
class Vonage::Meetings::Sessions::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.recordings.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/users/list_response.rb | Ruby | apache-2.0 | 220 | main | 214 | # typed: true
class Vonage::Users::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.users.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/subaccounts/list_response.rb | Ruby | apache-2.0 | 220 | main | 293 | # typed: true
class Vonage::Subaccounts::ListResponse < Vonage::Response
include Enumerable
def primary_account
@entity._embedded.primary_account
end
def each
return enum_for(:each) unless block_given?
@entity._embedded.subaccounts.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/subaccounts/credit_transfers/list_response.rb | Ruby | apache-2.0 | 220 | main | 248 | # typed: true
class Vonage::Subaccounts::CreditTransfers::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.credit_transfers.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/subaccounts/balance_transfers/list_response.rb | Ruby | apache-2.0 | 220 | main | 250 | # typed: true
class Vonage::Subaccounts::BalanceTransfers::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.balance_transfers.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/dtmf.rb | Ruby | apache-2.0 | 220 | main | 540 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::DTMF < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Play DTMF tones into a call.
#
# @option params [String] :digits
# The digits to send.
#
# @param [String] id
# @param [Hash] pa... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/stream.rb | Ruby | apache-2.0 | 220 | main | 1,108 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Stream < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Play an audio file into a call.
#
# @option params [required, Array<String>] :stream_url
# URL of the audio file.
#
# @option para... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/talk.rb | Ruby | apache-2.0 | 220 | main | 1,850 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Talk < Namespace
self.authentication = BearerToken
self.request_body = JSON
# Play text to speech into a call.
#
# @option params [required, String] :text
# The text to read.
#
# @option params [String] :langua... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/list_response.rb | Ruby | apache-2.0 | 220 | main | 214 | # typed: true
class Vonage::Voice::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.calls.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/ncco.rb | Ruby | apache-2.0 | 220 | main | 1,388 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Ncco
ACTIONS = {
connect: Vonage::Voice::Actions::Connect,
conversation: Vonage::Voice::Actions::Conversation,
input: Vonage::Voice::Actions::Input,
notify: Vonage::Voice::Actions::Notify,
record: Vonage::Voice::... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/conversation.rb | Ruby | apache-2.0 | 220 | main | 3,584 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Conversation
attr_accessor :name, :musicOnHoldUrl, :startOnEnter, :endOnExit, :record, :canSpeak, :canHear, :mute
def initialize(attributes = {})
@name = attributes.fetch(:name)
@musicOnHoldUrl = attributes.fetch(:mu... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/connect.rb | Ruby | apache-2.0 | 220 | main | 8,613 | # typed: true
# frozen_string_literal: true
require 'phonelib'
module Vonage
class Voice::Actions::Connect
attr_accessor :endpoint, :from, :eventType, :timeout, :limit, :machineDetection, :advanced_machine_detection, :eventUrl, :eventMethod, :ringbackTone
def initialize(attributes = {})
@endpoint = at... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/record.rb | Ruby | apache-2.0 | 220 | main | 6,175 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Record
attr_accessor :format, :split, :channels, :endOnSilence, :endOnKey, :timeOut, :beepStart, :eventUrl, :eventMethod, :transcription
def initialize(attributes = {})
@format = attributes.fetch(:format, nil)
@split... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/wait.rb | Ruby | apache-2.0 | 220 | main | 755 | # typed: true
# typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Wait
attr_accessor :timeout
def initialize(attributes = {})
@timeout = attributes.fetch(:timeout, nil)
after_initialize!
end
def after_initialize!
validate_timeout if self.timeout
en... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/input.rb | Ruby | apache-2.0 | 220 | main | 4,432 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Input
attr_accessor :type, :dtmf, :speech, :eventUrl, :eventMethod, :mode
def initialize(attributes = {})
@type = attributes.fetch(:type)
@dtmf = attributes.fetch(:dtmf, nil)
@speech = attributes.fetch(:speech,... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/stream.rb | Ruby | apache-2.0 | 220 | main | 1,964 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Stream
attr_accessor :streamUrl, :level, :bargeIn, :loop
def initialize(attributes = {})
@streamUrl = attributes.fetch(:streamUrl)
@level = attributes.fetch(:level, nil)
@bargeIn = attributes.fetch(:bargeIn, ni... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/talk.rb | Ruby | apache-2.0 | 220 | main | 2,292 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Talk
attr_accessor :text, :bargeIn, :loop, :level, :language, :style, :premium
def initialize(attributes= {})
@text = attributes.fetch(:text)
@bargeIn = attributes.fetch(:bargeIn, nil)
@loop = attributes.fetch(:... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/notify.rb | Ruby | apache-2.0 | 220 | main | 1,533 | # typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Notify
attr_accessor :payload, :eventUrl, :eventMethod
def initialize(attributes = {})
@payload = attributes.fetch(:payload)
@eventUrl = attributes.fetch(:eventUrl)
@eventMethod = attributes.fetch(:eventMethod,... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/voice/actions/transfer.rb | Ruby | apache-2.0 | 220 | main | 2,207 | # typed: true
# typed: true
# frozen_string_literal: true
module Vonage
class Voice::Actions::Transfer
attr_accessor :conversation_id, :can_hear, :can_speak, :mute
def initialize(attributes = {})
@conversation_id = attributes.fetch(:conversation_id)
@can_hear = attributes.fetch(:can_hear, nil)
... |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/secrets/list_response.rb | Ruby | apache-2.0 | 220 | main | 218 | # typed: true
class Vonage::Secrets::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.secrets.each { |item| yield item }
end
end |
github | Vonage/vonage-ruby-sdk | https://github.com/Vonage/vonage-ruby-sdk | lib/vonage/applications/list_response.rb | Ruby | apache-2.0 | 220 | main | 228 | # typed: true
class Vonage::Applications::ListResponse < Vonage::Response
include Enumerable
def each
return enum_for(:each) unless block_given?
@entity._embedded.applications.each { |item| yield item }
end
end |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | plugins.rb | Ruby | mit | 220 | master | 206 | # frozen-string-literal: true
Bundler::Plugin::API.hook Bundler::Plugin::Events::GEM_AFTER_INSTALL do |spec_install|
require_relative 'lib/rubygems_plugin'
Gem::Src.post_install_hook spec_install
end |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | gem-src.gemspec | Ruby | mit | 220 | master | 1,136 | # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
Gem::Specification.new do |gem|
gem.name = "gem-src"
gem.version = '0.10.2'
gem.authors = ["Akira Matsuda"]
gem.email = ["ronnie@dio.jp"]
gem.description ... |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | spec/spec_helper.rb | Ruby | mit | 220 | master | 219 | $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'bundler/setup'
Bundler.require
require File.join(File.dirname(__FILE__), '../lib/rubygems_plugin') |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | spec/gem-src_spec.rb | Ruby | mit | 220 | master | 2,292 | require 'spec_helper'
describe Gem::Src do
def quick_gem(name, version='2')
require 'rubygems/specification'
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = name
s.version = version
s.author = 'A User'
s.email = 'example@e... |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | lib/rubygems_plugin.rb | Ruby | mit | 220 | master | 6,454 | # frozen-string-literal: true
require 'rubygems'
require 'net/https'
module Gem
class Src
class << self
def post_install_hook(installer)
return true if installer.class.name == 'Bundler::Source::Path::Installer'
return true if !!ENV['GEMSRC_SKIP']
gem_src = Gem::Src.new installer
... |
github | amatsuda/gem-src | https://github.com/amatsuda/gem-src | lib/gem/src/irregular_repositories.rb | Ruby | mit | 220 | master | 4,959 | module Gem
class Src
IRREGULAR_REPOSITORIES = {
'activesupport' => nil,
'actionview' => nil,
'actionpack' => nil,
'activemodel' => nil,
'activerecord' => nil,
'activerecord-jdbcmysql-adapter' => 'https://github.com/jruby/activerecord-jdbc-adapter',
'activerecord-jdbcpostg... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | em-hiredis.gemspec | Ruby | mit | 220 | master | 985 | # -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "em-hiredis/version"
Gem::Specification.new do |s|
s.name = "em-hiredis"
s.version = EventMachine::Hiredis::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Martyn Loughran"]
s.email = ["me@mloughran.... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis.rb | Ruby | mit | 220 | master | 1,717 | require 'eventmachine'
module EventMachine
module Hiredis
# All em-hiredis errors should descend from EM::Hiredis::Error
class Error < RuntimeError; end
# An error reply from Redis. The actual error retuned by ::Hiredis will be
# wrapped in the redis_error accessor.
class RedisError < Error
... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/pubsub_client.rb | Ruby | mit | 220 | master | 6,397 | module EventMachine::Hiredis
class PubsubClient < BaseClient
PUBSUB_MESSAGES = %w{message pmessage subscribe unsubscribe psubscribe punsubscribe}.freeze
PING_CHANNEL = '__em-hiredis-ping'
def initialize(host='localhost', port='6379', password=nil, db=nil)
@subs, @psubs = [], []
@pubsub_defs ... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/client.rb | Ruby | mit | 220 | master | 2,914 | require 'digest/sha1'
module EventMachine::Hiredis
class Client < BaseClient
def self.connect(host = 'localhost', port = 6379)
new(host, port).connect
end
def self.load_scripts_from(dir)
Dir.glob("#{dir}/*.lua").each do |f|
name = Regexp.new(/([^\/]*)\.lua$/).match(f)[1]
lua ... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/connection.rb | Ruby | mit | 220 | master | 1,269 | require 'hiredis/reader'
module EventMachine::Hiredis
class Connection < EM::Connection
include EventMachine::Hiredis::EventEmitter
def initialize(host, port)
super
@host, @port = host, port
@name = "[em-hiredis #{@host}:#{@port}]"
end
def reconnect(host, port)
super
@... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/lock.rb | Ruby | mit | 220 | master | 2,703 | require 'securerandom'
module EM::Hiredis
# Cross-process re-entrant lock, backed by redis
class Lock
EM::Hiredis::Client.load_scripts_from(File.expand_path("../lock_lua", __FILE__))
# Register a callback which will be called 1s before the lock expires
# This is an informational callback, there is no... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/event_emitter.rb | Ruby | mit | 220 | master | 539 | module EventMachine::Hiredis
module EventEmitter
def on(event, &listener)
_listeners[event] << listener
end
def emit(event, *args)
_listeners[event].each { |l| l.call(*args) }
end
def remove_listener(event, &listener)
_listeners[event].delete(listener)
end
def remove_a... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/persistent_lock.rb | Ruby | mit | 220 | master | 2,357 | module EM::Hiredis
# A lock that automatically re-acquires a lock before it loses it
#
# The lock is configured with the following two parameters
#
# :lock_timeout - Specifies how long each lock is acquired for. Setting
# this low means that locks need to be re-acquired very often, but a long
# timout... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | lib/em-hiredis/base_client.rb | Ruby | mit | 220 | master | 7,754 | require 'uri'
module EventMachine::Hiredis
# Emits the following events
#
# * :connected - on successful connection or reconnection
# * :reconnected - on successful reconnection
# * :disconnected - no longer connected, when previously in connected state
# * :reconnect_failed(failure_number) - a reconnect a... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | examples/getting_started.rb | Ruby | mit | 220 | master | 377 | $:.unshift(File.expand_path('../../lib', __FILE__))
require 'em-hiredis'
EM.run {
redis = EM::Hiredis.connect
redis.sadd('aset', 'member').callback {
response_deferrable = redis.hget('aset', 'member')
response_deferrable.errback { |e|
p e # => #<RuntimeError: ERR Operation against a key holding th... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | examples/lua_example.rb | Ruby | mit | 220 | master | 868 | $:.unshift(File.expand_path('../../lib', __FILE__))
require 'em-hiredis'
EM.run do
scripts_dir = File.expand_path("../lua", __FILE__)
EM::Hiredis::Client.load_scripts_from(scripts_dir)
redis = EM::Hiredis.connect
redis.register_script(:multiply, <<-END)
return redis.call('get', KEYS[1]) * ARGV[1]
END
... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | examples/pubsub_basics.rb | Ruby | mit | 220 | master | 431 | $:.unshift(File.expand_path('../../lib', __FILE__))
require 'em-hiredis'
EM.run {
redis = EM::Hiredis.connect
puts "Subscribing"
redis.pubsub.subscribe("foo") { |msg|
p [:sub1, msg]
}
redis.pubsub.psubscribe("f*") { |msg|
p [:sub2, msg]
}
EM.add_periodic_timer(1) {
redis.publish("foo... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | examples/pubsub_raw.rb | Ruby | mit | 220 | master | 593 | $:.unshift(File.expand_path('../../lib', __FILE__))
require 'em-hiredis'
EM.run {
# Create two connections, one will be used for subscribing
redis = EM::Hiredis.connect
pubsub = redis.pubsub
pubsub.subscribe('bar.0').callback { puts "Subscribed" }
pubsub.psubscribe('bar.*')
pubsub.on(:message) { |channel... |
github | mloughran/em-hiredis | https://github.com/mloughran/em-hiredis | examples/pubsub_more.rb | Ruby | mit | 220 | master | 1,487 | $:.unshift(File.expand_path('../../lib', __FILE__))
require 'em-hiredis'
EM.run {
redis = EM::Hiredis.connect
# If you pass a block to subscribe it will be called whenever a message
# is received on this channel
redis.pubsub.subscribe('foo') { |message|
puts "Block received #{message}"
}
# You ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.