From 5b7f9ecf10bece36b398525ac7a026f4d0003204 Mon Sep 17 00:00:00 2001 From: github username Date: Mon, 11 May 2020 12:39:36 -0400 Subject: [PATCH 1/4] changed api url --- lib/nppes_api.rb | 2 +- lib/nppes_api/version.rb | 2 +- nppes_api-0.1.1/.gitignore | 10 + nppes_api-0.1.1/.rspec | 2 + nppes_api-0.1.1/.rubocop.yml | 209 ++++++++++++++++++ nppes_api-0.1.1/.travis.yml | 5 + nppes_api-0.1.1/Gemfile | 4 + nppes_api-0.1.1/LICENSE.txt | 21 ++ nppes_api-0.1.1/README.md | 46 ++++ nppes_api-0.1.1/Rakefile | 6 + nppes_api-0.1.1/bin/console | 14 ++ nppes_api-0.1.1/bin/setup | 8 + nppes_api-0.1.1/lib/nppes_api.rb | 43 ++++ nppes_api-0.1.1/lib/nppes_api/address.rb | 26 +++ nppes_api-0.1.1/lib/nppes_api/basic.rb | 26 +++ nppes_api-0.1.1/lib/nppes_api/provider.rb | 25 +++ .../lib/nppes_api/search_results.rb | 21 ++ nppes_api-0.1.1/lib/nppes_api/taxonomy.rb | 21 ++ nppes_api-0.1.1/lib/nppes_api/version.rb | 3 + nppes_api-0.1.1/nppes_api.gemspec | 28 +++ 20 files changed, 520 insertions(+), 2 deletions(-) create mode 100644 nppes_api-0.1.1/.gitignore create mode 100644 nppes_api-0.1.1/.rspec create mode 100644 nppes_api-0.1.1/.rubocop.yml create mode 100644 nppes_api-0.1.1/.travis.yml create mode 100644 nppes_api-0.1.1/Gemfile create mode 100644 nppes_api-0.1.1/LICENSE.txt create mode 100644 nppes_api-0.1.1/README.md create mode 100644 nppes_api-0.1.1/Rakefile create mode 100755 nppes_api-0.1.1/bin/console create mode 100755 nppes_api-0.1.1/bin/setup create mode 100644 nppes_api-0.1.1/lib/nppes_api.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/address.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/basic.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/provider.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/search_results.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/taxonomy.rb create mode 100644 nppes_api-0.1.1/lib/nppes_api/version.rb create mode 100644 nppes_api-0.1.1/nppes_api.gemspec diff --git a/lib/nppes_api.rb b/lib/nppes_api.rb index 340b42e..fb794d3 100644 --- a/lib/nppes_api.rb +++ b/lib/nppes_api.rb @@ -38,6 +38,6 @@ module NPPESApi # @param limit [Integer] Limit results, default = 10, max = 200 # @param skip [Integer] Skip first N results, max = 1000 def self.search(options = {}) - SearchResults.new(RestClient.get('https://npiregistry.cms.hhs.gov/api', params: options).body) + SearchResults.new(RestClient.get('https://npiregistry.cms.hhs.gov/api/?version=2.1', params: options).body) end end diff --git a/lib/nppes_api/version.rb b/lib/nppes_api/version.rb index caace6d..5e082e9 100644 --- a/lib/nppes_api/version.rb +++ b/lib/nppes_api/version.rb @@ -1,3 +1,3 @@ module NPPESApi - VERSION = '0.1.1'.freeze + VERSION = '0.1.2'.freeze end diff --git a/nppes_api-0.1.1/.gitignore b/nppes_api-0.1.1/.gitignore new file mode 100644 index 0000000..b7e7725 --- /dev/null +++ b/nppes_api-0.1.1/.gitignore @@ -0,0 +1,10 @@ +/.bundle/ +/.yardoc +/Gemfile.lock +/_yardoc/ +/coverage/ +/doc/ +/pkg/ +/spec/reports/ +/tmp/ +*.gem diff --git a/nppes_api-0.1.1/.rspec b/nppes_api-0.1.1/.rspec new file mode 100644 index 0000000..8c18f1a --- /dev/null +++ b/nppes_api-0.1.1/.rspec @@ -0,0 +1,2 @@ +--format documentation +--color diff --git a/nppes_api-0.1.1/.rubocop.yml b/nppes_api-0.1.1/.rubocop.yml new file mode 100644 index 0000000..0dc7621 --- /dev/null +++ b/nppes_api-0.1.1/.rubocop.yml @@ -0,0 +1,209 @@ +AllCops: + TargetRubyVersion: 2.3 + Include: + - 'Rakefile' + Exclude: + - 'config.ru' + - 'bin/**/*' + - 'cache/**/*' + - 'db/**/*' + +Metrics/LineLength: + Max: 140 + +# Removes the requirement for using double quotes only for string interpolation. +Style/StringLiterals: + Enabled: false + +# These complexity and length metrics tend to require a bunch of high-touch refactoring +# in existing projects. Leaving them high for now, and we can slowly lower them to standard +# levels in the near future. +Metrics/ModuleLength: + Max: 200 + +Metrics/ClassLength: + Max: 200 + +Metrics/MethodLength: + Max: 50 + +Metrics/AbcSize: + Max: 75 + +Metrics/CyclomaticComplexity: + Max: 20 + +Metrics/PerceivedComplexity: + Max: 20 + +# Allow long keyword parameter lists +Metrics/ParameterLists: + Max: 15 + CountKeywordArgs: false + +# This enforces bad style and can break things. +# See: https://github.com/bbatsov/rubocop/issues/2614 +Performance/Casecmp: + Enabled: false + +# This requires the use of alias rather than alias_method, which seems totally arbitrary +Style/Alias: + Enabled: false + +# This cop enforces that submodules/subclasses be defined like this: +# +# class Foo::Bar +# +# rather than like this: +# +# module Foo +# class Bar +# +# This is actually semantically different, and there are valid reasons for wanting to use the latter +# form because of the way the former does funky stuff to the namespace. +Style/ClassAndModuleChildren: + Enabled: false + +# This forces you to use class instance variables rather than class variables, which seems pretty +# situation-specific +Style/ClassVars: + Enabled: false + +# This makes you do things like this: +# variable = if test +# 'abc-123' +# else +# 'def-456' +# end +# +# I think this is harder to read than assigning the variable within the conditional. +Style/ConditionalAssignment: + Enabled: false + +# This cop forces you to put a return at the beginning of a block of code rather than having an if statement +# whose body carries to the end of the function. For example: +# +# def foo +# ... +# if test +# ... +# end +# end +# +# would be considered bad, and the cop would force you to put a `return if !test` before that block and +# then remove the if. The problem is that this hides intent, since the if test does have a purpose in +# readability, and it could also be easier for future changes to miss the return statement and add code +# after it expecting it to be executed. +Style/GuardClause: + Enabled: false + +# This is pretty much the same thing as the one above. Inside a loop, it forces you to use next to skip +# iteration rather than using an if block that runs to the end of the loop, and it suffers from the same +# problems as above. +Style/Next: + Enabled: false + +Style/IndentArray: + EnforcedStyle: consistent + +# This forces you to change simple if/unless blocks to the conditional form like: `return 2 if badness`. +# Unfortunately there are a number of cases where it makes sense to use the block form even for simple statements, +# and the modifier form can be easy to miss when scanning code. +Style/IfUnlessModifier: + Enabled: false + +# This cop forces the use of unless in all negated if statements. Since unless is a source of so many arguments +# and there seems to be no purpose in enforcing its use, disable it. +Style/NegatedIf: + Enabled: false + +# This one enforces that functions with names like has_value? be renamed to value?. There are many cases where +# doing so would make the code more difficult to parse. +Style/PredicateName: + Enabled: false + +# By default this will force you to use specific names for arguments for enumerable and other methods, +# which I don't understand even a little bit. +Style/SingleLineBlockParams: + Methods: [] + +# Allow trivial methods that have ? at the end. +Style/TrivialAccessors: + AllowPredicates: true + +# It's ok to make a small array of words without using a %w +Style/WordArray: + MinSize: 5 + +# Some people really like to put lines at the beginning and end of class bodies, while other people +# really don't. It doesn't really seem to matter. +Style/EmptyLinesAroundClassBody: + Enabled: false + +# This forces you to put a comment like this at the top of every single file: +# frozen_string_literal: true +# In Ruby 3, string literals will be frozen by default, so doing so future-proofs +# the code, but in the meantime it's a huge pain in the ass. +Style/FrozenStringLiteralComment: + Enabled: false + +# this forces you to use the lambda keyword rather than -> for multiline lambdas, which seems totally arbitrary +Style/Lambda: + Enabled: false + +# Force indentation for milti-line expressions and method calls +Style/MultilineOperationIndentation: + EnforcedStyle: indented + +Style/MultilineMethodCallIndentation: + EnforcedStyle: indented + +# This disallows the use of $1, $2 from regular expressions, which seems to make no sense whatsoever +Style/PerlBackrefs: + Enabled: false + +# This enforces that multi-line array literals do not end in a comma. For example: +# +# foo = [ +# 1, +# 2 +# ] +Style/TrailingCommaInLiteral: + EnforcedStyleForMultiline: no_comma + +# Same as above but for method arguments rather than array entries. +Style/TrailingCommaInArguments: + EnforcedStyleForMultiline: no_comma + +# This forces you to replace things like: `[1, 2, 3].length == 0` with `[1,2,3].empty?`. The problem is that +# not all things that implement length also implement empty? so you will get errors that cannot be resolved, +# and the cop will encourage you to do things that are incorrect. +Style/ZeroLengthPredicate: + Enabled: false + +# Enforce alignment of multi-line assignments to be like this: +# variable = if test +# ... +# end +Lint/EndAlignment: + AlignWith: variable + +# This cop will require you to replace or prefix method arguments that go unused with underscores. The problem +# is that while seeming to solve no problem this could easily cause issues where someone editing the code to +# begin using the variable forgets to remove the underscore. Also, if you replace the argument with _, then +# information about the meaning of that argument is lost. +Lint/UnusedMethodArgument: + Enabled: false + +# Same as above but with block arguments. +Lint/UnusedBlockArgument: + Enabled: false + +# This cop forces all rescue blocks to do something with the exception. Sometimes you just have an exception +# you want to rescue but do nothing about. +Lint/HandleExceptions: + Enabled: false + +# This isn't a library, so let's not enforce documentation. +Documentation: + Enabled: false diff --git a/nppes_api-0.1.1/.travis.yml b/nppes_api-0.1.1/.travis.yml new file mode 100644 index 0000000..03ee64f --- /dev/null +++ b/nppes_api-0.1.1/.travis.yml @@ -0,0 +1,5 @@ +sudo: false +language: ruby +rvm: + - 2.3.1 +before_install: gem install bundler -v 1.12.5 diff --git a/nppes_api-0.1.1/Gemfile b/nppes_api-0.1.1/Gemfile new file mode 100644 index 0000000..0987e1d --- /dev/null +++ b/nppes_api-0.1.1/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in nppes_api.gemspec +gemspec diff --git a/nppes_api-0.1.1/LICENSE.txt b/nppes_api-0.1.1/LICENSE.txt new file mode 100644 index 0000000..7e58e65 --- /dev/null +++ b/nppes_api-0.1.1/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Aubrey Holland + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/nppes_api-0.1.1/README.md b/nppes_api-0.1.1/README.md new file mode 100644 index 0000000..fa5bf53 --- /dev/null +++ b/nppes_api-0.1.1/README.md @@ -0,0 +1,46 @@ +# NPPES Api + +This is a Ruby wrapper for the [NPPES NPI Registry API](https://npiregistry.cms.hhs.gov/registry/help-api). It provides a simple +query interface and returns data either in raw JSON format or wrapped with queryable Ruby objects. + +## Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'nppes_api' +``` + +And then execute: + + $ bundle + +Or install it yourself as: + + $ gem install nppes_api + +## Usage + +The entrypoint for searches is at NPPESApi.search. See the code in lib/nppes_api.rb for information on the options that you can pass, +which are the same as the ones [described by NPPES](https://npiregistry.cms.hhs.gov/api/demo). A successful search will return an +NPPESApi::SearchResults object, from which you can call methods to retrieve data or call the raw_data method to get the original JSON. +Here is an example query: + +``` +NPPESApi.search(number: 1932494937).results.first.taxonomies.first.state #=> 'NC' +``` + +## Development + +After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. + +To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). + +## Contributing + +Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/nppes_api. + + +## License + +The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). diff --git a/nppes_api-0.1.1/Rakefile b/nppes_api-0.1.1/Rakefile new file mode 100644 index 0000000..4c774a2 --- /dev/null +++ b/nppes_api-0.1.1/Rakefile @@ -0,0 +1,6 @@ +require 'bundler/gem_tasks' +require 'rspec/core/rake_task' + +RSpec::Core::RakeTask.new(:spec) + +task default: :spec diff --git a/nppes_api-0.1.1/bin/console b/nppes_api-0.1.1/bin/console new file mode 100755 index 0000000..9d2bd03 --- /dev/null +++ b/nppes_api-0.1.1/bin/console @@ -0,0 +1,14 @@ +#!/usr/bin/env ruby + +require "bundler/setup" +require "nppes_api" + +# You can add fixtures and/or initialization code here to make experimenting +# with your gem easier. You can also use a different console, if you like. + +# (If you use this, don't forget to add pry to your Gemfile!) +# require "pry" +# Pry.start + +require "irb" +IRB.start diff --git a/nppes_api-0.1.1/bin/setup b/nppes_api-0.1.1/bin/setup new file mode 100755 index 0000000..dce67d8 --- /dev/null +++ b/nppes_api-0.1.1/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here diff --git a/nppes_api-0.1.1/lib/nppes_api.rb b/nppes_api-0.1.1/lib/nppes_api.rb new file mode 100644 index 0000000..340b42e --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api.rb @@ -0,0 +1,43 @@ +require 'nppes_api/version' + +require 'rest-client' + +require_relative 'nppes_api/address' +require_relative 'nppes_api/basic' +require_relative 'nppes_api/provider' +require_relative 'nppes_api/search_results' +require_relative 'nppes_api/taxonomy' + +module NPPESApi + ENUMERATION_TYPES = [ + NPI_1 = 'NPI-1'.freeze, + NPI_2 = 'NPI-2'.freeze + ].freeze + + ADDRESS_PURPOSES = [ + LOCATION = 'LOCATION'.freeze, + MAILING = 'MAILING'.freeze + ].freeze + + # This is the main entry point for searches. Provide params as described below to parameterize the search. Search results can consist + # of at most 1200 results, and each search can return at most 200 of them. Use the limit and skip parameters as described below to + # perform pagination of the data. + # {https://npiregistry.cms.hhs.gov/registry/help-api} + # @param number [Integer] An NPI number to search with. Must be exactly 10 characters + # @param enumeration_type [String] One of the ENUMERATION_TYPES from above. NPI_1 is an individual search, and NPI_2 is organizations. + # Will search across both types if unspecified. + # @param taxonomy_description [String] Specialty or Description. Can include a wildcard (*) after at least two characters + # @param first_name [String] Exact name or include a wildcard after two characters. Only valid for type 1 searches. + # @param last_name [String] Exact name or include a wildcard after two characters. Only valid for type 1 searches. + # @param organization_name [String] Exact name or include a wildcard after two characters. Only valid for type 2 searches. + # @param address_purpose [String] One of the ADDRESS_PURPOSES above. Requires other criteria. + # @param city [String] Exact city name, no wildcards + # @param state [String] 2-character abbreviation, requires other criteria + # @param postal_code [String] At least two characters, wildcard is implied + # @param country_code [String] Exactly two characters. If "US" other criteria are required + # @param limit [Integer] Limit results, default = 10, max = 200 + # @param skip [Integer] Skip first N results, max = 1000 + def self.search(options = {}) + SearchResults.new(RestClient.get('https://npiregistry.cms.hhs.gov/api', params: options).body) + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/address.rb b/nppes_api-0.1.1/lib/nppes_api/address.rb new file mode 100644 index 0000000..d29016a --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/address.rb @@ -0,0 +1,26 @@ +module NPPESApi + class Address + def initialize(data) + @data = data + end + + methods = [ + :address_1, + :address_2, + :city, + :state, + :postal_code, + :telephone_number, + :country_code, + :country_name, + :address_type, + :address_purpose + ] + + methods.each do |meth| + define_method(meth) do + @data[meth.to_s] + end + end + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/basic.rb b/nppes_api-0.1.1/lib/nppes_api/basic.rb new file mode 100644 index 0000000..e0b4f22 --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/basic.rb @@ -0,0 +1,26 @@ +module NPPESApi + class Basic + def initialize(data) + @data = data + end + + methods = [ + :status, + :credential, + :first_name, + :last_name, + :middle_name, + :name, + :gender, + :sole_proprietor, + :last_updated, + :enumeration_date + ] + + methods.each do |meth| + define_method(meth) do + @data[meth.to_s] + end + end + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/provider.rb b/nppes_api-0.1.1/lib/nppes_api/provider.rb new file mode 100644 index 0000000..ff4b132 --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/provider.rb @@ -0,0 +1,25 @@ +module NPPESApi + class Provider + def initialize(data) + @data = data + end + + def taxonomies + @taxonomies ||= @data['taxonomies'].map { |i| Taxonomy.new(i) } + end + + def addresses + @addresses ||= @data['addresses'].map { |i| Address.new(i) } + end + + def basic + @basic = Basic.new(@data['basic']) + end + + [:created_epoch, :last_updated_epoch, :number, :other_names, :identifiers].each do |meth| + define_method(meth) do + @data[meth.to_s] + end + end + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/search_results.rb b/nppes_api-0.1.1/lib/nppes_api/search_results.rb new file mode 100644 index 0000000..560f714 --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/search_results.rb @@ -0,0 +1,21 @@ +require 'multi_json' + +module NPPESApi + class SearchResults + def initialize(raw_data) + @data = MultiJson.load(raw_data) + end + + def raw_data + @data + end + + def result_count + @data['result_count'] + end + + def results + @results ||= @data['results'].map { |i| Provider.new(i) } + end + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/taxonomy.rb b/nppes_api-0.1.1/lib/nppes_api/taxonomy.rb new file mode 100644 index 0000000..25c9e9f --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/taxonomy.rb @@ -0,0 +1,21 @@ +module NPPESApi + class Taxonomy + def initialize(data) + @data = data + end + + methods = [ + :state, + :code, + :primary, + :license, + :desc + ] + + methods.each do |meth| + define_method(meth) do + @data[meth.to_s] + end + end + end +end diff --git a/nppes_api-0.1.1/lib/nppes_api/version.rb b/nppes_api-0.1.1/lib/nppes_api/version.rb new file mode 100644 index 0000000..caace6d --- /dev/null +++ b/nppes_api-0.1.1/lib/nppes_api/version.rb @@ -0,0 +1,3 @@ +module NPPESApi + VERSION = '0.1.1'.freeze +end diff --git a/nppes_api-0.1.1/nppes_api.gemspec b/nppes_api-0.1.1/nppes_api.gemspec new file mode 100644 index 0000000..b5f47b8 --- /dev/null +++ b/nppes_api-0.1.1/nppes_api.gemspec @@ -0,0 +1,28 @@ +# coding: utf-8 +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'nppes_api/version' + +Gem::Specification.new do |spec| + spec.name = "nppes_api" + spec.version = NPPESApi::VERSION + spec.authors = ["Aubrey Holland"] + spec.email = ["aubrey@adhocteam.us"] + + spec.summary = 'Tools for searching the NPPES directory by their API' + spec.description = 'CMS provides an API for searching providers and organizations in NPPES. This is a tool for accessing it.' + spec.homepage = "https://github.com/adhocteam/nppes_api" + spec.license = "MIT" + + spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.require_paths = ['lib'] + + spec.add_runtime_dependency 'multi_json', '> 0' + spec.add_runtime_dependency 'rest-client', '> 0' + + spec.add_development_dependency 'bundler', '~> 1.12' + spec.add_development_dependency 'rake', '~> 10.0' + spec.add_development_dependency 'rspec', '~> 3.0' +end From 062665fd3b5f42867c2b22353bc7eff18cba6a3f Mon Sep 17 00:00:00 2001 From: github username Date: Mon, 11 May 2020 14:03:34 -0400 Subject: [PATCH 2/4] changed version to 2.0.0 --- lib/nppes_api/version.rb | 2 +- nppes_api-0.1.1/lib/nppes_api/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nppes_api/version.rb b/lib/nppes_api/version.rb index 5e082e9..65e83ed 100644 --- a/lib/nppes_api/version.rb +++ b/lib/nppes_api/version.rb @@ -1,3 +1,3 @@ module NPPESApi - VERSION = '0.1.2'.freeze + VERSION = '2.0.0'.freeze end diff --git a/nppes_api-0.1.1/lib/nppes_api/version.rb b/nppes_api-0.1.1/lib/nppes_api/version.rb index caace6d..65e83ed 100644 --- a/nppes_api-0.1.1/lib/nppes_api/version.rb +++ b/nppes_api-0.1.1/lib/nppes_api/version.rb @@ -1,3 +1,3 @@ module NPPESApi - VERSION = '0.1.1'.freeze + VERSION = '2.0.0'.freeze end From 333377691de0843fe2cefc218a5efb9efbfe9329 Mon Sep 17 00:00:00 2001 From: github username Date: Mon, 11 May 2020 14:27:48 -0400 Subject: [PATCH 3/4] changed to version 2.0.1 --- lib/nppes_api/version.rb | 2 +- nppes_api-0.1.1/lib/nppes_api/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nppes_api/version.rb b/lib/nppes_api/version.rb index 65e83ed..f1ff85c 100644 --- a/lib/nppes_api/version.rb +++ b/lib/nppes_api/version.rb @@ -1,3 +1,3 @@ module NPPESApi - VERSION = '2.0.0'.freeze + VERSION = '2.0.1'.freeze end diff --git a/nppes_api-0.1.1/lib/nppes_api/version.rb b/nppes_api-0.1.1/lib/nppes_api/version.rb index 65e83ed..f1ff85c 100644 --- a/nppes_api-0.1.1/lib/nppes_api/version.rb +++ b/nppes_api-0.1.1/lib/nppes_api/version.rb @@ -1,3 +1,3 @@ module NPPESApi - VERSION = '2.0.0'.freeze + VERSION = '2.0.1'.freeze end From faa4a4649432a762960e486c95195e23ef944769 Mon Sep 17 00:00:00 2001 From: github username Date: Mon, 11 May 2020 14:44:53 -0400 Subject: [PATCH 4/4] changed api call --- nppes_api-0.1.1/lib/nppes_api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nppes_api-0.1.1/lib/nppes_api.rb b/nppes_api-0.1.1/lib/nppes_api.rb index 340b42e..fb794d3 100644 --- a/nppes_api-0.1.1/lib/nppes_api.rb +++ b/nppes_api-0.1.1/lib/nppes_api.rb @@ -38,6 +38,6 @@ module NPPESApi # @param limit [Integer] Limit results, default = 10, max = 200 # @param skip [Integer] Skip first N results, max = 1000 def self.search(options = {}) - SearchResults.new(RestClient.get('https://npiregistry.cms.hhs.gov/api', params: options).body) + SearchResults.new(RestClient.get('https://npiregistry.cms.hhs.gov/api/?version=2.1', params: options).body) end end