README.md in puppet_forge-3.0.0 vs README.md in puppet_forge-3.1.0
- old
+ new
@@ -79,17 +79,18 @@
### Basic Interface
Each of the models uses ActiveRecord-like REST functionality to map over the Forge API endpoints.
Most simple ActiveRecord-style interactions function as intended.
-Currently, only unauthenticated read-only actions are supported.
+Currently, only read-only actions are supported.
The methods find, where, and all immediately make one API request.
```ruby
# Find a Resource by Slug
-PuppetForge::User.find('puppetlabs') # => #<Forge::V3::User(/v3/users/puppetlabs)>
+PuppetForge::User.find('puppetlabs') # => #<PuppetForge::V3::User(/v3/users/puppetlabs)>
+PuppetForge::Module.find('puppetlabs-stdlib') # => #<PuppetForge::V3::Module(/v3/modules/puppetlabs-stdlib)>
# Find All Resources
PuppetForge::Module.all # See "Paginated Collections" below for important info about enumerating resource sets.
# Find Resources with Conditions
@@ -107,11 +108,11 @@
#### Errors
All API Requests (whether via find, where, or all) will raise a Faraday::ResourceNotFound error if the request fails.
-### Installing a Release
+### Downloading and installing a module release
A release tarball can be downloaded and installed by following the steps below.
```ruby
release_slug = "puppetlabs-apache-1.6.0"
@@ -183,9 +184,27 @@
user.username # => "puppetlabs"
# This *does* trigger a request
user.created_at # => "2010-05-19 05:46:26 -0700"
```
+
+### Configuration
+
+To overwrite the default of `https://forgeapi.puppet.com` and set a custom url for the Forge API:
+
+```ruby
+PuppetForge.host = "https://your-own-api.url/"
+```
+
+### Authorization
+
+To authorize your requests with an API key from a Forge user account:
+
+```ruby
+PuppetForge::Connection.authorization = "<your-api-key-here>"
+```
+
+You can generate API keys on your user profile page once you've [logged into the Forge website](https://forge.puppet.com/login).
### i18n
When adding new error or log messages please follow the instructions for
[writing translatable code](https://github.com/puppetlabs/gettext-setup-gem#writing-translatable-code).