Sha256: 75474dac9d51326f576bc2aca9983c24e25f366d046b49b6545bfbb40ffc462e

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

# frozen_string_literal: true

module Panoptes
  class Client
    module Comments
      # Post a comment to a talk discussion
      #
      # @param discussion_id [Integer] filter by focussable id
      # @param focus_type [String] filter by focussable type
      # @return list of discussions
      def create_comment(discussion_id:, body:)
        user_id = token_contents['id']
        response = talk.post('/comments', comments: { discussion_id: discussion_id, body: body, user_id: user_id })
        response.fetch('comments')[0]
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
panoptes-client-1.2.1 lib/panoptes/client/comments.rb
panoptes-client-1.2.0 lib/panoptes/client/comments.rb
panoptes-client-1.1.1 lib/panoptes/client/comments.rb
panoptes-client-1.1.0 lib/panoptes/client/comments.rb
panoptes-client-1.0.0 lib/panoptes/client/comments.rb