{"id":28541446,"url":"https://github.com/zestia/ember-twitter-entities","last_synced_at":"2025-08-08T06:11:31.905Z","repository":{"id":29864739,"uuid":"33409830","full_name":"zestia/ember-twitter-entities","owner":"zestia","description":":bird: Renders entities from Twitter's API as Ember components","archived":false,"fork":false,"pushed_at":"2025-07-08T08:49:52.000Z","size":5676,"stargazers_count":6,"open_issues_count":8,"forks_count":1,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-07-08T09:49:55.915Z","etag":null,"topics":["ember","tweets","twitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/zestia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-04-04T15:19:10.000Z","updated_at":"2025-07-08T08:49:56.000Z","dependencies_parsed_at":"2023-02-18T03:45:52.108Z","dependency_job_id":"98d03f56-d38d-430d-96d0-0a2f3955bac5","html_url":"https://github.com/zestia/ember-twitter-entities","commit_stats":null,"previous_names":["amk221/ember-twitter-entities"],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/zestia/ember-twitter-entities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-twitter-entities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-twitter-entities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-twitter-entities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-twitter-entities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zestia","download_url":"https://codeload.github.com/zestia/ember-twitter-entities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zestia%2Fember-twitter-entities/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269373117,"owners_count":24406323,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ember","tweets","twitter"],"created_at":"2025-06-09T20:08:32.869Z","updated_at":"2025-08-08T06:11:31.891Z","avatar_url":"https://github.com/zestia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @zestia/ember-twitter-entities\n\n\u003c!-- [![Ember Observer][ember-observer-badge]][ember-observer-url] --\u003e\n\u003c!-- [![GitHub Actions][github-actions-badge]][github-actions-url] --\u003e\n\n[npm-badge]: https://img.shields.io/npm/v/@zestia/ember-twitter-entities.svg\n[npm-badge-url]: https://www.npmjs.com/package/@zestia/ember-twitter-entities\n[github-actions-badge]: https://github.com/zestia/ember-twitter-entities/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/zestia/ember-twitter-entities/actions\n[ember-observer-badge]: https://emberobserver.com/badges/-zestia-ember-twitter-entities.svg\n[ember-observer-url]: https://emberobserver.com/addons/@zestia/ember-twitter-entities\n\nThis Ember CLI addon parses [Twitter Entities](https://dev.twitter.com/overview/api/entities-in-twitter-objects) from the Twitter API and renders a them as Ember Components.\n\n## Important\n\n⚠️ This repo is no longer actively maintained\n\n## Installation\n\n```\nember install @zestia/ember-twitter-entities\n```\n\nAdd the following to `~/.npmrc` to pull @zestia scoped packages from Github instead of NPM.\n\n```\n@zestia:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=\u003cYOUR_GH_TOKEN\u003e\n```\n\n## Demo\n\nhttps://zestia.github.io/ember-twitter-entities\n\n## Notes\n\n- Supported entity types are: `hashtags`, `media`, `urls`, `user_mentions`, `symbols`. Basically any entity which has an `indices` property and occurs in the tweet text. So this excludes `polls`.\n\n## Example\n\nGiven the following:\n\n```javascript\nentities: {\n  urls: [{\n    url: 'https://t.co/emberjs',\n    display_url: 'emberjs.com',\n    indices: [6, 17]\n  }],\n  hashtags: [],\n  user_mentions: [],\n  media: [],\n  symbols: []\n}\n```\n\n```handlebars\n\u003cTwitterEntities @text='visit emberjs.com' @entities={{this.entities}} /\u003e\n```\n\nThe addon will render:\n\n```html\nvisit \u003ca href=\"http://t.co/emberjs\"\u003eemberjs.com\u003c/a\u003e\n```\n\n...using the built in components for each entity type.\n\n## `TwitterEntities`\n\n### Arguments\n\n#### `@text`\n\nRequired. The text to parse to find entities within.\n\n#### `@entities`\n\nRequired. An object of entities that includes information about where each entity appears within the `@text`.\n\n#### `@Url`\n\nOptional. The component that will be used to display a URL entity.\n\n#### `@Hashtag`\n\nOptional. The component that will be used to display a hashtag entity.\n\n#### `@UserMention`\n\nOptional. The component that will be used to display a user mention entity.\n\n#### `@Media`\n\nOptional. The component that will be used to display a media entity.\n\n#### `@Symbol`\n\nOptional. The component that will be used to display a symbol entity.\n\n### API\n\n#### `entity`\n\nEach component receives the entity so it can be displayed however you wish.\n\n## HTML in tweets\n\nIf the tweet you are rendering is already encoded, flag it as html-safe to prevent double encoding.\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample\u003c/summary\u003e\n\n```javascript\nconst tweet = 'This tweet contains \u0026lt;br\u0026gt; HTML';\nthis.text = htmlSafe(tweet);\n```\n\n```handlebars\n\u003cTwitterEntities @text={{this.text}} /\u003e\n```\n\n```\nOutputs:    This tweet contains \u003cbr\u003e HTML\nInstead of: This tweet contains \u0026lt;br\u0026gt; HTML\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzestia%2Fember-twitter-entities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzestia%2Fember-twitter-entities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzestia%2Fember-twitter-entities/lists"}