Module: TheCity::API::Accounts
Instance Method Summary collapse
-
#church_account(options = {}) ⇒ TheCity::Account
(also: #current_account, #current_church)
Returns the current City account associated with the current user.
-
#my_accounts(options = {}) ⇒ Array<TheCity::Account>
Returns an array of all the City accounts associated with the current user.
Instance Method Details
#church_account(options = {}) ⇒ TheCity::Account Also known as: current_account, current_church
Returns the current City account associated with the current user
15 16 17 18 |
# File 'lib/the_city/api/accounts.rb', line 15 def church_account(={}) @church_account = nil if .delete(:force_download) @church_account ||= object_from_response(TheCity::Account, :get, "/church_account", ) end |
#my_accounts(options = {}) ⇒ Array<TheCity::Account>
Returns an array of all the City accounts associated with the current user
27 28 29 30 |
# File 'lib/the_city/api/accounts.rb', line 27 def my_accounts(={}) @my_accounts = nil if .delete(:force_download) @my_accounts ||= objects_from_response(TheCity::Account, :get, "/me/accounts", ) end |