Sha256: 58382c43cf29011a444f231180f70dc23767a79deb58ac0507f90bdf90b76b19
Contents?: true
Size: 686 Bytes
Versions: 3
Compression:
Stored size: 686 Bytes
Contents
module Cartola class Sponsor < RestModel properties :liga_editorial_id, :liga_id, :servico_cadun, :cor_nome_liga, :tipo_ranking, :url_link, :cards, :posicao_inicial, :autorizacao_promocao, :img_background, :img_marca_patrocinador, :nome def self.find(id) self.find_all.find{ |l| l.liga_editorial_id == id.to_s } end def self.find_all response = RestClient.get 'https://api.cartolafc.globo.com/patrocinadores' json = JSON.parse response.body from_source(json) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cartola-0.1.4 | lib/cartola/sponsor.rb |
cartola-0.1.3 | lib/cartola/sponsor.rb |
cartola-0.1.2 | lib/cartola/sponsor.rb |