{"id":26886833,"url":"https://github.com/yammine/ex_trello","last_synced_at":"2025-12-11T23:39:22.850Z","repository":{"id":62429509,"uuid":"63640295","full_name":"yammine/ex_trello","owner":"yammine","description":"An Elixir library for interfacing with the Trello API","archived":false,"fork":false,"pushed_at":"2017-10-12T23:40:27.000Z","size":178,"stargazers_count":43,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-28T07:41:05.954Z","etag":null,"topics":["elixir","trello","trello-api","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yammine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-18T22:04:23.000Z","updated_at":"2025-03-24T14:33:28.000Z","dependencies_parsed_at":"2022-11-01T20:07:16.647Z","dependency_job_id":null,"html_url":"https://github.com/yammine/ex_trello","commit_stats":null,"previous_names":["chrisyammine/ex_trello"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/yammine/ex_trello","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yammine%2Fex_trello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yammine%2Fex_trello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yammine%2Fex_trello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yammine%2Fex_trello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yammine","download_url":"https://codeload.github.com/yammine/ex_trello/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yammine%2Fex_trello/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265607250,"owners_count":23797106,"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":["elixir","trello","trello-api","wrapper"],"created_at":"2025-03-31T19:20:11.558Z","updated_at":"2025-12-11T23:39:17.802Z","avatar_url":"https://github.com/yammine.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExTrello [![Build Status](https://travis-ci.org/ChrisYammine/ex_trello.svg?branch=master)](https://travis-ci.org/ChrisYammine/ex_trello)[![Coverage Status](https://coveralls.io/repos/github/ChrisYammine/ex_trello/badge.svg)](https://coveralls.io/github/ChrisYammine/ex_trello)[![Hex.pm](https://img.shields.io/hexpm/v/ex_trello.svg?maxAge=2592000)](https://hex.pm/packages/ex_trello)[![Hex.pm Downloads](https://img.shields.io/hexpm/dt/ex_trello.svg?maxAge=2592000)](https://hex.pm/packages/ex_trello)[![Deps Status](https://beta.hexfaktor.org/badge/all/github/ChrisYammine/ex_trello.svg)](https://beta.hexfaktor.org/github/ChrisYammine/ex_trello)[![Inline docs](http://inch-ci.org/github/ChrisYammine/ex_trello.svg?branch=master\u0026style=shields)](http://inch-ci.org/github/ChrisYammine/ex_trello)\n\nA library for interfacing with the Trello API.\n\nHeavily influenced by https://github.com/parroty/extwitter with some stuff straight ripped out of it.\n\n## **Important! Migration from 0.x -\u003e 1.x**\nSince this change will break all existing projects using ExTrello upon upgrading this deserves a spot at the top :)\n\nAll calls to the Trello API will now be wrapped in a tuple with the first element either being `:ok`, `:error`, or `:connection_error`\nRegular errors will no longer raise exceptions as that is not idiomatic.\n\nHere's an example(just a little sample):\n```elixir\n# Old and bad\nboards = ExTrello.boards()\n# New and great\n{:ok, boards} = ExTrello.boards()\n\n# Old and bad, yuck!\ntry do\n  ExTrello.get(\"potato/2\")\nrescue\n  %ExTrello.Error{code: code, message: message} -\u003e IO.puts \"ERROR[#{code}] - #{message}\"\nend\n\n# New and fantastic\ncase ExTrello.get(\"potato/2\") do\n  {:ok, response} -\u003e response\n  {:error, %ExTrello.Error{code: code, message: message}} -\u003e IO.puts \"ERROR[#{code}] - #{message}\"\n  {:connection_error, %ExTrello.ConnectionError{reason: _, message: message}} -\u003e IO.puts \"#{message} We should retry.\"\nend\n```\n\n## Documentation\n- https://hexdocs.pm/ex_trello\n\n\n## Installation\n\n\n  1. Add `ex_trello` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [\n        ...,\n        {:ex_trello, \"~\u003e 1.1.0\"}\n      ]\n    end\n    ```\n\n  2. Ensure `ex_trello` is started before your application:\n\n    ```elixir\n    def application do\n      [applications: [:ex_trello]]\n    end\n    ```\n  3. Run `mix deps.get`\n\n## Usage\n1. Make sure you've completed [installation.](#installation)\n2. Use `ExTrello.configure` to setup Trello's OAuth authentication parameters.\n3. Call functions in the `ExTrello` module. (e.g. `ExTrello.boards()`)\n\n### Configuration\nThe default behavior is for ExTrello to use the application environment:\n\nIn `config/\u003cenv\u003e.exs` add:\n\n```elixir\n# I like using ENV vars to populate my configuration. But fill this out however you'd like :)\nconfig :ex_trello, :oauth, [\n  consumer_key:    System.get_env(\"TRELLO_CONSUMER_KEY\"),\n  consumer_secret: System.get_env(\"TRELLO_CONSUMER_SECRET\"),\n  token:           System.get_env(\"TRELLO_ACCESS_TOKEN\"),\n  token_secret:    System.get_env(\"TRELLO_ACCESS_SECRET\")\n]\n```\n\nYou can also manually configure it at runtime:\n```elixir\nExTrello.configure(consumer_key: \"...\", ...)\n```\n\nYou can also configure for the current process only:\n```elixir\ndefmodule TrelloServer do\n  use GenServer\n\n  def start_link(user) do\n    GenServer.start_link(__MODULE__, user, [])\n  end\n\n  def init(%User{token: token, token_secret: token_secret}) do\n    :ok = ExTrello.configure(\n      :process,\n      consumer_key: System.get_env(\"TRELLO_CONSUMER_KEY\"),\n      consumer_secret: System.get_env(\"TRELLO_CONSUMER_SECRET\"),\n      token: token,\n      token_secret: token_secret\n    )\n    {:ok, %{boards: []}}\n  end\n\n  # Rest of your code...\nend\n```\n\n## Samples\n\n#### Authorize your application\n\nExample for authorization. This is a naive solution that only works for demonstration.\nTODO: Set up example application.\n```elixir\n# First we have to get a request token from Trello.\n{:ok, token} = ExTrello.request_token(\"http://localhost:4000/auth/trello/callback/1234\")\n# We have to store this token because we need the `oauth_token_secret` after the callback to obtain our access token \u0026 secret.\n# e.g. TokenAgent.store(\"1234\", token.oauth_token_secret)\n\n# Generate the url for authorization\n{:ok, auth_url} = ExTrello.authorize_url(token.oauth_token, %{return_url: \"http://localhost:4000/auth/trello/callback/1234\", scope: \"read,write\", expiration: \"never\", name: \"Your Application Name here\"})\n\n# Copy the url and visit it using your browser.\nIO.puts auth_url\n```\nAfter signing in/authorizing the application you will be redirected to the callback URL you specified in the Request token \u0026 authorize URL.\n\nExample:\n```\nhttp://localhost:4000/auth/trello/callback/1234?oauth_token=**copy_this**\u0026oauth_verifier=**copy_this**\n```\n\nCopy the `oauth_token` and `oauth_verifier` above:\n```elixir\noauth_token = \"copied_oauth_token\"\noauth_verifier = \"copied_oauth_verifier\"\noauth_token_secret = retrieve_oauth_token_secret_from_before() # e.g. TokenAgent.retrieve(\"1234\") from hypothetical TokenAgent\n\n{:ok, access_token} = ExTrello.access_token(oauth_verifier, oauth_token, oauth_token_secret)\n\n# Let's configure ExTrello with our newly obtained access token\nExTrello.configure(\n  consumer_key: System.get_env(\"TRELLO_CONSUMER_KEY\"),\n  consumer_secret: System.get_env(\"TRELLO_CONSUMER_SECRET\"),\n  token: access_token.oauth_token,\n  token_secret: access_token.oauth_token_secret\n)\n\n# Testing our token!\n{:ok, member} = ExTrello.member() # Fetches the authenticated member record from Trello\n```\n\n## TODO:\n- [ ] Add models for ~~label~~, ~~checklist~~, ~~member~~, notification, ~~organization~~, session, token, ~~action~~\n- [ ] Pagination\n- [ ] Code Cleanup! (Perhaps remove `defapicall` macro and use the `with` keyword instead? Have to evaluate.)\n- [ ] Example Application\n- [ ] Investigate handling storage of request_token.oauth_token_secret instead of leaving that up to the dev.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyammine%2Fex_trello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyammine%2Fex_trello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyammine%2Fex_trello/lists"}