class Platforms::Yammer::Api::Subscriptions
Yammer's subscription (following) management @author Benjamin Elias @since 0.1.0
Public Instance Methods
Unsubscribe from a user or topic. This usually involves setting target_id and target_type in the options hash. @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/subscriptions-1
# File lib/platforms/yammer/api/subscriptions.rb, line 45 def delete options={}, headers={} @connection.delete "subscriptions.json", options, headers end
Subscribe to a user or topic. This usually involves setting target_id and target_type in the JSON body. @param body [#to_s] Body of the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/subscriptions-1
# File lib/platforms/yammer/api/subscriptions.rb, line 35 def post body=nil, headers={} @connection.post "subscriptions.json", body, headers end
Check if the current user is subscribed to (following) a topic (hashtag) @param id [#to_s] The ID of the User @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/subscriptionsto_topicidjson
# File lib/platforms/yammer/api/subscriptions.rb, line 25 def to_topic id, options={}, headers={} @connection.get "subscriptions/to_topic/#{id}.json", options, headers end
Check if the current user is subscribed to (following) another user @param id [#to_s] The ID of the User @param options [Hash] Options for the request @param headers [Hash] Additional headers to send with the request @return [Faraday::Response] the API response @see developer.yammer.com/docs/subscriptionsto_useridjson
# File lib/platforms/yammer/api/subscriptions.rb, line 15 def to_user id, options={}, headers={} @connection.get "subscriptions/to_user/#{id}.json", options, headers end