{"id":13509639,"url":"https://github.com/traitify/traitify_elixir","last_synced_at":"2026-03-19T17:16:49.374Z","repository":{"id":22487505,"uuid":"25826770","full_name":"traitify/traitify_elixir","owner":"traitify","description":"An Elixir client library for the Traitify API","archived":false,"fork":false,"pushed_at":"2014-10-27T16:49:58.000Z","size":148,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-01-18T00:49:00.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traitify.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":"2014-10-27T15:53:54.000Z","updated_at":"2022-08-26T08:25:05.000Z","dependencies_parsed_at":"2022-08-20T17:40:14.539Z","dependency_job_id":null,"html_url":"https://github.com/traitify/traitify_elixir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify_elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify_elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify_elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify_elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traitify","download_url":"https://codeload.github.com/traitify/traitify_elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243018689,"owners_count":20222700,"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":[],"created_at":"2024-08-01T02:01:10.809Z","updated_at":"2026-03-19T17:16:44.345Z","avatar_url":"https://github.com/traitify.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"# Traitify Elixir\n\nAn Elixir client library for the Traitify Developer's API\n\n## Using\n\nIt is simple to add to any project. If you are using the hex package manager, just add the following to your mix file:\n\n``` elixir\ndef deps do\n  [ { :traitify_elixir, '~\u003e 0.1.1' } ]\nend\n```\n\nIf you aren't using hex, add the a reference to the github repo.\n\n``` elixir\ndef deps do\n  [ { :traitify_elixir, github: \"traitify/traitify_elixir\" } ]\nend\n```\n\nThen run `mix deps.get` in the shell to fetch and compile the dependencies.\n\n## Configuration\n\nNext, set the environment variables for the API host and your secret key. You can obtain a secret key from\nthe [developer portal](http://developer.traitify.com). Once you register on the site, you will be provided\na key as well as information on the API host.\n\n``` bash\n\n$ export TRAITIFY_API_HOST=https://api-sandbox.traitify.com\n$ export TRAITIFY_API_KEY=\u003cyour_unique_secret_key\u003e\n\n```\n## Example Usage\n\n### Decks\n\nRetrieving a list of available decks is simple. Just call the all function on the Client module and pass it `:decks`.\n\n``` shell\n$ iex -S mix\niex(1)\u003e decks = Traitify.Client.all(:decks)\n```\n\nThe all function returns the JSON response body from the Traitify API.\n\n``` shell\niex(2)\u003e deck = List.first(decks)\niex(3)\u003e deck[\"id\"]\n\"career-deck\"\n```\n\n### Assessments\n\nOnce you have a deck id, you can then create an assessment.\n\n``` shell\niex(4)\u003e assessment = Traitify.Client.create(:assessments, %{deck_id: deck[\"id\"]})\n%{\"completed_at\" =\u003e nil, \"created_at\" =\u003e 1414427522010,\n  \"deck_id\" =\u003e \"career-deck\", \"id\" =\u003e \"3668590b-f32f-4db0-94e3-d35703b28820\",\n  \"tags\" =\u003e nil}\n```\n\n### Slides\n\nNow that you have an assessment, it's time to get a list of the slides for that assessment\n\n``` shell\niex(5)\u003e slides = Traitify.Client.all(:slides, assessment_id: assessment[\"id\"]})\n```\n\nFor each slide you can send the user's response or you can send a bulk set of responses. Here is an example of\nupdating for a single slide:\n\n``` shell\niex(6)\u003e Client.update(:slides, %{response: \u003cuser's answer here\u003e, time_taken: 2},\n                                 assessment_id: assessment[\"id\"],\n                                 slide_id: \u003cslide id here\u003e)\n```\n\n### Results\n\nFinally you can retrieve the personality types/traits results for a completed assessment. If the assessment is not complete, you will receive an 'Assessment Not Found' message.\n\n``` shell\niex(7)\u003e personality_types = Traitify.Client.all(:personality_types, [assessment_id: assessment[\"id\"]])\niex(8)\u003e personality_traits = Traitify.Client.all(:personality_traits, [assessment_id: assessment[\"id\"]])\n```\n\n\n### More Examples\n\nYou can check out the Elixir [example](http://github.com/traitify/example_elixir) application to get ideas for your own implementation. If you have questions, please contact [support@traitify.com](mailto:support@traitify.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraitify%2Ftraitify_elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraitify%2Ftraitify_elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraitify%2Ftraitify_elixir/lists"}