{"id":20733605,"url":"https://github.com/traitify/traitify-js","last_synced_at":"2025-05-11T01:31:31.937Z","repository":{"id":16742670,"uuid":"19500150","full_name":"traitify/traitify-js","owner":"traitify","description":null,"archived":true,"fork":false,"pushed_at":"2019-11-08T14:33:46.000Z","size":7293,"stargazers_count":1,"open_issues_count":0,"forks_count":4,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-02-24T19:37:06.813Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-06T15:42:05.000Z","updated_at":"2025-02-03T18:39:37.000Z","dependencies_parsed_at":"2022-09-24T09:40:44.486Z","dependency_job_id":null,"html_url":"https://github.com/traitify/traitify-js","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-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traitify%2Ftraitify-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traitify","download_url":"https://codeload.github.com/traitify/traitify-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253504526,"owners_count":21918825,"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-11-17T05:26:10.814Z","updated_at":"2025-05-11T01:31:30.800Z","avatar_url":"https://github.com/traitify.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THIS LIBRARY HAS BEEN DEPRECATED, PLEASE USE https://github.com/traitify/traitify-widgets\n\nTraitify.js\n===============\n\nThis package does not require jQuery, as it is a standalone encapsulated library. It does however require a browser with the ability to make cors requests (currently only supports ie10 and up, chrome, safari, and firefox).\n\n### Assessment id and public key required!\nFor instructions on obtaining an assessment id and a public key visit:\n[https://developer.traitify.com](https://developer.traitify.com)\n\n### Using The Latest and Greatest(Edge)!\nFor directions on using the latest traitify js scroll to the bottom\n\n### Using Traitify JS UI:\nInclude the Traitify.js library:\n\n```xhtml\n\u003cscript src=\"https://s3.amazonaws.com/traitify-cdn/lib/v1.js\"\u003e\u003c/script\u003e\n```\n\nYou can initialize using an id or a class on any div tag:\n```HTML\n\u003cdiv class=\"traitify-widget\"\u003e\u003c/div\u003e \u003c!-- Example Target Div for the widget --\u003e\n```\n\nThe following javascript will initialize with the above html:\n```HTML\n\u003cscript\u003e\n    Traitify.setPublicKey(\"8asdf8sda-f98as-df8ads-fadsf\"); // Example Public Key\n    Traitify.setHost(\"api-sandbox.traitify.com\"); // Example host url (Defaults to api.traitify.com)\n    Traitify.setVersion(\"v1\"); // Example Version\n    var assessmentId = \"34aeraw23-3a43a32-234a34as42\"; // Example Assessment id\n\n    traitify = Traitify.ui.load(assessmentId, \".traitify-widget\"); // Example selector for widget target\n\u003c/script\u003e\n```\n\nWhen you initialize the widget we return our widget builder to you (This is the same builder we use to construct the widget).\n```HTML\n\u003cscript\u003e\n\n    traitify = Traitify.ui.load(assessmentId, \".traitify-widget\")\n\n    // This callback gives you the ability to trigger an event when\n    // the widget has finished loading\n    traitify.onInitialize(function(){\n        console.log(traitify.data);\n        console.log(\"Initialized\");\n    })\n\n    // This callback gives you the ability to trigger an event when\n    // the user has finished playing the slide deck\n    traitify.onFinished(function(){\n        console.log(traitify.data);\n        console.log(\"Finished!\");\n    })\n\u003c/script\u003e\n```\n===============\n### Using Traitify JS API CLIENT:\n```xhtml\n\u003cscript src=\"https://s3.amazonaws.com/traitify-cdn/lib/v1.js\"\u003e\u003c/script\u003e\n```\n\n##### Get Decks\n```JavaScript\nTraitify.getDecks(\"assessment id\", function(data){\n  console.log(data)\n})\n```\n\n##### Get Slides\n```JavaScript\nTraitify.getSlides(\"assessment id\", function(data){\n  console.log(data)\n})\n```\n\n##### Get Personality Traits\n```JavaScript\nTraitify.addSlide(\"assessment id\", function(data){\n  console.log(data)\n})\n```\n\n##### Get Personality Traits\n```JavaScript\nTraitify.getPersonalityTraits(\"assessment id\", function(data){\n  console.log(data)\n})\n```\n\n##### Get Careers\n```JavaScript\nTraitify.getCareers(\"assessment id\", function(data){\n  console.log(data)\n})\n```\n### Using Edge\nWarning, things may break if you use edge, it is not stable, and is not intended to be. If you're looking for a stable deployment then use the v1 bundle from the above cdn.\n```xhtml\n\u003cscript src=\"https://cdn.traitify.com/lib/edge.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    Traitify.setPublicKey(\"8asdf8sda-f98as-df8ads-fadsf\"); // Example Public Key\n    Traitify.setHost(\"api-sandbox.traitify.com\"); // Example host url (Defaults to api.traitify.com)\n    Traitify.setVersion(\"v1\"); // Example Version\n    var assessmentId = \"34aeraw23-3a43a32-234a34as42\"; // Example Assessment id\n\n    traitify = Traitify.ui.load(assessmentId, \".traitify-widget\"); // Example selector for widget target\n\u003c/script\u003e\n```\n\n### Contributing\n#### Building, Testing and Bundling:\n```Shell\n$ cake watch\n$ cake build\n$ cake bundle\n$ cake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraitify%2Ftraitify-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraitify%2Ftraitify-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraitify%2Ftraitify-js/lists"}