module Andpush
Constants
- DOMAIN
- STATUS_TO_EXCEPTION_MAPPING
- VERSION
Public Class Methods
build(server_key, domain: nil, name: nil, proxy: nil, pool_size: Net::HTTP::Persistent::DEFAULT_POOL_SIZE)
click to toggle source
# File lib/andpush.rb, line 10 def build(server_key, domain: nil, name: nil, proxy: nil, pool_size: Net::HTTP::Persistent::DEFAULT_POOL_SIZE) ::Andpush::Client .new(domain || DOMAIN, request_handler: ConnectionPool.new(name: name, proxy: proxy, pool_size: pool_size)) .register_interceptor(Authenticator.new(server_key)) end
Also aliased as: new
http2(server_key, domain: nil)
click to toggle source
# File lib/andpush.rb, line 17 def http2(server_key, domain: nil) begin require 'curb' if !defined?(Curl) rescue LoadError => error raise LoadError, "Could not load the curb gem. Make sure to install the gem by running:\n\n" \ " $ gem i curb\n\n" \ "Or the Gemfile has the following declaration:\n\n" \ " gem 'curb'\n\n" \ " (#{error.class}: #{error.message})" end ::Andpush::Client .new(domain || DOMAIN, request_handler: Http2RequestHandler.new) .register_interceptor(Authenticator.new(server_key)) end
new(server_key, domain: nil, name: nil, proxy: nil, pool_size: Net::HTTP::Persistent::DEFAULT_POOL_SIZE)
Alias for: build