Module: RepsClient::CommunityMethods

Included in:
Client
Defined in:
lib/reps_client/community.rb

Instance Method Summary collapse

Instance Method Details

#get_communitiesArray<RepsClient::Community>

Retrieves a list of communities from the REPS web service. Note that all of the other service methods require a community ID that is returned by this method.

Returns:



37
38
39
40
41
42
# File 'lib/reps_client/community.rb', line 37

def get_communities
  response = send_soap_request(:get_communities)
  communities = response.to_hash[:get_communities_response][:get_communities_result][:diffgram][:document_element][:community]
  communities ||= []
  [communities].flatten.collect { |c| Community.new(c) }
end