module Yammer module Api module Message # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.create_message() def create_message(opts={}) post("/api/v1/messages", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.delete_message def delete_message(id, opts={}) post("/api/v1/messages/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.get_message def get_message(id, opts={}) get("/api/v1/messages/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.all_messages def all_messages(opts={}) get("/api/v1/messages", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_sent def messages_sent(opts={}) get("/api/v1/messages/sent", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_received def messages_received(opts={}) get("/api/v1/messages/received", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.private_messages def private_messages(opts={}) get("/api/v1/messages/private", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.followed_messages def followed_messages(opts={}) get("/api/v1/messages/following", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_from_user def messages_from_user(id, opts={}) get("/api/v1/messages/from_user/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_about_topic def messages_about_topic(id, opts={}) get("/api/v1/messages/about_topic/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_in_group def messages_in_group(id, opts={}) get("/api/v1/messages/in_group/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_liked_by def messages_liked_by(id, opts={}) get("/api/v1/messages/liked_by/#{id}", opts) end # @see https://developer.yammer.com/restapi/#rest-messages # @api_path /api/v1/messages # @rate_limited Yes # @authentication Requires user context # @raise [Yammer::Error::Unauthorized] Error raised when supplied user credentials are not valid. # @return [Yammer::Response] # @param id [Integer] the thread ID # @param [Hash] opts the options to fetch a thread with # @option opts [Integer] :newer_than # @example Fetch data for the thread # Yammer.messages_in_thread def messages_in_thread(id, opts={}) get("/api/v1/messages/in_thread/#{id}", opts) end end end end