{"id":15490748,"url":"https://github.com/blaugold/unsplash_client","last_synced_at":"2025-07-12T15:13:38.224Z","repository":{"id":39912535,"uuid":"234235187","full_name":"blaugold/unsplash_client","owner":"blaugold","description":"An unofficial, platform independent, client for the Unsplash API. Unsplash provides royalty-free images.","archived":false,"fork":false,"pushed_at":"2025-03-22T18:50:29.000Z","size":14481,"stargazers_count":25,"open_issues_count":6,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T19:28:30.619Z","etag":null,"topics":["api","client","dart","flutter","images","photos","pictures","royalty-free","unsplash"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/unsplash_client","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaugold.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"blaugold"}},"created_at":"2020-01-16T04:29:38.000Z","updated_at":"2025-03-22T18:50:32.000Z","dependencies_parsed_at":"2024-01-02T10:34:11.437Z","dependency_job_id":"dcde9628-9033-4961-9dc0-02b3d15e5521","html_url":"https://github.com/blaugold/unsplash_client","commit_stats":{"total_commits":96,"total_committers":1,"mean_commits":96.0,"dds":0.0,"last_synced_commit":"ff3891f0a9f61d40dbd279341cb973e7bcf86b16"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaugold%2Funsplash_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaugold%2Funsplash_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaugold%2Funsplash_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaugold%2Funsplash_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaugold","download_url":"https://codeload.github.com/blaugold/unsplash_client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306638,"owners_count":21408926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","client","dart","flutter","images","photos","pictures","royalty-free","unsplash"],"created_at":"2024-10-02T07:23:35.731Z","updated_at":"2025-04-22T19:11:04.857Z","avatar_url":"https://github.com/blaugold.png","language":"Dart","funding_links":["https://github.com/sponsors/blaugold"],"categories":[],"sub_categories":[],"readme":"[![pub.dev package page](https://badgen.net/pub/v/unsplash_client)](https://pub.dev/packages/unsplash_client)\n[![GitHub Actions CI](https://github.com/blaugold/unsplash_client/actions/workflows/ci.yml/badge.svg)](https://github.com/blaugold/unsplash_client/actions/workflows/ci.yml)\n[![GitHub Stars](https://badgen.net/github/stars/blaugold/unsplash_client)](https://github.com/blaugold/unsplash_client/stargazers)\n\n[Unsplash][unsplash] provides free high-resolution photos. This is a client for\ntheir [REST API][unsplash api].\n\n---\n\nIf you're looking for a **database solution**, check out\n[`cbl`](https://pub.dev/packages/cbl), another project of mine. It brings\nCouchbase Lite to **standalone Dart** and **Flutter**, with support for:\n\n- **Full-Text Search**,\n- **Expressive Queries**,\n- **Data Sync**,\n- **Change Notifications**\n\nand more.\n\n---\n\n# Limitations\n\nEndpoints that act on behalf of a user are not implemented, yet.If that is\nsomething you need, please comment on\n[this issue](https://github.com/blaugold/unsplash_client/issues/5).\n\n# Requirements\n\nYou need to [register as a developer][unsplash developer portal] and create an\nUnsplash app to access the API.\n\n# Getting started\n\n## Create an `UnsplashClient`\n\nUse the credentials for your app, obtained from the developer portal, to create\nan `UnsplashClient`:\n\n```dart\nfinal client = UnsplashClient(\n  settings: ClientSettings(credentials: AppCredentials(\n    accessKey: '...',\n    secretKey: '...',\n  )),\n);\n```\n\n\u003e :warning: When you are done using a client instance, make sure to call it's\n\u003e `close` method.\n\n## Get a random photo\n\n```dart\n// Call `goAndGet` to execute the [Request] returned from `random`\n// and throw an exception if the [Response] is not ok.\nfinal photos = await client.photos.random(count: 1).goAndGet();\n\n// The api returns a `Photo` which contains metadata about the photo and urls to download it.\nfinal photo = photos.first;\n```\n\n## Photo variants\n\nA `Photo` comes with a set of urls for variants of the photo of different sizes,\nsuch as `regular` and `thumb`:\n\n```dart\nfinal thumb = photo.urls.thumb;\n```\n\nIf the provided variants are not a good fit for your use, you can generate urls\nwhere you specify size, quality, fit and other parameters.\n\nCall the extension method `Uri.resizePhoto` on `photo.urls.raw` to generate an\n`Uri` for a custom variant:\n\n```dart\nfinal custom = photo.urls.raw.resizePhoto(width: 400, height: 400);\n```\n\n# Example\n\nThe [example](https://pub.dev/packages/unsplash_client/example) is a simple CLI\napp that fetches a few random photos.\n\n---\n\n**Gabriel Terwesten** \u0026bullet; **GitHub**\n**[@blaugold](https://github.com/blaugold)** \u0026bullet; **Twitter**\n**[@GTerwesten](https://twitter.com/GTerwesten)** \u0026bullet; **Medium**\n**[@gabriel.terwesten](https://medium.com/@gabriel.terwesten)**\n\n[unsplash api]: https://unsplash.com/documentation\n[unsplash]: https://unsplash.com/\n[unsplash developer portal]: https://unsplash.com/developers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaugold%2Funsplash_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaugold%2Funsplash_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaugold%2Funsplash_client/lists"}