lib/mambanation/base.rb in mambanation-0.1.13 vs lib/mambanation/base.rb in mambanation-0.1.14

- old
+ new

@@ -170,18 +170,26 @@ end def user_unread_system_messages(id) perform_get("/users/#{id.to_i}/unread_system_messages.json") end + + def read_user_message(id, message_id) + perform_post("/users/#{id.to_i}/messages/#{message_id.to_i}/read.json") + end # # User Announcements # def announcements(id) perform_get("/users/#{id.to_i}/announcements.json") end + def read_user_announcement(id, announcement_id) + perform_put("/users/#{id.to_i}/announcements/#{announcement_id.to_i}/read.json") + end + protected def self.mime_type(file) case when file =~ /\.jpg/ then 'image/jpg' @@ -214,10 +222,10 @@ { :body => body, :headers => {"Content-Type" => "multipart/form-data; boundary=#{boundary}"} } end - + def build_multipart_bodies(parts) self.class.build_multipart_bodies(parts) end private def request_options(opts={})