Sha256: 5efd787b5a0aaaf134bb8066d6cf2e69f41e80f8e5e2f4b799d71a629a017858

Contents?: true

Size: 528 Bytes

Versions: 15

Compression:

Stored size: 528 Bytes

Contents

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 = current_user["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

15 entries across 15 versions & 1 rubygems

Version Path
panoptes-client-0.3.8 lib/panoptes/client/comments.rb
panoptes-client-0.3.7 lib/panoptes/client/comments.rb
panoptes-client-0.3.6 lib/panoptes/client/comments.rb
panoptes-client-0.3.5 lib/panoptes/client/comments.rb
panoptes-client-0.3.4 lib/panoptes/client/comments.rb
panoptes-client-0.3.3 lib/panoptes/client/comments.rb
panoptes-client-0.3.2 lib/panoptes/client/comments.rb
panoptes-client-0.3.1 lib/panoptes/client/comments.rb
panoptes-client-0.3.0 lib/panoptes/client/comments.rb
panoptes-client-0.2.13 lib/panoptes/client/comments.rb
panoptes-client-0.2.12 lib/panoptes/client/comments.rb
panoptes-client-0.2.11 lib/panoptes/client/comments.rb
panoptes-client-0.2.10 lib/panoptes/client/comments.rb
panoptes-client-0.2.9 lib/panoptes/client/comments.rb
panoptes-client-0.2.8 lib/panoptes/client/comments.rb