Sha256: aa8ca02415671d96caab0fbe93ecf739d4c29ef488890c6246f365fd1bb36704

Contents?: true

Size: 449 Bytes

Versions: 45

Compression:

Stored size: 449 Bytes

Contents

class Zendesk2::Client
  class Real
    def get_topic(params={})
      id = params["id"]

      request(
        :method => :get,
        :path => "/topics/#{id}.json"
      )
    end
  end # Real

  class Mock
    def get_topic(params={})
      id   = params["id"]
      body = self.data[:topics][id]

      response(
        :path  => "/topics/#{id}.json",
        :body  => {
          "topic" => body
        },
      )
    end
  end # Mock
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
zendesk2-1.2.7 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.6 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.5 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.4 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.3 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.2 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.1 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.2.0 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.1.3 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.1.2 lib/zendesk2/client/requests/get_topic.rb
zendesk2-1.0.0 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.5.4 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.5.3 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.5.2 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.5.1 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.5.0 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.4.5 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.4.4 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.4.3 lib/zendesk2/client/requests/get_topic.rb
zendesk2-0.4.2 lib/zendesk2/client/requests/get_topic.rb