require 'json'
require 'faraday'

module Fappu
  class Connection

    attr_accessor :base_url, :title, :url, :documentation, :response, :body

    def initialize(settings={})
      @base_url = settings[:base_url] || "https://api.fakku.net/index"
      connection = Faraday.new(url: @base_url)

      @response = connection.get
      @body = JSON.parse @response.body
      @title = @response['title']
    end

    def base_url
      @base_url || "https://api.fakku.net"
    end

  end
end

require 'open-uri'
require 'json'

module Fappu
  class Connection

    attr_accessor :base_url, :title, :url, :documentation, :response, :body

    def initialize(settings={})
      @base_url = settings[:base_url] || "https://api.fakku.net/index"

      # @response =  RestClient.get @base_url
      @response = URI.parse(@base_url).read

      @body = JSON.parse @response
      @title = @response['title']
    end

    def base_url
      @base_url || "https://api.fakku.net"
    end

  end
end

Use core uri lib. desu.
Use core uri lib. desu.
