Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.rooms.all doesn't seem to include all rooms #28

Open
kaspergrubbe opened this issue Apr 10, 2013 · 1 comment
Open

client.rooms.all doesn't seem to include all rooms #28

kaspergrubbe opened this issue Apr 10, 2013 · 1 comment
Assignees

Comments

@kaspergrubbe
Copy link

I am digging through your code, and want to find the ID for the room I am looking for. I can see that the default value of the limit is set to 20. However, when I set a value, it doesn't seem to recognise it.

Turntabler.run do
  client = Turntabler::Client.new(EMAIL, PASSWORD)
  client.rooms.all(:limit => 100).each_with_index do |room,i|
    puts "##{i}. #{room.id} #{room.name}"
  end
end

#0. 4e091b2214169c018f008ea5 DJ Wooooo's House/Dance/Electro
#1. 4dff1eac14169c565800892e Indie While You Work
#2. 4df8319e9021683a2f000a55 Ambient Chillout & Trip Hop
#3. 4e0b631414169c68880143a3 mashup.fm
#4. 4e726c6467db461e659e5503 Chill Or Be Chilled
#5. 4dd926e1e8a6c4198c000803 Dubstep
#6. 4ded3b7e99968e1d29000047 Coding Soundtrack Lounge
#7. 4e4986bb14169c5f241318a6 ThePhish
#8. 4f431b0ca3f75162b9005115 Indie Discotheque
#9. 4e16479214169c128d049d90 Trance Out!
#10. 50db37884fb0bb263f590afd #AnonFM
#11. 4e29cefc14169c27bf255fad Ska Music
#12. 4e9d6e14a3f75112a202cb1d Indie/Classic Alternative 1 & Done
#13. 4ed59c3e14169c686e41eb9a Alt Nation
#14. 50f47544eb35c17588a79180 I ♥ the 80's and 90's
#15. 4f5f162268f554664cc5b2c4 Hot Hitz
#16. 510f5a8bdf5bcf339c0eeea1 LaLa Land
#17. 507cce14eb35c17709000160 Liberty Lunch [Dubstep/EDM/Chill/Trap/Hip Hop/Indie]
#18. 5033a58faaa5cd29b200038b YouTunes
#19. 4e04350514169c1136006d6b I ♥ The 80's

Is that a bug, or am I using your code wrong?

@obrie
Copy link
Owner

obrie commented Apr 10, 2013

Hey @kaspergrubbe - I just played around with their API and it looks like 20 is the maximum value you can set for :limit -- if you set it to anything beyond that, it'll just continue to return 20. I'll have to update the docs or provide a smart wrapper on top of their API to make multiple calls under the hood to support higher limits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants