ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - waynehoover/unsplash-elixir: Unsplash API client for Elixir
Unsplash API client for Elixir. Contribute to waynehoover/unsplash-elixir development by creating an account on GitHub.
Visit Site

GitHub - waynehoover/unsplash-elixir: Unsplash API client for Elixir

GitHub - waynehoover/unsplash-elixir: Unsplash API client for Elixir

Unsplash Build Status Hex pm Codacy Badge

Unsplash API wrapper in Elixir.

Exmaple Usage

  • Unsplash.Photos.search(query: "Austin", catgeroy: "2") |> Enum.take(1)
  • Unsplash.Collections.all |> Enum.take(1)
  • All API endpoints are supported. See the documentation for full list.

Each API call that is paginated returns a stream. You can resolve the stream by calling any Enum function, this way you don't have to think about pagination. For example to get one random photo: Unsplash.Photos.random |> Enum.take(1) or to get 100 random photos: Unsplash.Photos.random |> Enum.take(100).

Configuration

See the secrets.exs file on what configuration variables need to be configured.

Authorization

Get an auth code by directing a user to the url generated by this command (replace the scope with what you would like): Unsplash.OAuth.authorize_url! scope: "public read_user write_user read_photos write_photos write_likes read_collections write_collections"

After the user grants access, she will be redirected back to your redirect_uri whith a code query paramater, which you then set like this: Unsplash.OAuth.authorize!(code: auth_code_from_the_callback)

Now every API call will use the access_code gerenated in the above step automatically.

Installation

  1. Add unsplash to your list of dependencies in mix.exs:
    def deps do
      [{:unsplash, "~> 1.1.0"}]
    end
  1. Ensure unsplash is started before your application:
    def application do
      [applications: [:unsplash]]
    end

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory