Building Kele API Client | Retrieve Roadmap & Checkpoint Data

Stacie Taylor-Cima
Apr 29, 2018 · 3 min read
Photo by Leio McLaren on Unsplash

Ruby Modules & Classes:

module Roadmap
end
module Roadmap
def get_roadmap
end
def get_checkpoint
end
end

require ‘./lib/roadmap’
class Kele

include Roadmap

end

Retrieving Roadmaps

def get_roadmap(chain_id)
response = self.class.get(api_url(“/roadmaps/#{chain_id}”), headers: { “authorization” => @auth_token })
JSON.parse(response.body)

Retrieving Checkpoints

def get_checkpoint(checkpoint_id)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade