Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pexels

CI Status Coverage Status Hex Version

Elixir client for Pexels

Installation

The package can be installed by adding pexels to your list of dependencies in mix.exs:

def deps do
  [
    ...
    {:pexels, "~> 0.1.0"}
  ]
end

Usage

Retrieve your access token from https://www.pexels.com/api/

Provide the access token in your application configuration

config :pexels,
  token: "<TOKEN>"

Or it can be provided in the runtime like:

  iex> client = Pexels.client("<TOKEN>")
  iex> {:ok, %{liked: _liked, photo: photo}} = Pexels.photo(client, %{id: 156934})
  iex> photo.url
  "https://www.pexels.com/photo/white-and-black-cat-156934/"

Docs can be found at https://hexdocs.pm/pexels.

License

MIT

About

Elixir client for Pexels API

Topics

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages