Sha256: de15b1271c9fc7f069920baf16a3e3d43e3ccf97e0463090d4edae023a6f025e

Contents?: true

Size: 316 Bytes

Versions: 1

Compression:

Stored size: 316 Bytes

Contents

module Doctors
  module API
    extend self

    def search(criteria)
      Request.new(url, criteria).response.fetch('data')
    end

    def find(id)
      Request.new("#{url}/#{id}").response.fetch('data')
    end

    private

    def url
      'http://nhs-api.cloudapp.net/api/Organisations'
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doctors-0.0.1 lib/doctors/api.rb