Sha256: e5620cdf20c0a1c0a3f3aadc5e74760fc56643cfc3a45bec5352dbd506f8d54a

Contents?: true

Size: 758 Bytes

Versions: 26

Compression:

Stored size: 758 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_topic_comment(params={})
      id       = params["id"]
      topic_id = params["topic_id"]
      path     = "/topics/#{topic_id}/comments/#{id}.json"

      request(
        :method => :get,
        :path => path,
      )
    end
  end # Real

  class Mock
    def get_topic_comment(params={})
      id       = params["id"]
      topic_id = params["topic_id"]

      unless (topic_comment = self.find!(:topic_comments, id)) && topic_comment["topic_id"] == topic_id
        error!(:not_found)
      else
        response(
          :path  => "/topics/#{topic_id}/comments/#{id}.json",
          :body  => {
            "topic_comment" => topic_comment,
          },
        )
      end
    end
  end # Mock
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
zendesk2-1.4.2 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.4.1 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.4.0 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.3.3 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.3.2 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.3.1 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.3.0 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.10 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.9 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.7 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.1.3 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.1.2 lib/zendesk2/client/requests/get_topic_comment.rb
zendesk2-1.0.0 lib/zendesk2/client/requests/get_topic_comment.rb