No commit activity in last 3 years
No release in over 3 years
Brown Paper Tickets API wrapper
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.2.0
>= 2.0.0

Runtime

>= 0.8.3
>= 0.6.1
 Project Readme

Brownpapertickets Gem

Brownpapertickests gem, is a wrapper for Brownpapertickests’s service. The purpose of this is gem is provide an “ActiveRecord-like” wrapper for create events.

Installing

$ [sudo] gem install brownpapertickets

Examples

Check the example folder for more details.

Create an Event

@bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
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."})
event.save!

Fetch all elements

@bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
event = @bpt.events.find(id) #get an Event
events = @bpt.events.all #get all Events

Update an event

@bpt = BrownPaperTickets::Base.new("brownpaper_id","brownpaper_account")
event = @bpt.events.find(id)
event.update_attribute(:e_name, "This Awsome Title")   #for only one field
event.update_attributes({:e_name => "This Awsome Title2",:e_address1 => "Evergreen av 123", :e_phone => "5553335588"}) #for severl fields
event.e_name = "This Super Awsome Title2"
event.e_address1 = "Evergreen av 123 nxt to homer"
event.e_phone = "2365476235"
puts event.save! # You can also user save for update attributes

Copyright

Copyright © 2010-2011 Alvaro Insignares, Niyireth de la Hoz, Guillermo Iguaran. See LICENSE for details.