module Typetalk::Api::Mention

Public Instance Methods

get_mentions(options={}) click to toggle source
# File lib/typetalk/api/mention.rb, line 6
def get_mentions(options={})
  options = {token:nil, from:nil, unread:nil}.merge(options)

  response = connection.get do |req|
    req.url "#{endpoint}/mentions"
    req.params[:access_token] = options[:token] || access_token
    req.params[:from] = options[:from] unless options[:from].nil?
    req.params[:unread] = options[:unread] unless options[:unread].nil?
  end
  parse_response(response)
end
read_mention(mention_id, options={}) click to toggle source
# File lib/typetalk/api/mention.rb, line 19
def read_mention(mention_id, options={})
  options = {token:nil}.merge(options)

  response = connection.put do |req|
    req.url "#{endpoint}/mentions/#{mention_id}"
    req.params[:access_token] = options[:token] || access_token
  end
  parse_response(response)
end