clementine-player / Clementine

:tangerine: Clementine Music Player
https://www.clementine-player.org/
GNU General Public License v3.0
3.77k stars 677 forks source link

Twitter latest statuses on Artist info pane #4658

Open heduenas opened 9 years ago

heduenas commented 9 years ago

I think I would be very cool if you could see the artist's latests posts on facebook. I see that Twitter handles can be easily retrieved from echonest: http://developer.echonest.com/docs/v4/artist.html#twitter

I think I could work myself on such feature. What do you guys think?

ArnaudBienner commented 9 years ago

Why not adding a link to the artist's twitter account next to "Biographies" and "Upcoming concerts" as Echonest can send us this information.

Not sure Echonest can also return the latest statuses. In that case, I'm not sure it's worth to try to get them, but maybe Twitter has an API very easy to use. If so (i.e. this will not add too much overbloat to our code) why not.

Maybe you can start with just getting the link to the twitter account, if any, and displaying it at the end of artist information panel?

amuttsch commented 9 years ago

Looks quite easy with twitters REST api: https://dev.twitter.com/rest/reference/get/statuses/user_timeline

I think it would be a nice addition.

heduenas commented 9 years ago

Sounds like adding a link to twitter account would be a good start. And we can also add a link to the artist's official website: http://developer.echonest.com/docs/v4/artist.html#urls. I'll send a PR soon.

@Asfaloth, there is a downside in using that API: users will have to sign in to a Clementine twitter application. This is because of the 300 request limit listed in the link you provided. Do you think that could be a problem? can you think of an easier way to get that data?

amuttsch commented 9 years ago

It is possible to use apis with an application authentification, so the user doesn't have to sign on to access the data. It is limited to 300 requests / 15min though. Maybe with an optional login to bypass this limit or with an opt-in option to activate twitter usage?

Am 23.12.2014 um 19:11 schrieb Hugo Eduardo Dueñas:

Sounds like adding a link to twitter account would be a good start. And we can also add a link to the artist's official website: http://developer.echonest.com/docs/v4/artist.html#urls. I'll send a PR soon.

@Asfaloth https://github.com/Asfaloth, there is a downside in using that API: users will have to sign in to a Clementine twitter application. This is because of the 300 request limit listed in the link you provided. Do you think that could be a problem? can you think of an easier way to get that data?

— Reply to this email directly or view it on GitHub https://github.com/clementine-player/Clementine/issues/4658#issuecomment-67981051.

ArnaudBienner commented 9 years ago

hmmm... the limit sounds pretty low, but having to log just for this sounds overkill IMHO. Is it really 300 req / 15 min for an application? No way to have the limit by IP address? Maybe we can ask Twitter if they can tweak the limit for our application key (either to increase it or to make it per IP).

heduenas commented 9 years ago

I just did a broad search over the internet and it looks like in API v1 they had unauthenticated IP rate limiting, but they don't have that anymore in v1.1 and v1 is unsupported now. I will still ask if they can do something for Clementine.

heduenas commented 9 years ago

I just sent a PR with only the link to the artist's twitter page. Please try to take a look at it.

Do you think it'd also be a good idea to add a link to the artist's official website?

I asked about the IP rate limiting in Twitter's dev formus but haven't gotten an answer yet (I assume it's because of Christmas, hopefully I will get an answer soon.) Here's a link to my post: https://twittercommunity.com/t/unauthenticated-rest-api-requests/29613