Sha256: 42a2a3390f67f1f2b3e9c328864d66a21253a797b0f11ac15f19f1663076979d

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

# frozen_string_literal: true

require 'json'

module SoccersApi
  class Country
    class << self
      require 'rest-client'
      COUNTRY = 'countries'.freeze

      def all
        countries = {}
        (2).times do |no|
          countries << SoccersApi.api_url(api_for: COUNTRY, type: "list")
        end
        countries
      end

      def by_id(id)
        SoccersApi.api_url(
          api_for: COUNTRY,
          type: "info",
          id_type: 'id',
          id: id
        )
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
soccers_api-1.0.6 lib/soccers_api/country.rb