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 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.2
1
+ 0.0.4
@@ -1,8 +1,8 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
2
2
 
3
3
  @valid_attributes = {
4
- :account => "citizen_client",
5
- :id => "XsIhXp7K8CknZsC"
4
+ :account => "your_account",
5
+ :id => "your_id"
6
6
  }
7
7
  @bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
8
8
 
@@ -1,8 +1,8 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
2
2
 
3
3
  @valid_attributes = {
4
- :account => "citizen_client",
5
- :id => "XsIhXp7K8CknZsC"
4
+ :account => "your_account",
5
+ :id => "your_id"
6
6
  }
7
7
  @bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
8
8
 
@@ -1,8 +1,8 @@
1
1
  require File.join(File.dirname(__FILE__), '..', 'lib', 'brownpapertickets')
2
2
 
3
3
  @valid_attributes = {
4
- :account => "citizen_client",
5
- :id => "XsIhXp7K8CknZsC"
4
+ :account => "your_account",
5
+ :id => "your_id"
6
6
  }
7
7
  @bpt = BrownPaperTickets::Base.new(@valid_attributes[:id],@valid_attributes[:account])
8
8
 
@@ -1,3 +1,3 @@
1
1
  module BrownPaperTickets
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alvaro Insignares