module Bitly::Client
Constants
- VERSION
Attributes
configuration[RW]
Public Class Methods
configure() { |configuration| ... }
click to toggle source
# File lib/bitly/client/config.rb, line 6 def configure self.configuration ||= Config.new yield(configuration) end
Public Instance Methods
shorten(long_url, api_token = nil)
click to toggle source
# File lib/bitly/client.rb, line 10 def shorten(long_url, api_token = nil) if api_token.nil? && (configuration.nil? || configuration.api_token.nil?) raise ConfigError.new "Please add Bitly::Client configuration to your app initializer" end Connection.new(long_url, api_token).shorten end