alaingilbert / Turntable-API

Allows you to create bots for turntable.fm
http://alaingilbert.github.com/Turntable-API/
MIT License
317 stars 98 forks source link

Update getProfile() API method call #167

Closed sharedferret closed 11 years ago

sharedferret commented 11 years ago

Updates the bot.getProfile() command to call the "user.get_profile_info" API instead of "user.get_profile". This fixes sharedferret/Sparkle-Turntable-Bot#100 - the user.get_profile API call (as currently written in ttapi) will always return the bot's profile, whereas user.get_profile_info will return the input user's profile.

alaingilbert commented 11 years ago

Nice work :) It's published on npm.

ehedaya commented 11 years ago

Yes! This was driving me crazy. Thanks guys.

sharedferret commented 11 years ago

This is a pretty old pull request. :)

get_profile_info is meant to retrieve any user's profile. It doesn't autofill the bot's userid if no userid is provided in the call (as far as I know), so I believe that's the change that's needed. Otherwise, it does work as designed (as it's been used successfully in https://github.com/sharedferret/Sparkle-Turntable-Bot/blob/master/commands/userinfo.js for months).

technobly commented 11 years ago

I just tested it as user.get_profile_info and it wasn't working when you did not specify the userid, however user.get_profile does, and both cases work fine when you specify the userid. It's all merged and compiled.

technobly commented 11 years ago

@sharedferret I'm glad you fully tested it :) I was looking for these comments and didn't find them. My bad ^_^