brownpapertickets 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -82,14 +82,14 @@ module BrownPaperTickets
|
|
82
82
|
response = BrownPaperTickets::Httpost.new(Net::HTTP::Post, "https://www.brownpapertickets.com/api2/#{param}",:query => query)
|
83
83
|
response.options[:body] = query
|
84
84
|
st = response.perform
|
85
|
-
xml = Hpricot(st.response.body)
|
85
|
+
xml = Hpricot(st.response.body)
|
86
86
|
if param == "adddate"
|
87
87
|
self.date_id = (xml/:date_id).inner_html if (xml/:resultcode).inner_html == "000000"
|
88
88
|
process_create_response( (xml/:resultcode).inner_html, date_id)
|
89
89
|
else
|
90
90
|
process_update_response( (xml/:resultcode).inner_html)
|
91
91
|
end
|
92
|
-
end
|
92
|
+
end
|
93
93
|
|
94
94
|
def create(params={})
|
95
95
|
date = Event.new(@@id,@@account, params)
|
@@ -86,19 +86,19 @@ module BrownPaperTickets
|
|
86
86
|
|
87
87
|
def new_save(param)
|
88
88
|
body = {"id" => @@id, "account" => @@account}
|
89
|
+
p @@account
|
89
90
|
query = self.attributes.merge("id" => @@id, "account" => @@account)
|
90
91
|
response = BrownPaperTickets::Httpost.new(Net::HTTP::Post, "https://www.brownpapertickets.com/api2/#{param}",:query => query)
|
91
92
|
response.options[:body] = query
|
92
93
|
st = response.perform
|
93
94
|
xml = Hpricot(st.response.body)
|
94
|
-
|
95
95
|
if param == "createevent"
|
96
|
-
event_id = (xml/:event_id).inner_html if (xml/:resultcode).inner_html == "000000"
|
96
|
+
self.event_id = (xml/:event_id).inner_html if (xml/:resultcode).inner_html == "000000"
|
97
97
|
process_create_response( (xml/:resultcode).inner_html, event_id)
|
98
98
|
else
|
99
99
|
process_update_response( (xml/:resultcode).inner_html)
|
100
100
|
end
|
101
|
-
end
|
101
|
+
end
|
102
102
|
|
103
103
|
def title=(param)
|
104
104
|
self.attributes["e_name"] = param
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brownpapertickets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alvaro Insignares
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-02-
|
20
|
+
date: 2011-02-28 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|