The City Plaza Ruby

The Code

You can get the code from the project repo


To get started add the lib folder to your project and include the the_city.rb file.

require 'path/to/.../lib/the_city.rb'



# First param is your church's subdomain key.
# Second param is whether or not to cache the data.
the_city ='mychurch', false)

# Set the group nickname to pull plaza items for.

Load Topics

array_of_topic_titles = the_city.topics.titles

# by default will grab 10 topics.
topics = the_city.topics 

# limit the amount of topics fetched from The City.
topics = the_city.topics(3)    

# Get topic.
topic =

Load Events

array_of_event_titles =

# by default will grab 10 events.
events =

# limit the amount of events fetched from The City  
events =

# Get event.
event =

Load Prayers

array_of_prayer_titles = the_city.prayers.titles

# by default will grab 10 prayers.
prayers = the_city.prayers

# limit the amount of prayers fetched from The City  
prayers = the_city.prayers(3)

# Get prayer.
prayer =

Load Needs

array_of_need_titles = the_city.prayers.titles

# by default will grab 10 needs.
needs = the_city.needs

# limit the amount of needs fetched from The City   
needs = the_city.needs(3)

# Get need.
need =


array_of_album_titles = the_city.albums.titles

# by default will grab 10 albums.
albums = the_city.albums

# limit the amount of albums fetched from The City  
albums = the_city.albums(3)

# Get album.
album =