Module: Abrio
- Defined in:
- lib/abrio.rb,
lib/abrio/version.rb
Defined Under Namespace
Classes: Client, Error, Request, Url
Constant Summary collapse
- VERSION =
"0.0.5"
Class Method Summary collapse
-
.setup {|client| ... } ⇒ Object
Useful to set Abrio client parameters.
-
.shorten(long_url, options = {}) ⇒ Object
Shortcut to Abrio::Client.shorten.
Class Method Details
.setup {|client| ... } ⇒ Object
Useful to set Abrio client parameters.
Abrio.setup do |client|
client.uri = "http://abr.io/api/links"
client.login = "login"
client.key = "key"
end
15 16 17 |
# File 'lib/abrio.rb', line 15 def self.setup yield(client) if block_given? end |
.shorten(long_url, options = {}) ⇒ Object
Shortcut to Abrio::Client.shorten
20 21 22 |
# File 'lib/abrio.rb', line 20 def self.shorten(long_url, = {}) client.shorten(long_url, ) end |