NITDgpOS / UIP

A library, to customize your desktop wallpapers.
https://nitdgpos.github.io/projects/UIP
GNU Affero General Public License v3.0
19 stars 45 forks source link

Use unsplash API #144

Closed abhay-raizada closed 7 years ago

abhay-raizada commented 7 years ago

we use their css classes for scraping it'd be awesome if we could use their API

akshatnitd commented 7 years ago

@abhsag24 Could we use https://source.unsplash.com/random to download random images from unsplash ? Or else, we can get a json from https://unsplash.it/list? The only problem with the latter is that it returns the same json everytime!

akshatnitd commented 7 years ago

@abhsag24 If we do this part first, then issue #165 can be solved at once!

abhay-raizada commented 7 years ago

@akshatnitd are u sure https://unsplash.it/list returns the same list? it would be updated in some time right?

abhay-raizada commented 7 years ago

https://source.unsplash.com/random is also good if u can extract multiple links

akshatnitd commented 7 years ago

@abhsag24 It returns the json the same list... And also https://unsplash.it isn't the official API for unsplash.

If we could extract image links for the same json randomly... How would that be? Because, extracting multiple links will itself be a huge task

abhay-raizada commented 7 years ago

@akshatnitd i think this should be a step in the direction of: https://github.com/NIT-dgp/UIP/issues/120 like we download 4-5 wallpapers every time a wallpepr is changed it gets deleted and a new one gets downloaded. random is good in that respect :D

akshatnitd commented 7 years ago

@abhsag24 We could also randomly select links from the json. In this way, the entire code structure would be uniform for reddit and unsplash. What say?

And lateron provide the flexibility of getting other attributes of the images like author name too! :D Helping us in #146 even :smile:

abhay-raizada commented 7 years ago

@akshatnitd but you said itsnt update right?

akshatnitd commented 7 years ago

@abhsag24 Yes, it already has around 1100 pics I guess... So, would it be the right way? Or else we need to work on extracting multiple links

abhay-raizada commented 7 years ago

@akshatnitd I guess our present structure is better than both the cases right? I think let's stick to that till we find a better Alternative, and you can just add tests for that :P

akshatnitd commented 7 years ago

@abhsag24 Yes, will do that :+1:

nkprince007 commented 7 years ago

I think it's already been implemented. 😉