Class: Kiva::Release

Inherits:
Object
  • Object
show all
Defined in:
lib/kiva.rb

Overview

Release information concerning the webapi. This is not the release number of the ruby library!

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date.



527
528
529
# File 'lib/kiva.rb', line 527

def date
  @date
end

#idObject

Returns the value of attribute id.



528
529
530
# File 'lib/kiva.rb', line 528

def id
  @id
end

Class Method Details

.loadObject

Returns release information

Returns

an array of +Partner+ instances

Corresponds

developers.wiki.kiva.org/KivaAPI#releases/api/current



541
542
543
544
545
# File 'lib/kiva.rb', line 541

def load
  url = "http://api.kivaws.org/v1/releases/api/current.json"
  raw = JSON.parse(Kiva.execute(url))
  Kiva._fill(self.new, raw["release"])
end