jsboulanger / streak-ruby

Ruby bindings for the Streak API (streak.com)
MIT License
10 stars 21 forks source link

How to iterate through stages? #7

Open cbou opened 8 years ago

cbou commented 8 years ago

There is currently an error in the Streak API when calling stages. It returns a JSON object and not an array.

https://www.streak.com/api/#stage

I can't find a way how to iterate through all stages.

lancecarlson commented 6 years ago

It's supposed to return an object as you can see in their example json output.

I would suggest converting everything into a hash and then using the appropriate hash iterators.

https://docs.ruby-lang.org/en/2.0.0/Hash.html#method-i-each