README.md in micropub-endpoint-0.2.1 vs README.md in micropub-endpoint-1.0.0

- old
+ new

@@ -9,11 +9,11 @@ [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/micropub-endpoint-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/micropub-endpoint-ruby) [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/micropub-endpoint-ruby.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/micropub-endpoint-ruby/code) ## Key Features -- Compliant with [Section 5.3](https://www.w3.org/TR/micropub/#endpoint-discovery) of [the W3C's Micropub specification](https://www.w3.org/TR/micropub/). +- Compliant with [Section 5.3](https://www.w3.org/TR/micropub/#endpoint-discovery) of [the W3C's Micropub Recommendation](https://www.w3.org/TR/micropub/). - Supports Ruby 2.4 and newer. ## Getting Started Before installing and using micropub-endpoint-ruby, you'll want to have [Ruby](https://www.ruby-lang.org) 2.4 (or newer) installed. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). @@ -48,11 +48,11 @@ endpoint = Micropub::Endpoint.discover('https://adactio.com') puts endpoint # returns String: 'https://adactio.com/micropub' ``` -This example will search `https://adactio.com` for a valid Micropub endpoint in accordance with the rules described in [the W3C's Micropub specification](https://www.w3.org/TR/micropub/#endpoint-discovery). In this case, the program returns a string: `https://adactio.com/micropub`. +This example will search `https://adactio.com` for a valid Micropub endpoint in accordance with the rules described in [the W3C's Micropub Recommendation](https://www.w3.org/TR/micropub/#endpoint-discovery). In this case, the program returns a string: `https://adactio.com/micropub`. If no endpoint is discovered at the provided URL, the program will return `nil`: ```ruby require 'micropub/endpoint' @@ -62,21 +62,18 @@ puts endpoint.nil? # returns Boolean: true ``` ### Advanced Usage -Should the need arise, you may work directly with the `Micropub::Endpoint::Discover` class: +Should the need arise, you may work directly with the `Micropub::Endpoint::Client` class: ```ruby require 'micropub/endpoint' -discoverer = Micropub::Endpoint::Discover.new('https://adactio.com') +client = Micropub::Endpoint::Client.new('https://adactio.com') -puts discoverer.url # returns String: 'https://adactio.com' -puts discoverer.endpoint # returns String: 'https://adactio.com/micropub' - -puts discoverer.uri # returns Addressable::URI -puts discoverer.response # returns HTTP::Response +puts client.response # returns HTTP::Response +puts client.endpoint # returns String: 'https://adactio.com/micropub' ``` ### Exception Handling There are several exceptions that may be raised by micropub-endpoint-ruby's underlying dependencies. These errors are raised as subclasses of `Micropub::Endpoint::Error` (which itself is a subclass of `StandardError`).