simple_bitly 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.mdown +14 -14
- data/lib/simple_bitly.rb +2 -0
- data/lib/simple_bitly/version.rb +1 -1
- data/simple_bitly.gemspec +2 -2
- metadata +5 -5
data/README.mdown
CHANGED
@@ -4,24 +4,24 @@ A simple and lightweight wrapper for the Bitly API (v3).
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
[sudo] gem install simple_bitly
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
|
-
|
11
|
+
bitly = SimpleBitly.new(USERNAME, API_KEY)
|
12
12
|
|
13
|
-
|
13
|
+
#### shorten a URL
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
result = bitly.shorten('http://reddit.com')
|
16
|
+
result.short_url
|
17
|
+
result.long_url
|
18
|
+
result.hash
|
19
|
+
result.qr_code
|
20
20
|
|
21
|
-
|
21
|
+
#### expand one or more URLs
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
results = bitly.expand('http://bit.ly/9QePJB', 'http://bit.ly/CuJU')
|
24
|
+
results.first.long_url
|
25
|
+
results.first.short_url
|
26
|
+
results.first.hash
|
27
|
+
results.first.qr_code
|
data/lib/simple_bitly.rb
CHANGED
data/lib/simple_bitly/version.rb
CHANGED
data/simple_bitly.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Nizar Dhamani"]
|
10
10
|
s.email = ["nizar.dhamani@gmail.com"]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "https://github.com/nizardhamani/simple_bitly"
|
12
12
|
s.summary = %q{A lightweight wrapper for the bit.ly API}
|
13
|
-
s.description = %q{lightweight bit.ly API wrapper}
|
13
|
+
s.description = %q{A lightweight bit.ly API wrapper}
|
14
14
|
|
15
15
|
s.add_development_dependency('rspec', '>= 2.0.0')
|
16
16
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_bitly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nizar Dhamani
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
version: 2.0.0
|
35
35
|
type: :development
|
36
36
|
version_requirements: *id001
|
37
|
-
description: lightweight bit.ly API wrapper
|
37
|
+
description: A lightweight bit.ly API wrapper
|
38
38
|
email:
|
39
39
|
- nizar.dhamani@gmail.com
|
40
40
|
executables: []
|
@@ -55,7 +55,7 @@ files:
|
|
55
55
|
- spec/helper.rb
|
56
56
|
- spec/simple_bitly/client_spec.rb
|
57
57
|
has_rdoc: true
|
58
|
-
homepage:
|
58
|
+
homepage: https://github.com/nizardhamani/simple_bitly
|
59
59
|
licenses: []
|
60
60
|
|
61
61
|
post_install_message:
|