WIP first steps
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
require "manifique/version"
|
||||
|
||||
module Manifique
|
||||
# Your code goes here...
|
||||
autoload :Agent, "manifique/agent"
|
||||
end
|
||||
|
||||
15
lib/manifique/agent.rb
Normal file
15
lib/manifique/agent.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require "manifique/web_client"
|
||||
|
||||
module Manifique
|
||||
class Agent
|
||||
def initialize(options)
|
||||
@options = options
|
||||
@url = options[:url]
|
||||
end
|
||||
|
||||
def fetch_metadata
|
||||
web_client = WebClient.new(url: @url)
|
||||
web_client.fetch_web_manifest
|
||||
end
|
||||
end
|
||||
end
|
||||
16
lib/manifique/web_client.rb
Normal file
16
lib/manifique/web_client.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
require 'faraday'
|
||||
require "nokogiri"
|
||||
require 'nitlink/response'
|
||||
|
||||
module Manifique
|
||||
class WebClient
|
||||
def initialize(options)
|
||||
@options = options
|
||||
@url = options[:url]
|
||||
end
|
||||
|
||||
def fetch_web_manifest
|
||||
@url
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user