{"id":17105647,"url":"https://github.com/yarnaimo/twimo-v2","last_synced_at":"2025-09-13T22:43:42.692Z","repository":{"id":51093372,"uuid":"320271694","full_name":"yarnaimo/twimo-v2","owner":"yarnaimo","description":"🕊 Twitter API v2 client for TypeScript auto-generated from official OpenAPI specification","archived":false,"fork":false,"pushed_at":"2021-12-04T11:49:40.000Z","size":776,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-27T20:56:08.085Z","etag":null,"topics":["nodejs","twitter","twitter-api-v2","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/yarnaimo.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":"2020-12-10T12:52:43.000Z","updated_at":"2023-03-21T02:22:08.000Z","dependencies_parsed_at":"2022-09-01T04:41:36.074Z","dependency_job_id":null,"html_url":"https://github.com/yarnaimo/twimo-v2","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/yarnaimo/twimo-v2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarnaimo%2Ftwimo-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarnaimo%2Ftwimo-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarnaimo%2Ftwimo-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarnaimo%2Ftwimo-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yarnaimo","download_url":"https://codeload.github.com/yarnaimo/twimo-v2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yarnaimo%2Ftwimo-v2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275038262,"owners_count":25394640,"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-09-13T02:00:10.085Z","response_time":70,"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":["nodejs","twitter","twitter-api-v2","typescript"],"created_at":"2024-10-14T15:42:37.031Z","updated_at":"2025-09-13T22:43:42.645Z","avatar_url":"https://github.com/yarnaimo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twimo-v2\n\nTwitter API v2 client for TypeScript auto-generated from official OpenAPI specification\n\nhttps://api.twitter.com/2/openapi.json\n\n## Install\n\n```sh\nyarn add twimo-v2\n# or\nnpm i -S twimo-v2\n```\n\n## Usage\n\n### Configure (Bearer Token)\n\n```ts\nimport { configureTwitterApi, TweetsApi, SearchApi, UsersApi } from 'twimo-v2'\n\nconst bearerToken = 'xxxxxxxx'\nconst tweetsApi = configureTwitterApi(TweetsApi, bearerToken)\n```\n\n### Configure (User Context)\n\n```ts\nimport {\n  configureUserContextTwitterApi,\n  TweetsApi,\n  SearchApi,\n  UsersApi,\n} from 'twimo-v2'\n\nconst consumer = { key: 'xxxxxxxx', secret: 'xxxxxxxx' }\nconst token = { key: 'xxxxxxxx', secret: 'xxxxxxxx' }\n\nconst tweetsApi = configureUserContextTwitterApi(TweetsApi, consumer, token)\n```\n\n### API\n\n```ts\ntweetsApi.findTweetsById({\n  ids: ['1326191408546414592'],\n  expansions: ['author_id', 'attachments.media_keys'],\n  tweetFields: ['created_at', 'referenced_tweets', 'attachments'],\n  mediaFields: ['url', 'width', 'height'],\n})\n```\n\n**Response Example**\n\n```json\n{\n  \"data\": [\n    {\n      \"attachments\": {\n        \"media_keys\": [\"3_1326191367203160064\"]\n      },\n      \"created_at\": \"2020-11-10T15:54:05.000Z\",\n      \"author_id\": \"1013969666186678272\",\n      \"id\": \"1326191408546414592\",\n      \"text\": \"https://t.co/uMLs9riKeg\"\n    }\n  ],\n  \"includes\": {\n    \"media\": [\n      {\n        \"type\": \"photo\",\n        \"media_key\": \"3_1326191367203160064\",\n        \"height\": 128,\n        \"width\": 477,\n        \"url\": \"https://pbs.twimg.com/media/EmeUBaJVgAA9mFu.png\"\n      }\n    ],\n    \"users\": [\n      {\n        \"id\": \"1013969666186678272\",\n        \"name\": \"やまいも\",\n        \"username\": \"yarnaimo\"\n      }\n    ]\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyarnaimo%2Ftwimo-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyarnaimo%2Ftwimo-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyarnaimo%2Ftwimo-v2/lists"}