brownpapertickets 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +18 -0
- data/VERSION +1 -1
- data/examples/create_item.rb +2 -2
- data/examples/fetch_items.rb +2 -2
- data/examples/update_item.rb +2 -2
- data/lib/brownpapertickets/version.rb +1 -1
- metadata +3 -3
data/README.textile
CHANGED
@@ -10,12 +10,30 @@ bc. $ [sudo] gem install brownpapertickets
|
|
10
10
|
|
11
11
|
h2. Examples
|
12
12
|
|
13
|
+
Check the example folder for more details.
|
14
|
+
|
13
15
|
h3. Create an Event
|
14
16
|
|
15
17
|
bc. @bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
|
16
18
|
event = @bpt.events.new({:e_zip => "90210", :e_name => "super awesome event", :e_city => "Beverly Hills", :e_state => "CA", :e_short_description => "Super Awesome Event!!!", :e_description => "Woodstock was initiated through the efforts of Michael Lang, John Roberts, Joel Rosenman, and Artie Kornfeld. It was Roberts and Rosenman who had the finances."})
|
17
19
|
event.save!
|
18
20
|
|
21
|
+
h3. Fetch all elements
|
22
|
+
|
23
|
+
bc. @bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
|
24
|
+
event = @bpt.events.find(id) #get an Event
|
25
|
+
events = @bpt.events.all #get all Events
|
26
|
+
|
27
|
+
h3. Update an event
|
28
|
+
|
29
|
+
bc. @bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
|
30
|
+
event = @bpt.events.find(id)
|
31
|
+
event.update_attribute(:e_name, "This Awsome Title") #for only one field
|
32
|
+
event.update_attributes({:e_name => "This Awsome Title2",:e_address1 => "Evergreen av 123", :e_phone => "5553335588"}) #for severl fields
|
33
|
+
event.e_name = "This Super Awsome Title2"
|
34
|
+
event.e_address1 = "Evergreen av 123 nxt to homer"
|
35
|
+
event.e_phone = "2365476235"
|
36
|
+
puts event.save! # You can also user save for update attributes
|
19
37
|
|
20
38
|
h2. Copyright
|
21
39
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/examples/create_item.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
|
2
2
|
|
3
3
|
@valid_attributes = {
|
4
|
-
:account => "
|
5
|
-
:id => "
|
4
|
+
:account => "your_account",
|
5
|
+
:id => "your_id"
|
6
6
|
}
|
7
7
|
@bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
|
8
8
|
|
data/examples/fetch_items.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
|
2
2
|
|
3
3
|
@valid_attributes = {
|
4
|
-
:account => "
|
5
|
-
:id => "
|
4
|
+
:account => "your_account",
|
5
|
+
:id => "your_id"
|
6
6
|
}
|
7
7
|
@bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
|
8
8
|
|
data/examples/update_item.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
|
2
2
|
|
3
3
|
@valid_attributes = {
|
4
|
-
:account => "
|
5
|
-
:id => "
|
4
|
+
:account => "your_account",
|
5
|
+
:id => "your_id"
|
6
6
|
}
|
7
7
|
@bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
|
8
8
|
|
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: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Alvaro Insignares
|