brownpapertickets 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/README.textile +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/brownpapertickets/date.rb +15 -11
- data/lib/brownpapertickets/event.rb +0 -1
- data/lib/brownpapertickets/price.rb +1 -1
- data/lib/brownpapertickets/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/README.textile
CHANGED
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ Rake::RDocTask.new do |rdoc|
|
|
19
19
|
version = BrownPaperTickets::VERSION
|
20
20
|
|
21
21
|
rdoc.rdoc_dir = 'rdoc'
|
22
|
-
rdoc.title = "
|
22
|
+
rdoc.title = "brownpapertickets #{version}"
|
23
23
|
rdoc.rdoc_files.include('README*')
|
24
24
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
25
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
@@ -61,9 +61,11 @@ module BrownPaperTickets
|
|
61
61
|
end
|
62
62
|
|
63
63
|
# Response while saving
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
64
|
+
# 300038 - Required variables are missing
|
65
|
+
# 300039 - Unknown error while posting info to DB
|
66
|
+
# 300040 - Event does not belong to user
|
67
|
+
# 300041 - Unable to add date
|
68
|
+
# 0000 - Success
|
67
69
|
|
68
70
|
def save!
|
69
71
|
if self.date_id.blank?
|
@@ -121,13 +123,15 @@ module BrownPaperTickets
|
|
121
123
|
end
|
122
124
|
|
123
125
|
# resultcode
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
126
|
+
# 300055 - Required variables are missing
|
127
|
+
# 300056 - Unknown error
|
128
|
+
# 300057 - Unable to find event
|
129
|
+
# 300058 - Event does not belong to account
|
130
|
+
# 300059 - Unknown error
|
131
|
+
# 300060 - Unable to find date
|
132
|
+
# 300061 - Required variables are missing
|
133
|
+
# 300062 - Unable to update date
|
134
|
+
# 000000 - Success
|
131
135
|
|
132
136
|
def update_attribute(key, value)
|
133
137
|
assign = key.to_s + "="
|
@@ -191,7 +195,7 @@ module BrownPaperTickets
|
|
191
195
|
def process_create_response(response, event_id)
|
192
196
|
case response
|
193
197
|
when "0000" then
|
194
|
-
self.
|
198
|
+
self.date_id = date_id
|
195
199
|
@server_response = "success"
|
196
200
|
return true
|
197
201
|
when "300038" then
|
@@ -88,7 +88,6 @@ module BrownPaperTickets
|
|
88
88
|
body = {"id" => @@id, "account" => @@account}
|
89
89
|
query = self.attributes.merge("id" => @@id, "account" => @@account)
|
90
90
|
response = BrownPaperTickets::Httpost.new(Net::HTTP::Post, "https://www.brownpapertickets.com/api2/#{param}",:query => query)
|
91
|
-
response1 = BrownPaperTickets::Httpost.new(Net::HTTP::Get, "https://www.brownpapertickets.com/api2/eventsales",:query => query)
|
92
91
|
response.options[:body] = query
|
93
92
|
st = response.perform
|
94
93
|
xml = Hpricot(st.response.body)
|
@@ -23,7 +23,7 @@ module BrownPaperTickets
|
|
23
23
|
def all
|
24
24
|
prices = Event.get("/pricelist", :query =>{"id" => @@id , "account" => @@account, "event_id" => event_id , "date_id" => date_id})
|
25
25
|
parsed_date = []
|
26
|
-
price.parsed_response["document"]["price"].each do |
|
26
|
+
price.parsed_response["document"]["price"].each do |price|
|
27
27
|
parsed_date << Event.new(@id,@account, price)
|
28
28
|
end
|
29
29
|
return parsed_event
|
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: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
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-25 00:00:00 -05:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|