Sha256: 118a3446652f6f0e263fbeed150a2b66c7de5dc5c699115488684d5ceda2d4c0

Contents?: true

Size: 551 Bytes

Versions: 53

Compression:

Stored size: 551 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_message(params={})
      id  = params["id"]
      url = params["url"]

      request(
        :path => "messages/#{id}",
        :url  => url
      )
    end
  end

  class Mock
    def get_message(params={})
      identity = resource_identity(params)

      if message = self.data[:messages].values.detect { |m| m["id"] == identity }
        response(
          :body   => {"message" => message},
          :status => 200,
        )
      else
        response(status: 404)
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
ey-core-3.1.11 lib/ey-core/requests/get_message.rb
ey-core-3.1.10 lib/ey-core/requests/get_message.rb
ey-core-3.1.9 lib/ey-core/requests/get_message.rb
ey-core-3.1.8 lib/ey-core/requests/get_message.rb
ey-core-3.1.7 lib/ey-core/requests/get_message.rb
ey-core-3.1.6 lib/ey-core/requests/get_message.rb
ey-core-3.1.5 lib/ey-core/requests/get_message.rb
ey-core-3.1.4 lib/ey-core/requests/get_message.rb
ey-core-3.1.3 lib/ey-core/requests/get_message.rb
ey-core-3.1.2 lib/ey-core/requests/get_message.rb
ey-core-3.1.1 lib/ey-core/requests/get_message.rb
ey-core-3.1.0 lib/ey-core/requests/get_message.rb
ey-core-3.0.5 lib/ey-core/requests/get_message.rb
ey-core-3.0.4 lib/ey-core/requests/get_message.rb
ey-core-3.0.3 lib/ey-core/requests/get_message.rb
ey-core-3.0.2 lib/ey-core/requests/get_message.rb
ey-core-3.0.1 lib/ey-core/requests/get_message.rb
ey-core-3.0.0 lib/ey-core/requests/get_message.rb
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/get_message.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/get_message.rb