Module: Typetalk::Api::Mention
- Included in:
- Typetalk::Api
- Defined in:
- lib/typetalk/api/mention.rb
Instance Method Summary collapse
Instance Method Details
#get_mentions(options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/typetalk/api/mention.rb', line 6 def get_mentions(={}) = {token:nil, from:nil, unread:nil}.merge() response = connection.get do |req| req.url "#{endpoint}/mentions" req.params[:access_token] = [:token] || access_token req.params[:from] = [:from] unless [:from].nil? req.params[:unread] = [:unread] unless [:unread].nil? end parse_response(response) end |
#read_mention(mention_id, options = {}) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/typetalk/api/mention.rb', line 19 def read_mention(mention_id, ={}) = {token:nil}.merge() response = connection.put do |req| req.url "#{endpoint}/mentions/#{mention_id}" req.params[:access_token] = [:token] || access_token end parse_response(response) end |