Module: Stream

Defined in:
lib/stream/url.rb,
lib/stream/base.rb,
lib/stream/feed.rb,
lib/stream/batch.rb,
lib/stream/users.rb,
lib/stream/client.rb,
lib/stream/errors.rb,
lib/stream/signer.rb,
lib/stream/version.rb,
lib/stream/reactions.rb,
lib/stream/activities.rb,
lib/stream/collections.rb,
lib/stream/personalization.rb

Defined Under Namespace

Modules: Activities, Batch Classes: APIURLGenerator, Client, CollectionsClient, Error, Feed, PersonalizationClient, PersonalizationURLGenerator, RaiseHttpException, ReactionsClient, Signer, StreamApiResponseException, StreamHTTPClient, StreamInputData, URLGenerator, UsersClient

Constant Summary collapse

STREAM_URL_COM_RE =
%r{https\:\/\/(?<key>\w+)\:(?<secret>\w+)@((api\.)|((?<location>[-\w]+)\.))?(?<api_hostname>stream-io-api\.com)\/[\w=-\?%&]+app_id=(?<app_id>\d+)}i
STREAM_URL_IO_RE =
%r{https\:\/\/(?<key>\w+)\:(?<secret>\w+)@((api\.)|((?<location>[-\w]+)\.))?(?<api_hostname>getstream\.io)\/[\w=-\?%&]+app_id=(?<app_id>\d+)}i
VERSION =
'3.1.0'.freeze

Class Method Summary collapse

Class Method Details

.connect(api_key, api_secret) ⇒ Object


9
10
11
# File 'lib/stream/base.rb', line 9

def connect(api_key, api_secret)
  Stream::Client.new(api_key, api_secret)
end

.get_feed_slug_and_id(feed_id) ⇒ Object


13
14
15
# File 'lib/stream/base.rb', line 13

def get_feed_slug_and_id(feed_id)
  feed_id.sub(':', '')
end