Closed stact closed 9 months ago
Related to the guidelines about tracking downloads it must call a specific endpoint.
https://help.unsplash.com/en/articles/2511245-unsplash-api-guidelines
What we have:
Related to the guideline:
{ "id": "LBI7cgq3pbM", "width": 5245, "height": 3497, "color": "#60544D", "urls": { ... }, "user": { ... }, "links": { "self": "https://api.unsplash.com/photos/LBI7cgq3pbM", "html": "https://unsplash.com/photos/LBI7cgq3pbM", "download": "https://unsplash.com/photos/LBI7cgq3pbM/download", // don't use this property "download_location": "https://api.unsplash.com/photos/LBI7cgq3pbM/download?ixid=MnwxMTc4ODl8MHwxfHNlYXJjaHwxfHxwdXBweXxlbnwwfHx8fDE2MTc3NTA2MTM" // use this one ;) } }
Maybe instead of String id, we need to have String download_location
String id
String download_location
Temporary fix:
Request<TrackPhotoDownload> download(String downloadLocation) { final url = Uri.parse(downloadLocation); return Request( client: _client, httpRequest: http.Request('GET', url), isPublicAction: true, bodyDeserializer: (dynamic json) => TrackPhotoDownload.fromJson(json as Map<String, dynamic>), ); }
Thanks for reporting this!
Version 2.2.0 with support for passing location to Photos.download has been released.
2.2.0
location
Photos.download
Related to the guidelines about tracking downloads it must call a specific endpoint.
https://help.unsplash.com/en/articles/2511245-unsplash-api-guidelines
What we have:
Related to the guideline:
Maybe instead of
String id
, we need to haveString download_location
Temporary fix: