RingRingAds 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/advert.rb +12 -10
- metadata +2 -2
data/lib/advert.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'httparty'
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
module RingRingMedia
|
5
|
+
class Advert
|
6
|
+
include HTTParty
|
7
|
+
base_uri 'http://iam.ringringmedia.com'
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def get(id, options = {})
|
10
|
+
options = {:pid => id, :mu => "xml", :mo => "live", :e => "UTF-8", :rt => "ar", :ua => "", :ira => "" }.merge(options)
|
11
|
+
self.class.get('/index.php', { :query => options })
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def post(id, options = {})
|
15
|
+
options = {:pid => id, :mu => "xml", :mo => "live", :e => "UTF-8", :rt => "ar", :ua => "", :ira => "" }.merge(options)
|
16
|
+
self.class.post('/index.php', { :query => options })
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|