Class: IndieWeb::Endpoints::Parser Private

Inherits:
Object
  • Object
show all
Defined in:
lib/indieweb/endpoints/parser.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Parser

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Parser.

Parameters:

  • response (HTTP::Response)


8
9
10
# File 'lib/indieweb/endpoints/parser.rb', line 8

def initialize(response)
  @response = response
end

Instance Method Details

#resultsHash{Symbol => String, Array<String>, nil}

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Hash{Symbol => String, Array<String>, nil})


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/indieweb/endpoints/parser.rb', line 13

def results
  {
    authorization_endpoint: result_for(:authorization_endpoint),
    "indieauth-metadata": result_for(:"indieauth-metadata"),
    micropub: result_for(:micropub),
    microsub: result_for(:microsub),
    redirect_uri: results_for(:redirect_uri),
    token_endpoint: result_for(:token_endpoint),
    webmention: result_for(:webmention, %w[link a])
  }
end