brownpapertickets 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/LICENSE +20 -0
- data/README +0 -0
- data/README.rdoc +17 -0
- data/Rakefile +47 -0
- data/VERSION +1 -0
- data/brownpapertickets.gemspec +79 -0
- data/examples/create_item.rb +26 -0
- data/examples/fetch_items.rb +34 -0
- data/examples/update_item.rb +39 -0
- data/lib/brownpapertickets.rb +11 -0
- data/lib/brownpapertickets/base.rb +26 -0
- data/lib/brownpapertickets/date.rb +228 -0
- data/lib/brownpapertickets/event.rb +229 -0
- data/lib/brownpapertickets/httpost.rb +215 -0
- data/lib/brownpapertickets/price.rb +225 -0
- data/lib/brownpapertickets/xmlparse.rb +13 -0
- data/spec/brownpapertickets_spec.rb +135 -0
- data/spec/fixtures/all_events.xml +336 -0
- data/spec/fixtures/create_not_ok.xml +5 -0
- data/spec/fixtures/create_ok.xml +6 -0
- data/spec/fixtures/event.xml +72 -0
- data/spec/fixtures/test.json +1 -0
- data/spec/fixtures/update_not_ok.xml +6 -0
- data/spec/fixtures/update_ok.xml +6 -0
- data/spec/spec.opts +2 -0
- data/spec/spec_helper.rb +35 -0
- metadata +149 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
<document>
|
2
|
+
<result>success</result>
|
3
|
+
<resultcode>000000</resultcode>
|
4
|
+
<note/>
|
5
|
+
|
6
|
+
<event>
|
7
|
+
|
8
|
+
<title>
|
9
|
+
Nichole Canuso Dance Company Second Annual Benefit Cabaret
|
10
|
+
</title>
|
11
|
+
<link>http://www.brownpapertickets.com/event/106861</link>
|
12
|
+
|
13
|
+
<description>
|
14
|
+
An evening featuring a VIP reception, cocktails, events, silent auction, and performances by Nichole Canuso Dance Company, Johnny Showcase, Charlotte Ford, Geoff Sobelle, The Mural and The Mint, Miss Martha Graham Cracker, Meg Foley, and more!
|
15
|
+
</description>
|
16
|
+
<event_id>106861</event_id>
|
17
|
+
<live>n</live>
|
18
|
+
<e_address1>Triumph Brewing Company</e_address1>
|
19
|
+
<e_address2>117 Chestnut St</e_address2>
|
20
|
+
<e_city>Philadelphia</e_city>
|
21
|
+
<e_state>PA</e_state>
|
22
|
+
<e_country>United States</e_country>
|
23
|
+
<e_zip>19106</e_zip>
|
24
|
+
<e_phone/>
|
25
|
+
<e_web>http://www.nicholecanusodance.org</e_web>
|
26
|
+
|
27
|
+
<e_description>
|
28
|
+
Join us Thursday, June 17th at Triumph Brewing
|
29
|
+
Company of Old City, Philadelphia for performances,
|
30
|
+
cocktails,Triumph's handcrafted beers, games,
|
31
|
+
prizes and more to benefit NCDC!
|
32
|
+
|
33
|
+
6:30 pm: VIP pre-party with the artists
|
34
|
+
**Join us for a bounty of food, drinks and conversation.
|
35
|
+
Plus a sneak peek performance of TAKES by Nichole Canuso
|
36
|
+
and Dito Van Reigersberg.
|
37
|
+
|
38
|
+
7:30 pm: Doors open for general admission
|
39
|
+
8:30 pm: Main event begins
|
40
|
+
11 pm: Late night cabaret
|
41
|
+
12 am: Dance party hosted by Laris Kreslins
|
42
|
+
|
43
|
+
There will also be many exciting events:
|
44
|
+
*JJ Tiziou's Magic Photo Booth
|
45
|
+
*Tarot card readings
|
46
|
+
*Interactive Video Installation
|
47
|
+
*Carnival Games
|
48
|
+
*Silent Auction and Raffle
|
49
|
+
|
50
|
+
Performances include:
|
51
|
+
Nichole Canuso Dance Company
|
52
|
+
Johnny Showcase
|
53
|
+
Geoff Sobelle
|
54
|
+
The Mural and The Mint
|
55
|
+
Miss Martha Graham Cracker
|
56
|
+
Meg Foley/Moving Parts
|
57
|
+
Charlotte Ford aka "Delicious Raymond Charles II"
|
58
|
+
Team Sunshine Performance Corporation
|
59
|
+
|
60
|
+
Auction and raffle highlights include two nights at a W hotel in NYC, show tickets Dance Theatre Workshop, Arden Theatre, Live Arts Festival, and Bowerbird; acupuncture, massage, and spa treatments; liquor packages; gift certificates to some of Philly's greatest boutiques and restaurants; plus boat loads more!
|
61
|
+
</e_description>
|
62
|
+
<c_name>Cristina Vasilis</c_name>
|
63
|
+
<c_phone>2154139083</c_phone>
|
64
|
+
<c_address1/>
|
65
|
+
<c_address2/>
|
66
|
+
<c_city/>
|
67
|
+
<c_state/>
|
68
|
+
<c_country/>
|
69
|
+
<c_zip/>
|
70
|
+
<c_email>cristina@nicholecanusodance.org</c_email>
|
71
|
+
</event>
|
72
|
+
</document>
|
@@ -0,0 +1 @@
|
|
1
|
+
{"document"=>{"result"=>"success", "resultcode"=>"000000", "event"=>[{"e_phone"=>nil, "c_name"=>"Cristina Vasilis", "c_phone"=>"2154139083", "c_city"=>nil, "e_address1"=>"Triumph Brewing Company", "title"=>"\nNichole Canuso Dance Company Second Annual Benefit Cabaret\n", "event_id"=>"106861", "e_address2"=>"117 Chestnut St", "c_state"=>nil, "e_country"=>"United States", "c_email"=>"cristina@nicholecanusodance.org", "live"=>"n", "e_city"=>"Philadelphia", "e_web"=>"http://www.nicholecanusodance.org", "e_description"=>"\nJoin us Thursday, June 17th at Triumph Brewing \nCompany of Old City, Philadelphia for performances,\ncocktails,Triumph's handcrafted beers, games, \nprizes and more to benefit NCDC!\n\n6:30 pm: VIP pre-party with the artists \n**Join us for a bounty of food, drinks and conversation. \nPlus a sneak peek performance of TAKES by Nichole Canuso \nand Dito Van Reigersberg. \n\n7:30 pm: Doors open for general admission \n8:30 pm: Main event begins \n11 pm: Late night cabaret \n12 am: Dance party hosted by Laris Kreslins \n\nThere will also be many exciting events:\n*JJ Tiziou's Magic Photo Booth \n*Tarot card readings \n*Interactive Video Installation \n*Carnival Games \n*Silent Auction and Raffle \n\nPerformances include:\nNichole Canuso Dance Company\nJohnny Showcase\nGeoff Sobelle\nThe Mural and The Mint\nMiss Martha Graham Cracker\nMeg Foley/Moving Parts\nCharlotte Ford aka \"Delicious Raymond Charles II\" \nTeam Sunshine Performance Corporation \n\nAuction and raffle highlights include two nights at a W hotel in NYC, show tickets Dance Theatre Workshop, Arden Theatre, Live Arts Festival, and Bowerbird; acupuncture, massage, and spa treatments; liquor packages; gift certificates to some of Philly's greatest boutiques and restaurants; plus boat loads more!\n", "e_state"=>"PA", "c_address1"=>nil, "link"=>"http://www.brownpapertickets.com/event/106861", "description"=>"\nAn evening featuring a VIP reception, cocktails, events, silent auction, and performances by Nichole Canuso Dance Company, Johnny Showcase, Charlotte Ford, Geoff Sobelle, The Mural and The Mint, Miss Martha Graham Cracker, Meg Foley, and more!\n", "c_address2"=>nil, "c_country"=>nil, "e_zip"=>"19106", "c_zip"=>nil}, {"e_phone"=>nil, "c_name"=>"Cristina Vasilis", "c_phone"=>"2154139083", "c_city"=>nil, "e_address1"=>"Triumph Brewing Company", "title"=>"\nNichole Canuso Dance Company Second Annual Benefit Cabaret2\n", "event_id"=>"106861", "e_address2"=>"117 Chestnut St", "c_state"=>nil, "e_country"=>"United States", "c_email"=>"cristina@nicholecanusodance.org", "live"=>"n", "e_city"=>"Philadelphia", "e_web"=>"http://www.nicholecanusodance.org", "e_description"=>"\nJoin us Thursday, June 17th at Triumph Brewing \nCompany of Old City, Philadelphia for performances,\ncocktails,Triumph's handcrafted beers, games, \nprizes and more to benefit NCDC!\n\n6:30 pm: VIP pre-party with the artists \n**Join us for a bounty of food, drinks and conversation. \nPlus a sneak peek performance of TAKES by Nichole Canuso \nand Dito Van Reigersberg. \n\n7:30 pm: Doors open for general admission \n8:30 pm: Main event begins \n11 pm: Late night cabaret \n12 am: Dance party hosted by Laris Kreslins \n\nThere will also be many exciting events:\n*JJ Tiziou's Magic Photo Booth \n*Tarot card readings \n*Interactive Video Installation \n*Carnival Games \n*Silent Auction and Raffle \n\nPerformances include:\nNichole Canuso Dance Company\nJohnny Showcase\nGeoff Sobelle\nThe Mural and The Mint\nMiss Martha Graham Cracker\nMeg Foley/Moving Parts\nCharlotte Ford aka \"Delicious Raymond Charles II\" \nTeam Sunshine Performance Corporation \n\nAuction and raffle highlights include two nights at a W hotel in NYC, show tickets Dance Theatre Workshop, Arden Theatre, Live Arts Festival, and Bowerbird; acupuncture, massage, and spa treatments; liquor packages; gift certificates to some of Philly's greatest boutiques and restaurants; plus boat loads more!\n", "e_state"=>"PA", "c_address1"=>nil, "link"=>"http://www.brownpapertickets.com/event/1068612", "description"=>"\nAn evening featuring a VIP reception, cocktails, events, silent auction, and performances by Nichole Canuso Dance Company, Johnny Showcase, Charlotte Ford, Geoff Sobelle, The Mural and The Mint, Miss Martha Graham Cracker, Meg Foley, and more!\n", "c_address2"=>nil, "c_country"=>nil, "e_zip"=>"19106", "c_zip"=>nil}], "note"=>nil}}
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
3
|
+
require 'brownpapertickets'
|
4
|
+
require 'spec'
|
5
|
+
require 'spec/autorun'
|
6
|
+
require "fakeweb"
|
7
|
+
|
8
|
+
Spec::Runner.configure do |config|
|
9
|
+
|
10
|
+
end
|
11
|
+
|
12
|
+
def fixture_file(filename)
|
13
|
+
return "" if filename == ""
|
14
|
+
file_path = File.expand_path(File.dirname(__FILE__) + "/fixtures/" + filename)
|
15
|
+
File.read(file_path)
|
16
|
+
end
|
17
|
+
|
18
|
+
def brownpapertickets_url(url)
|
19
|
+
url =~ /^https/ ? url : "https://www.brownpapertickets.com/api2#{url}"
|
20
|
+
end
|
21
|
+
|
22
|
+
def stub_get(url, filename, status=nil)
|
23
|
+
options = {:body => fixture_file(filename)}
|
24
|
+
options.merge!({:status => status}) unless status.nil?
|
25
|
+
FakeWeb.register_uri(:get, brownpapertickets_url(url), options)
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
def fetch_all_events(hash_items)
|
30
|
+
items = []
|
31
|
+
hash_items.each do |item|
|
32
|
+
items << BrownPaperTickets::Event.new("id","accoutn", item)
|
33
|
+
end
|
34
|
+
items
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: brownpapertickets
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Alvaro Insignares
|
14
|
+
- Niyireth De La Hoz
|
15
|
+
autorequire:
|
16
|
+
bindir: bin
|
17
|
+
cert_chain: []
|
18
|
+
|
19
|
+
date: 2011-02-22 00:00:00 -05:00
|
20
|
+
default_executable:
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
23
|
+
name: rspec
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 13
|
31
|
+
segments:
|
32
|
+
- 1
|
33
|
+
- 2
|
34
|
+
- 9
|
35
|
+
version: 1.2.9
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: fakeweb
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 31
|
47
|
+
segments:
|
48
|
+
- 1
|
49
|
+
- 2
|
50
|
+
- 0
|
51
|
+
version: 1.2.0
|
52
|
+
type: :development
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: httparty
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 5
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
- 6
|
66
|
+
- 1
|
67
|
+
version: 0.6.1
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id003
|
70
|
+
description: Brown Paper tickets API wrapper
|
71
|
+
email:
|
72
|
+
- alvaro@koombea.com
|
73
|
+
- niyireth.delahoz@koombea.com
|
74
|
+
executables: []
|
75
|
+
|
76
|
+
extensions: []
|
77
|
+
|
78
|
+
extra_rdoc_files:
|
79
|
+
- LICENSE
|
80
|
+
- README
|
81
|
+
- README.rdoc
|
82
|
+
files:
|
83
|
+
- .document
|
84
|
+
- LICENSE
|
85
|
+
- README
|
86
|
+
- README.rdoc
|
87
|
+
- Rakefile
|
88
|
+
- VERSION
|
89
|
+
- brownpapertickets.gemspec
|
90
|
+
- examples/create_item.rb
|
91
|
+
- examples/fetch_items.rb
|
92
|
+
- examples/update_item.rb
|
93
|
+
- lib/brownpapertickets.rb
|
94
|
+
- lib/brownpapertickets/base.rb
|
95
|
+
- lib/brownpapertickets/date.rb
|
96
|
+
- lib/brownpapertickets/event.rb
|
97
|
+
- lib/brownpapertickets/httpost.rb
|
98
|
+
- lib/brownpapertickets/price.rb
|
99
|
+
- lib/brownpapertickets/xmlparse.rb
|
100
|
+
- spec/brownpapertickets_spec.rb
|
101
|
+
- spec/fixtures/all_events.xml
|
102
|
+
- spec/fixtures/create_not_ok.xml
|
103
|
+
- spec/fixtures/create_ok.xml
|
104
|
+
- spec/fixtures/event.xml
|
105
|
+
- spec/fixtures/test.json
|
106
|
+
- spec/fixtures/update_not_ok.xml
|
107
|
+
- spec/fixtures/update_ok.xml
|
108
|
+
- spec/spec.opts
|
109
|
+
- spec/spec_helper.rb
|
110
|
+
has_rdoc: true
|
111
|
+
homepage: http://github.com/niyireth/brownpapertickets
|
112
|
+
licenses: []
|
113
|
+
|
114
|
+
post_install_message:
|
115
|
+
rdoc_options: []
|
116
|
+
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
none: false
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
hash: 3
|
125
|
+
segments:
|
126
|
+
- 0
|
127
|
+
version: "0"
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
hash: 3
|
134
|
+
segments:
|
135
|
+
- 0
|
136
|
+
version: "0"
|
137
|
+
requirements: []
|
138
|
+
|
139
|
+
rubyforge_project:
|
140
|
+
rubygems_version: 1.3.7
|
141
|
+
signing_key:
|
142
|
+
specification_version: 3
|
143
|
+
summary: Brown Paper tickets API wrapper
|
144
|
+
test_files:
|
145
|
+
- examples/create_item.rb
|
146
|
+
- examples/fetch_items.rb
|
147
|
+
- examples/update_item.rb
|
148
|
+
- spec/brownpapertickets_spec.rb
|
149
|
+
- spec/spec_helper.rb
|