README.md in usda_fdc-0.1.1 vs README.md in usda_fdc-0.2.0
- old
+ new
@@ -1,7 +1,9 @@
# UsdaFdc
+[![Gem Version](https://badge.fury.io/rb/usda_fdc.svg)](https://badge.fury.io/rb/usda_fdc)
+
A Ruby interface to the USDA [FoodData Central](https://fdc.nal.usda.gov) API.
## Installation
To install the latest release:
@@ -23,9 +25,17 @@
```ruby
client = UsdaFdc::Client.new('your_api_key')
client.food(534358)
#=> { "dataType" => "Branded", "description" => "NUT 'N BERRY MIX", "fdcId" => 534358, ... }
+```
+
+You can also configure the default API key globally for all `UsdaFdc::Client` instances:
+
+```ruby
+UsdaFdc.configure do |config|
+ config.api_key = 'your_api_key'
+end
```
For more information on interacting with the API, including accepted parameters and response formats, check out the official USDA FDC [API guide](https://fdc.nal.usda.gov/api-guide.html).
## Development