Skip to Content Skip to Search
Methods
G
N
R
S

Attributes

[RW] error
[RW] error_status

Class Public methods

new(args = {})

# File app/lib/integration_provider/castos/connector.rb, line 6
def initialize(args = {})
  @integration = args.fetch(:integration)
  @swallow_exceptions = args.fetch(:swallow_exceptions, false)
end

Instance Public methods

get_podcasts()

# File app/lib/integration_provider/castos/connector.rb, line 19
def get_podcasts
  if Rails.env.development?
    @response = get_test_podcasts
  else
    with_error_handling do
      @response = RestClient.get("#{base_endpoint}/podcasts?token=#{token}", timeout: 10)
    end
  end

  @response.with_indifferent_access
end

revoke_members(subscribers_data)

# File app/lib/integration_provider/castos/connector.rb, line 31
def revoke_members(subscribers_data)
  with_error_handling do
    @response = RestClient.post("#{base_endpoint}/revoke-private-subscribers?token=#{token}",
      subscribers_data.to_json,
      post_headers)
  end
end

subscribe_members(subscribers_data)

# File app/lib/integration_provider/castos/connector.rb, line 11
def subscribe_members(subscribers_data)
  with_error_handling do
    @response = RestClient.post("#{base_endpoint}/create-private-subscribers?token=#{token}",
      subscribers_data.to_json,
      post_headers)
  end
end