brownpapertickets 0.0.4 → 0.0.5

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brownpapertickets (0.0.2)
4
+ brownpapertickets (0.0.5)
5
5
  hpricot (>= 0.8.3)
6
6
  httparty (>= 0.6.1)
7
7
 
@@ -37,4 +37,4 @@ puts event.save! # You can also user save for update attributes
37
37
 
38
38
  h2. Copyright
39
39
 
40
- Copyright (c) 2010-2011 Alvaro Insignares. See LICENSE for details.
40
+ Copyright (c) 2010-2011 Alvaro Insignares, Niyireth de la Hoz, Guillermo Iguaran. See LICENSE for details.
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 = "brownpaperticket #{version}"
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.4
1
+ 0.0.2
@@ -61,9 +61,11 @@ module BrownPaperTickets
61
61
  end
62
62
 
63
63
  # Response while saving
64
- # 300036 - Required variables are missing
65
- # 300037 - Unknown error while posting info to DB
66
- # 000000 - Success
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
- # 300049 - Required variables are missing
125
- # 300050 - Unknown error
126
- # 300051 - Unable to find event
127
- # 300052 - Event does not belong to account
128
- # 300053 - Required variables are missing
129
- # 300054 - Unable to update event
130
- # 000000 - Success
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.event_id = event_id
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 |date|
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
@@ -1,3 +1,3 @@
1
1
  module BrownPaperTickets
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
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-24 00:00:00 -05:00
20
+ date: 2011-02-25 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency