KeenenCharles / AndroidUnplash

An unofficial Unsplash API library for Android
MIT License
85 stars 22 forks source link

How to get the "Attribute photographer and Unsplash" from the library #6

Closed kilicpl closed 6 years ago

kilicpl commented 6 years ago

Hi Mr Keenen, thx for the great library you created-- seriously appreciated. As a newbie on Android I dont know how to pull "Attribute photographer and Unsplash" section from your code after being able to get the random photo with getRandomPhoto() method.. Can you help me how to do it please? Thank you very much

(I also messaged the unsplash team but this s all they said " All photographer information is returned in the JSON response from Unsplash, under the "user" attribute. ")

KeenenCharles commented 6 years ago

Sure let me take a look at it and I'll get back to you

KeenenCharles commented 6 years ago

The photographer info is available in the user object of each photo. Just call photo.getUser() and you can get the user's name and a link to their portfolio to use for attribution.

kilicpl commented 6 years ago

thank you very much, perfect:) I ve no idea why Unsplash didn't create anything for Android but you helped a lot of people sir, appreciated

KeenenCharles commented 6 years ago

Thanks! Glad you found it useful

kilicpl commented 6 years ago

Hi again Mr Charles They said they want the bio info when clicking the link , not the portfelio page.. I tried many combinations with getBio() but couldn't manage to make it work.. If it's easy for you can you help me how to reach the bio page please? Thanks a lot

that's what they wrote to me: " I was not able to confirm that there's a link tracing back to the photographer's Unsplash profile (you currently link to the photo on Unsplash instead)."

On Tue, Aug 28, 2018 at 3:43 AM, Keenen Charles notifications@github.com wrote:

Closed #6 https://github.com/KeenenCharles/AndroidUnplash/issues/6.

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#event-1811886697, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W_C5EopSZXZwLCHzx3sav6jOpH2Qks5uVJIdgaJpZM4WLN_D .

KeenenCharles commented 6 years ago

To get the bio try photo.getUser().getBio()

kilicpl commented 6 years ago

Thank you but when I try to use it in hyperlink I can't do something such as

Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse(photo1.getUser().getBio()));

How can I do it as a last question if you mind sir

[ For the portfelio I was calling like this and it was working

Intent in = new Intent(Intent.ACTION_VIEW, Uri.parse(photo1.getLinks().getHtml()));

]

On Thu, Aug 30, 2018 at 5:38 AM, Keenen Charles notifications@github.com wrote:

To get the bio try photo.getUser().getBio()

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-417170557, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4Wy9OU-gXgcQX9etTZJjTGGH0wCzcks5uV1AmgaJpZM4WLN_D .

KeenenCharles commented 6 years ago

You need to use photo.getUser().getPortfolioUrl() to get a link to the user's profile

kilicpl commented 6 years ago

Thx a lot for your time& for the great library again sir Best rπŸ‘

On Thu, Aug 30, 2018, 21:03 Keenen Charles notifications@github.com wrote:

You need to use photo.getUser().getPortfolioUrl() to get a link to the user's profile

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-417431655, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W4HRQz607zDVFKuCuJ_aawY1t-0aks5uWDbrgaJpZM4WLN_D .

On Thu, Aug 30, 2018, 21:03 Keenen Charles notifications@github.com wrote:

You need to use photo.getUser().getPortfolioUrl() to get a link to the user's profile

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-417431655, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W4HRQz607zDVFKuCuJ_aawY1t-0aks5uWDbrgaJpZM4WLN_D .

kilicpl commented 5 years ago

Hi again Mr Charles Hope you are doing well.. Kindly can I ask you one last question regarding to your great library (I wanna mention your name in my app description because of great helps if you mind) , how can I hotlink an image to download do you think? I managed to download images using native IO methods to image gallery, but have no idea / nor could find/understand anything for what should I do for hotlinking? Do you mind maybe? Should I use "getPhotoDownloadLink" method in your library? Thanks a lot again K.

On Fri, Aug 31, 2018 at 12:12 AM K. Arslan mehakars@gmail.com wrote:

Thx a lot for your time& for the great library again sir Best rπŸ‘

On Thu, Aug 30, 2018, 21:03 Keenen Charles notifications@github.com wrote:

You need to use photo.getUser().getPortfolioUrl() to get a link to the user's profile

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-417431655, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W4HRQz607zDVFKuCuJ_aawY1t-0aks5uWDbrgaJpZM4WLN_D .

On Thu, Aug 30, 2018, 21:03 Keenen Charles notifications@github.com wrote:

You need to use photo.getUser().getPortfolioUrl() to get a link to the user's profile

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-417431655, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W4HRQz607zDVFKuCuJ_aawY1t-0aks5uWDbrgaJpZM4WLN_D .

KeenenCharles commented 5 years ago

Hey I think getPhotoDownloadLink should work if you just want to download the images to the phone

kilicpl commented 5 years ago

Thanks a lot. As you pointed there is no need to do anything extra for hotlinking. This is my app btw using your library. https://play.google.com/store/apps/details?id=com.kilic.tweetydiary Have a good day&thanks again sir

"There's no extra code you need to add to hotlink. If you use the images that are returned by the API, and don't duplicate them onto your own S3 bucket or hosting, then you'll be hotlinking."

On Thu, Oct 25, 2018 at 8:25 PM Keenen Charles notifications@github.com wrote:

Hey I think getPhotoDownloadLink should work if you just want to download the images to the phone

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-433137032, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W6Qdv0DDtS8DTJ7AqY5l58KKqGipks5uofQigaJpZM4WLN_D .

KeenenCharles commented 5 years ago

You're welcome. Your app looks great!

kilicpl commented 5 years ago

thanks a lot sir, even if you are saying it for kindness it s great to hear from an expert in your level.. appreciated

On Sun, Oct 28, 2018 at 8:16 PM Keenen Charles notifications@github.com wrote:

You're welcome. Your app looks great!

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-433728462, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4W5PWHmtLnkrzYozsoBCoHkEM5O90ks5upfSDgaJpZM4WLN_D .

KeenenCharles commented 5 years ago

Hey I included your app on the Readme as an app that uses the library

kilicpl commented 5 years ago

Thank you very much for all, appreciated one more time✌

On Thu, Nov 8, 2018, 08:05 Keenen Charles <notifications@github.com wrote:

Hey I included your app on the Readme as an app that uses the library

β€” You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KeenenCharles/AndroidUnplash/issues/6#issuecomment-436893993, or mute the thread https://github.com/notifications/unsubscribe-auth/AlS4Wwo1y2HZErkugMR99XFVn8NJNEh4ks5us9ergaJpZM4WLN_D .