Refactor app in to its own slice

This commit is contained in:
2024-02-17 10:40:36 +11:00
parent b809b132d3
commit a6078f882e
161 changed files with 16176 additions and 193 deletions

View File

@@ -0,0 +1,30 @@
require "httparty"
module Main
module Queries
module Blogroll
class Index
include Deps["settings"]
def call
resp = HTTParty.get("https://#{settings.rss_url}/api/greader.php/reader/api/0/subscription/list?output=json", {
headers: {
"Authorization" => "GoogleLogin auth=#{auth_token}"
}
})
resp.body
end
private
def auth_token
auth_url = "https://#{settings.rss_url}/api/greader.php/accounts/ClientLogin?Email=#{settings.rss_username}&Passwd=#{settings.rss_password}"
resp = HTTParty.get(auth_url)
auth = resp.match(/SID=(.*)/)
auth[1].strip
end
end
end
end
end