stickybits 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -1
- data/lib/stickybits.rb +14 -10
- data/lib/stickybits/version.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
data/lib/stickybits.rb
CHANGED
@@ -1,22 +1,26 @@
|
|
1
|
-
require "stickybits/version"
|
2
|
-
|
3
1
|
require 'httparty'
|
4
2
|
|
5
3
|
module Stickybits
|
6
4
|
|
7
5
|
URL = "http://api.stickybits.com/api/1/"
|
8
|
-
|
6
|
+
|
7
|
+
class << self
|
8
|
+
|
9
|
+
attr_accessor :apikey
|
10
|
+
|
11
|
+
def configure
|
12
|
+
yield self
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
9
16
|
|
10
17
|
module Code
|
11
18
|
|
12
|
-
def self.get(codeid,
|
13
|
-
|
14
|
-
|
15
|
-
responses = options[:responses] || true
|
16
|
-
|
17
|
-
url = "#{URL}code.get?apikey=#{APIKEY}&codeid=#{codeid}&limit=#{limit}&order=#{order}&responses=#{responses}"
|
19
|
+
def self.get(codeid, parameters = {})
|
20
|
+
parameters.merge!(apikey: Stickybits.apikey)
|
21
|
+
parameters.merge!(codeid: codeid)
|
18
22
|
|
19
|
-
HTTParty.get(URI.escape(
|
23
|
+
HTTParty.get(URI.escape("#{URL}code.get"), query: parameters)
|
20
24
|
end
|
21
25
|
|
22
26
|
end
|
data/lib/stickybits/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: stickybits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Kevin Sylvestre
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-29 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|