lib/google_apps/transport.rb in google_apps-0.4.2 vs lib/google_apps/transport.rb in google_apps-0.4.5

- old
+ new

@@ -134,15 +134,25 @@ # # add_member_to 'test', document # # add_member_to returns the response received from Google. def add_member_to(group_id, document) - puts @group + "/#{group_id}/member" add(@group + "/#{group_id}/member", document) end + # delete_member_from removes a member from a group in the + # domain. It takes a group_id and member_id as arguments. + # + # delete_member_from 'test_group', 'member@cnm.edu' + # + # delete_member_from returns the respnse received from Google. + def delete_member_from(group_id, member_id) + delete(@group + "/#{group_id}/member", member_id) + end + + # add is a generic target for method_missing. It is # intended to handle the general case of adding # to the GoogleApps Domain. It takes an API endpoint # and a GoogleApps::Atom document as arguments. # @@ -265,13 +275,9 @@ case request_type when :auth @request['content-type'] = "application/x-www-form-urlencoded" when :migrate @request['content-type'] = "multipart/related; boundary=\"#{BOUNDARY}\"" - @request['authorization'] = "GoogleLogin auth=#{@token}" - when :member - @request['content-type'] = "application/x-www-form-urlencoded" - @request['content-length'] = 0 @request['authorization'] = "GoogleLogin auth=#{@token}" else @request['content-type'] = "application/atom+xml" @request['authorization'] = "GoogleLogin auth=#{@token}" end \ No newline at end of file