rettiwt-api 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/.github/workflows/build-docs.yml +22 -21
  2. package/.github/workflows/publish-to-npm.yml +29 -0
  3. package/README.md +52 -40
  4. package/dist/config/env.d.ts +5 -5
  5. package/dist/config/env.js +8 -8
  6. package/dist/enums/Errors.d.ts +20 -20
  7. package/dist/enums/Errors.js +27 -27
  8. package/dist/enums/HTTP.d.ts +17 -17
  9. package/dist/enums/HTTP.js +22 -22
  10. package/dist/graphql/enums/Errors.d.ts +21 -21
  11. package/dist/graphql/enums/Errors.js +28 -28
  12. package/dist/graphql/queries/RootQuery.d.ts +4 -4
  13. package/dist/graphql/queries/RootQuery.js +77 -77
  14. package/dist/graphql/resolvers/AccountResolver.d.ts +12 -12
  15. package/dist/graphql/resolvers/AccountResolver.js +83 -83
  16. package/dist/graphql/resolvers/ResolverBase.d.ts +16 -16
  17. package/dist/graphql/resolvers/ResolverBase.js +22 -22
  18. package/dist/graphql/resolvers/TweetResolver.d.ts +46 -46
  19. package/dist/graphql/resolvers/TweetResolver.js +311 -311
  20. package/dist/graphql/resolvers/UserResolver.d.ts +48 -48
  21. package/dist/graphql/resolvers/UserResolver.js +333 -333
  22. package/dist/graphql/resolvers/UserResolver.js.map +1 -1
  23. package/dist/graphql/types/Global.d.ts +4 -4
  24. package/dist/graphql/types/Global.js +12 -12
  25. package/dist/graphql/types/TweetTypes.d.ts +4 -4
  26. package/dist/graphql/types/TweetTypes.js +159 -159
  27. package/dist/graphql/types/UserTypes.d.ts +3 -3
  28. package/dist/graphql/types/UserTypes.js +136 -136
  29. package/dist/graphql/types/UserTypes.js.map +1 -1
  30. package/dist/index.d.ts +43 -43
  31. package/dist/index.js +70 -70
  32. package/dist/models/args/TweetFilter.d.ts +65 -59
  33. package/dist/models/args/TweetFilter.js +120 -100
  34. package/dist/models/args/TweetFilter.js.map +1 -1
  35. package/dist/models/args/TweetListArgs.d.ts +21 -21
  36. package/dist/models/args/TweetListArgs.js +53 -53
  37. package/dist/models/args/UserListArgs.d.ts +21 -21
  38. package/dist/models/args/UserListArgs.js +53 -53
  39. package/dist/models/auth/AuthCookie.d.ts +21 -21
  40. package/dist/models/auth/AuthCookie.js +32 -32
  41. package/dist/models/data/CursoredData.d.ts +34 -34
  42. package/dist/models/data/CursoredData.js +41 -41
  43. package/dist/models/data/Tweet.d.ts +53 -53
  44. package/dist/models/data/Tweet.js +103 -103
  45. package/dist/models/data/User.d.ts +41 -41
  46. package/dist/models/data/User.js +31 -31
  47. package/dist/models/errors/DataValidationError.d.ts +20 -20
  48. package/dist/models/errors/DataValidationError.js +22 -22
  49. package/dist/server.d.ts +1 -1
  50. package/dist/server.js +75 -75
  51. package/dist/services/auth/AccountService.d.ts +83 -83
  52. package/dist/services/auth/AccountService.js +411 -411
  53. package/dist/services/auth/AuthService.d.ts +31 -31
  54. package/dist/services/auth/AuthService.js +117 -117
  55. package/dist/services/data/TweetService.d.ts +60 -74
  56. package/dist/services/data/TweetService.js +251 -254
  57. package/dist/services/data/TweetService.js.map +1 -1
  58. package/dist/services/data/UserService.d.ts +71 -87
  59. package/dist/services/data/UserService.js +287 -296
  60. package/dist/services/data/UserService.js.map +1 -1
  61. package/dist/services/helper/Headers.d.ts +19 -19
  62. package/dist/services/helper/Headers.js +61 -61
  63. package/dist/services/helper/Parser.d.ts +22 -28
  64. package/dist/services/helper/Parser.js +83 -104
  65. package/dist/services/helper/Parser.js.map +1 -1
  66. package/dist/services/helper/extractors/Tweets.d.ts +32 -32
  67. package/dist/services/helper/extractors/Tweets.js +263 -263
  68. package/dist/services/helper/extractors/Users.d.ts +26 -26
  69. package/dist/services/helper/extractors/Users.js +202 -202
  70. package/dist/services/helper/payloads/LoginFlows.d.ts +77 -77
  71. package/dist/services/helper/payloads/LoginFlows.js +91 -91
  72. package/dist/services/helper/urls/Authentication.d.ts +4 -4
  73. package/dist/services/helper/urls/Authentication.js +10 -10
  74. package/dist/services/util/CacheService.d.ts +33 -33
  75. package/dist/services/util/CacheService.js +95 -95
  76. package/dist/services/util/FetcherService.d.ts +65 -65
  77. package/dist/services/util/FetcherService.js +213 -213
  78. package/dist/twitter/Url.d.ts +22 -0
  79. package/dist/twitter/Url.js +32 -0
  80. package/dist/twitter/Url.js.map +1 -0
  81. package/dist/twitter/enums/Resources.d.ts +15 -0
  82. package/dist/twitter/enums/Resources.js +21 -0
  83. package/dist/twitter/enums/Resources.js.map +1 -0
  84. package/dist/twitter/params/Query.d.ts +67 -0
  85. package/dist/twitter/params/Query.js +64 -0
  86. package/dist/twitter/params/Query.js.map +1 -0
  87. package/dist/twitter/payloads/Args.d.ts +16 -0
  88. package/dist/twitter/payloads/Args.js +16 -0
  89. package/dist/twitter/payloads/Args.js.map +1 -0
  90. package/dist/{types/raw/query/tweet/Engagements.d.ts → twitter/payloads/Features.d.ts} +28 -29
  91. package/dist/twitter/payloads/Features.js +37 -0
  92. package/dist/twitter/payloads/Features.js.map +1 -0
  93. package/dist/twitter/payloads/Variables.d.ts +41 -0
  94. package/dist/twitter/payloads/Variables.js +64 -0
  95. package/dist/twitter/payloads/Variables.js.map +1 -0
  96. package/dist/{types → twitter/types/request}/Query.d.ts +86 -80
  97. package/dist/{types/data/Tweet.js → twitter/types/request/Query.js} +4 -4
  98. package/dist/twitter/types/request/Query.js.map +1 -0
  99. package/dist/{types/raw/data → twitter/types}/tweet/Favouriters.d.ts +164 -164
  100. package/dist/twitter/types/tweet/Favouriters.js +3 -0
  101. package/dist/twitter/types/tweet/Favouriters.js.map +1 -0
  102. package/dist/{types/raw → twitter/types}/tweet/Retweeters.d.ts +171 -171
  103. package/dist/{types/Trends.js → twitter/types/tweet/Retweeters.js} +3 -3
  104. package/dist/twitter/types/tweet/Retweeters.js.map +1 -0
  105. package/dist/{types/raw/data → twitter/types}/tweet/Tweet.d.ts +746 -746
  106. package/dist/{types/data/User.js → twitter/types/tweet/Tweet.js} +3 -3
  107. package/dist/twitter/types/tweet/Tweet.js.map +1 -0
  108. package/dist/{types/raw → twitter/types}/tweet/Tweets.d.ts +386 -386
  109. package/dist/{types/raw/user/User.js → twitter/types/tweet/Tweets.js} +3 -3
  110. package/dist/twitter/types/tweet/Tweets.js.map +1 -0
  111. package/dist/{types/raw → twitter/types}/user/Followers.d.ts +176 -176
  112. package/dist/{types/interfaces/Rettiwt.js → twitter/types/user/Followers.js} +3 -3
  113. package/dist/twitter/types/user/Followers.js.map +1 -0
  114. package/dist/{types/raw → twitter/types}/user/Following.d.ts +176 -176
  115. package/dist/{types/Query.js → twitter/types/user/Following.js} +3 -3
  116. package/dist/twitter/types/user/Following.js.map +1 -0
  117. package/dist/{types/raw/data → twitter/types}/user/Likes.d.ts +1059 -1059
  118. package/dist/{types/interfaces/User.js → twitter/types/user/Likes.js} +3 -3
  119. package/dist/twitter/types/user/Likes.js.map +1 -0
  120. package/dist/{types/raw → twitter/types}/user/Tweets.d.ts +1512 -1512
  121. package/dist/twitter/types/user/Tweets.js +3 -0
  122. package/dist/twitter/types/user/Tweets.js.map +1 -0
  123. package/dist/{types/raw → twitter/types}/user/User.d.ts +117 -117
  124. package/dist/{types/raw/data → twitter/types}/user/User.js +2 -2
  125. package/dist/{types/data → twitter/types/user}/User.js.map +1 -1
  126. package/dist/types/Args.d.ts +38 -38
  127. package/dist/types/Args.js +4 -4
  128. package/dist/types/Authentication.d.ts +55 -55
  129. package/dist/types/Authentication.js +5 -5
  130. package/dist/types/Resolvers.d.ts +15 -15
  131. package/dist/types/Resolvers.js +2 -2
  132. package/dist/types/Rettiwt.d.ts +16 -16
  133. package/dist/types/Rettiwt.js +2 -2
  134. package/dist/types/Service.d.ts +22 -22
  135. package/dist/types/Service.js +4 -4
  136. package/dist/types/Tweet.d.ts +46 -46
  137. package/dist/types/Tweet.js +2 -2
  138. package/dist/types/User.d.ts +35 -35
  139. package/dist/types/User.js +2 -2
  140. package/docs/.nojekyll +1 -0
  141. package/docs/assets/highlight.css +64 -0
  142. package/docs/assets/main.js +58 -0
  143. package/docs/assets/search.js +1 -0
  144. package/docs/assets/style.css +1280 -0
  145. package/docs/classes/AccountService.html +286 -0
  146. package/docs/classes/AuthCookie.html +146 -0
  147. package/docs/classes/AuthService.html +147 -0
  148. package/docs/classes/CacheService.html +157 -0
  149. package/docs/classes/Cursor.html +102 -0
  150. package/docs/classes/CursoredData.html +126 -0
  151. package/docs/classes/DataValidationError.html +119 -0
  152. package/docs/classes/FetcherService.html +225 -0
  153. package/docs/classes/Tweet.html +210 -0
  154. package/docs/classes/TweetEntities.html +128 -0
  155. package/docs/classes/TweetFilter.html +221 -0
  156. package/docs/classes/TweetListArgs.html +118 -0
  157. package/docs/classes/TweetService.html +319 -0
  158. package/docs/classes/User.html +230 -0
  159. package/docs/classes/UserListArgs.html +118 -0
  160. package/docs/classes/UserService.html +355 -0
  161. package/docs/enums/HttpMethods.html +74 -0
  162. package/docs/functions/Rettiwt.html +99 -0
  163. package/docs/index.html +158 -0
  164. package/docs/interfaces/IAuthCookie.html +104 -0
  165. package/docs/interfaces/ICursor.html +77 -0
  166. package/docs/interfaces/ICursoredData.html +93 -0
  167. package/docs/interfaces/IDataContext.html +91 -0
  168. package/docs/interfaces/IListArgs.html +87 -0
  169. package/docs/interfaces/ITweet.html +176 -0
  170. package/docs/interfaces/ITweetEntities.html +104 -0
  171. package/docs/interfaces/ITweetFilter.html +158 -0
  172. package/docs/interfaces/IUser.html +194 -0
  173. package/docs/modules.html +109 -0
  174. package/package.json +2 -2
  175. package/src/graphql/resolvers/UserResolver.ts +4 -4
  176. package/src/graphql/types/UserTypes.ts +1 -1
  177. package/src/models/args/TweetFilter.ts +25 -4
  178. package/src/models/data/Tweet.ts +1 -1
  179. package/src/models/data/User.ts +1 -1
  180. package/src/services/data/TweetService.ts +35 -65
  181. package/src/services/data/UserService.ts +42 -48
  182. package/src/services/helper/Parser.ts +3 -24
  183. package/src/services/helper/extractors/Tweets.ts +4 -4
  184. package/src/services/helper/extractors/Users.ts +5 -5
  185. package/src/services/util/FetcherService.ts +4 -4
  186. package/src/twitter/Url.ts +37 -0
  187. package/src/twitter/enums/Resources.ts +15 -0
  188. package/src/twitter/params/Query.ts +100 -0
  189. package/src/twitter/payloads/Args.ts +21 -0
  190. package/src/twitter/payloads/Features.ts +33 -0
  191. package/src/twitter/payloads/Variables.ts +73 -0
  192. package/src/twitter/types/request/Query.ts +91 -0
  193. package/src/{types/raw → twitter/types}/user/Tweets.ts +1747 -1747
  194. package/src/types/Args.ts +1 -1
  195. package/dist/Test.d.ts +0 -0
  196. package/dist/Test.js +0 -2
  197. package/dist/Test.js.map +0 -1
  198. package/dist/endpoints/Endpoints.d.ts +0 -14
  199. package/dist/endpoints/Endpoints.js +0 -20
  200. package/dist/endpoints/Endpoints.js.map +0 -1
  201. package/dist/endpoints/Url.d.ts +0 -5
  202. package/dist/endpoints/Url.js +0 -12
  203. package/dist/endpoints/Url.js.map +0 -1
  204. package/dist/enums/Endpoints.d.ts +0 -25
  205. package/dist/enums/Endpoints.js +0 -31
  206. package/dist/enums/Endpoints.js.map +0 -1
  207. package/dist/graphql/types/Errors.d.ts +0 -20
  208. package/dist/graphql/types/Errors.js +0 -28
  209. package/dist/graphql/types/Errors.js.map +0 -1
  210. package/dist/middlewares/Authentication.d.ts +0 -0
  211. package/dist/middlewares/Authentication.js +0 -2
  212. package/dist/middlewares/Authentication.js.map +0 -1
  213. package/dist/models/data/DataValidationError.d.ts +0 -18
  214. package/dist/models/data/DataValidationError.js +0 -21
  215. package/dist/models/data/DataValidationError.js.map +0 -1
  216. package/dist/models/data/Errors.d.ts +0 -18
  217. package/dist/models/data/Errors.js +0 -21
  218. package/dist/models/data/Errors.js.map +0 -1
  219. package/dist/models/data/Service.d.ts +0 -33
  220. package/dist/models/data/Service.js +0 -41
  221. package/dist/models/data/Service.js.map +0 -1
  222. package/dist/models/graphql/Global.d.ts +0 -4
  223. package/dist/models/graphql/Global.js +0 -13
  224. package/dist/models/graphql/Global.js.map +0 -1
  225. package/dist/models/graphql/TweetTypes.d.ts +0 -6
  226. package/dist/models/graphql/TweetTypes.js +0 -156
  227. package/dist/models/graphql/TweetTypes.js.map +0 -1
  228. package/dist/models/graphql/UserTypes.d.ts +0 -3
  229. package/dist/models/graphql/UserTypes.js +0 -139
  230. package/dist/models/graphql/UserTypes.js.map +0 -1
  231. package/dist/models/query/Variables.d.ts +0 -2
  232. package/dist/models/query/Variables.js +0 -10
  233. package/dist/models/query/Variables.js.map +0 -1
  234. package/dist/queries/RootQuery.d.ts +0 -4
  235. package/dist/queries/RootQuery.js +0 -70
  236. package/dist/queries/RootQuery.js.map +0 -1
  237. package/dist/requests/Url.d.ts +0 -5
  238. package/dist/requests/Url.js +0 -12
  239. package/dist/requests/Url.js.map +0 -1
  240. package/dist/requests/payloads/Variables.d.ts +0 -23
  241. package/dist/requests/payloads/Variables.js +0 -24
  242. package/dist/requests/payloads/Variables.js.map +0 -1
  243. package/dist/resolvers/AccountResolver.d.ts +0 -12
  244. package/dist/resolvers/AccountResolver.js +0 -84
  245. package/dist/resolvers/AccountResolver.js.map +0 -1
  246. package/dist/resolvers/ResolverBase.d.ts +0 -5
  247. package/dist/resolvers/ResolverBase.js +0 -11
  248. package/dist/resolvers/ResolverBase.js.map +0 -1
  249. package/dist/resolvers/TweetResolver.d.ts +0 -54
  250. package/dist/resolvers/TweetResolver.js +0 -332
  251. package/dist/resolvers/TweetResolver.js.map +0 -1
  252. package/dist/resolvers/UserResolver.d.ts +0 -38
  253. package/dist/resolvers/UserResolver.js +0 -253
  254. package/dist/resolvers/UserResolver.js.map +0 -1
  255. package/dist/services/AuthService.d.ts +0 -22
  256. package/dist/services/AuthService.js +0 -106
  257. package/dist/services/AuthService.js.map +0 -1
  258. package/dist/services/CacheService.d.ts +0 -30
  259. package/dist/services/CacheService.js +0 -93
  260. package/dist/services/CacheService.js.map +0 -1
  261. package/dist/services/FetcherService.d.ts +0 -61
  262. package/dist/services/FetcherService.js +0 -209
  263. package/dist/services/FetcherService.js.map +0 -1
  264. package/dist/services/accounts/AccountService.d.ts +0 -65
  265. package/dist/services/accounts/AccountService.js +0 -336
  266. package/dist/services/accounts/AccountService.js.map +0 -1
  267. package/dist/services/accounts/LoginFlows.d.ts +0 -77
  268. package/dist/services/accounts/LoginFlows.js +0 -92
  269. package/dist/services/accounts/LoginFlows.js.map +0 -1
  270. package/dist/services/auth/LoginFlows.d.ts +0 -77
  271. package/dist/services/auth/LoginFlows.js +0 -92
  272. package/dist/services/auth/LoginFlows.js.map +0 -1
  273. package/dist/services/data/TrendService.d.ts +0 -17
  274. package/dist/services/data/TrendService.js +0 -116
  275. package/dist/services/data/TrendService.js.map +0 -1
  276. package/dist/services/data/UserAccountService.d.ts +0 -42
  277. package/dist/services/data/UserAccountService.js +0 -239
  278. package/dist/services/data/UserAccountService.js.map +0 -1
  279. package/dist/services/helper/Deserializers.d.ts +0 -19
  280. package/dist/services/helper/Deserializers.js +0 -115
  281. package/dist/services/helper/Deserializers.js.map +0 -1
  282. package/dist/services/helper/Extractors.d.ts +0 -104
  283. package/dist/services/helper/Extractors.js +0 -432
  284. package/dist/services/helper/Extractors.js.map +0 -1
  285. package/dist/services/helper/Urls.d.ts +0 -85
  286. package/dist/services/helper/Urls.js +0 -130
  287. package/dist/services/helper/Urls.js.map +0 -1
  288. package/dist/services/helper/deserializers/Tweets.d.ts +0 -12
  289. package/dist/services/helper/deserializers/Tweets.js +0 -92
  290. package/dist/services/helper/deserializers/Tweets.js.map +0 -1
  291. package/dist/services/helper/deserializers/Users.d.ts +0 -7
  292. package/dist/services/helper/deserializers/Users.js +0 -27
  293. package/dist/services/helper/deserializers/Users.js.map +0 -1
  294. package/dist/services/helper/extractors/Trends.d.ts +0 -3
  295. package/dist/services/helper/extractors/Trends.js +0 -51
  296. package/dist/services/helper/extractors/Trends.js.map +0 -1
  297. package/dist/services/helper/urls/Trends.d.ts +0 -7
  298. package/dist/services/helper/urls/Trends.js +0 -13
  299. package/dist/services/helper/urls/Trends.js.map +0 -1
  300. package/dist/services/helper/urls/Tweets.d.ts +0 -32
  301. package/dist/services/helper/urls/Tweets.js +0 -51
  302. package/dist/services/helper/urls/Tweets.js.map +0 -1
  303. package/dist/services/helper/urls/Users.d.ts +0 -38
  304. package/dist/services/helper/urls/Users.js +0 -76
  305. package/dist/services/helper/urls/Users.js.map +0 -1
  306. package/dist/types/HTTP.d.ts +0 -17
  307. package/dist/types/HTTP.js +0 -23
  308. package/dist/types/HTTP.js.map +0 -1
  309. package/dist/types/Query.js.map +0 -1
  310. package/dist/types/Trends.d.ts +0 -50
  311. package/dist/types/Trends.js.map +0 -1
  312. package/dist/types/UserAccount.d.ts +0 -19
  313. package/dist/types/UserAccount.js +0 -4
  314. package/dist/types/UserAccount.js.map +0 -1
  315. package/dist/types/args/TweetFilter.d.ts +0 -54
  316. package/dist/types/args/TweetFilter.js +0 -96
  317. package/dist/types/args/TweetFilter.js.map +0 -1
  318. package/dist/types/args/TweetListArg.d.ts +0 -10
  319. package/dist/types/args/TweetListArg.js +0 -42
  320. package/dist/types/args/TweetListArg.js.map +0 -1
  321. package/dist/types/args/TweetListArgs.d.ts +0 -20
  322. package/dist/types/args/TweetListArgs.js +0 -52
  323. package/dist/types/args/TweetListArgs.js.map +0 -1
  324. package/dist/types/args/UserListArgs.d.ts +0 -16
  325. package/dist/types/args/UserListArgs.js +0 -48
  326. package/dist/types/args/UserListArgs.js.map +0 -1
  327. package/dist/types/data/Errors.d.ts +0 -35
  328. package/dist/types/data/Errors.js +0 -45
  329. package/dist/types/data/Errors.js.map +0 -1
  330. package/dist/types/data/Service.d.ts +0 -43
  331. package/dist/types/data/Service.js +0 -22
  332. package/dist/types/data/Service.js.map +0 -1
  333. package/dist/types/data/Tweet.d.ts +0 -98
  334. package/dist/types/data/Tweet.js.map +0 -1
  335. package/dist/types/data/TweetFilter.d.ts +0 -49
  336. package/dist/types/data/TweetFilter.js +0 -63
  337. package/dist/types/data/TweetFilter.js.map +0 -1
  338. package/dist/types/data/User.d.ts +0 -38
  339. package/dist/types/graphql/Errors.d.ts +0 -15
  340. package/dist/types/graphql/Errors.js +0 -23
  341. package/dist/types/graphql/Errors.js.map +0 -1
  342. package/dist/types/interfaces/Args.d.ts +0 -38
  343. package/dist/types/interfaces/Args.js +0 -5
  344. package/dist/types/interfaces/Args.js.map +0 -1
  345. package/dist/types/interfaces/Authentication.d.ts +0 -40
  346. package/dist/types/interfaces/Authentication.js +0 -5
  347. package/dist/types/interfaces/Authentication.js.map +0 -1
  348. package/dist/types/interfaces/Resolvers.d.ts +0 -14
  349. package/dist/types/interfaces/Resolvers.js +0 -3
  350. package/dist/types/interfaces/Resolvers.js.map +0 -1
  351. package/dist/types/interfaces/Rettiwt.d.ts +0 -16
  352. package/dist/types/interfaces/Rettiwt.js.map +0 -1
  353. package/dist/types/interfaces/Service.d.ts +0 -13
  354. package/dist/types/interfaces/Service.js +0 -3
  355. package/dist/types/interfaces/Service.js.map +0 -1
  356. package/dist/types/interfaces/Services.d.ts +0 -13
  357. package/dist/types/interfaces/Services.js +0 -3
  358. package/dist/types/interfaces/Services.js.map +0 -1
  359. package/dist/types/interfaces/Tweet.d.ts +0 -46
  360. package/dist/types/interfaces/Tweet.js +0 -3
  361. package/dist/types/interfaces/Tweet.js.map +0 -1
  362. package/dist/types/interfaces/TweetFilter.d.ts +0 -0
  363. package/dist/types/interfaces/TweetFilter.js +0 -2
  364. package/dist/types/interfaces/TweetFilter.js.map +0 -1
  365. package/dist/types/interfaces/User.d.ts +0 -35
  366. package/dist/types/interfaces/User.js.map +0 -1
  367. package/dist/types/raw/auth/Cookie.d.ts +0 -16
  368. package/dist/types/raw/auth/Cookie.js +0 -3
  369. package/dist/types/raw/auth/Cookie.js.map +0 -1
  370. package/dist/types/raw/data/tweet/Favouriters.js +0 -3
  371. package/dist/types/raw/data/tweet/Favouriters.js.map +0 -1
  372. package/dist/types/raw/data/tweet/Retweeters.d.ts +0 -171
  373. package/dist/types/raw/data/tweet/Retweeters.js +0 -3
  374. package/dist/types/raw/data/tweet/Retweeters.js.map +0 -1
  375. package/dist/types/raw/data/tweet/Tweet.js +0 -3
  376. package/dist/types/raw/data/tweet/Tweet.js.map +0 -1
  377. package/dist/types/raw/data/tweet/Tweets.d.ts +0 -386
  378. package/dist/types/raw/data/tweet/Tweets.js +0 -3
  379. package/dist/types/raw/data/tweet/Tweets.js.map +0 -1
  380. package/dist/types/raw/data/user/Followers.d.ts +0 -176
  381. package/dist/types/raw/data/user/Followers.js +0 -3
  382. package/dist/types/raw/data/user/Followers.js.map +0 -1
  383. package/dist/types/raw/data/user/Following.d.ts +0 -176
  384. package/dist/types/raw/data/user/Following.js +0 -3
  385. package/dist/types/raw/data/user/Following.js.map +0 -1
  386. package/dist/types/raw/data/user/Likes.js +0 -3
  387. package/dist/types/raw/data/user/Likes.js.map +0 -1
  388. package/dist/types/raw/data/user/User.d.ts +0 -117
  389. package/dist/types/raw/data/user/User.js.map +0 -1
  390. package/dist/types/raw/general/Trends.d.ts +0 -324
  391. package/dist/types/raw/general/Trends.js +0 -3
  392. package/dist/types/raw/general/Trends.js.map +0 -1
  393. package/dist/types/raw/query/tweet/Details.d.ts +0 -80
  394. package/dist/types/raw/query/tweet/Details.js +0 -5
  395. package/dist/types/raw/query/tweet/Details.js.map +0 -1
  396. package/dist/types/raw/query/tweet/Engagements.js +0 -3
  397. package/dist/types/raw/query/tweet/Engagements.js.map +0 -1
  398. package/dist/types/raw/query/tweet/Likes.d.ts +0 -29
  399. package/dist/types/raw/query/tweet/Likes.js +0 -3
  400. package/dist/types/raw/query/tweet/Likes.js.map +0 -1
  401. package/dist/types/raw/query/tweet/Retweets.d.ts +0 -29
  402. package/dist/types/raw/query/tweet/Retweets.js +0 -3
  403. package/dist/types/raw/query/tweet/Retweets.js.map +0 -1
  404. package/dist/types/raw/query/tweet/Search.d.ts +0 -40
  405. package/dist/types/raw/query/tweet/Search.js +0 -3
  406. package/dist/types/raw/query/tweet/Search.js.map +0 -1
  407. package/dist/types/raw/query/tweet/TweetDetails.d.ts +0 -34
  408. package/dist/types/raw/query/tweet/TweetDetails.js +0 -5
  409. package/dist/types/raw/query/tweet/TweetDetails.js.map +0 -1
  410. package/dist/types/raw/query/tweet/TweetLike.d.ts +0 -29
  411. package/dist/types/raw/query/tweet/TweetLike.js +0 -3
  412. package/dist/types/raw/query/tweet/TweetLike.js.map +0 -1
  413. package/dist/types/raw/query/tweet/TweetLikes.d.ts +0 -29
  414. package/dist/types/raw/query/tweet/TweetLikes.js +0 -3
  415. package/dist/types/raw/query/tweet/TweetLikes.js.map +0 -1
  416. package/dist/types/raw/query/tweet/TweetRetweets.d.ts +0 -0
  417. package/dist/types/raw/query/tweet/TweetRetweets.js +0 -2
  418. package/dist/types/raw/query/tweet/TweetRetweets.js.map +0 -1
  419. package/dist/types/raw/query/user/Details.d.ts +0 -34
  420. package/dist/types/raw/query/user/Details.js +0 -3
  421. package/dist/types/raw/query/user/Details.js.map +0 -1
  422. package/dist/types/raw/tweet/Favouriters.d.ts +0 -164
  423. package/dist/types/raw/tweet/Favouriters.js +0 -3
  424. package/dist/types/raw/tweet/Favouriters.js.map +0 -1
  425. package/dist/types/raw/tweet/Retweeters.js +0 -3
  426. package/dist/types/raw/tweet/Retweeters.js.map +0 -1
  427. package/dist/types/raw/tweet/Tweet.d.ts +0 -746
  428. package/dist/types/raw/tweet/Tweet.js +0 -3
  429. package/dist/types/raw/tweet/Tweet.js.map +0 -1
  430. package/dist/types/raw/tweet/Tweets.js +0 -3
  431. package/dist/types/raw/tweet/Tweets.js.map +0 -1
  432. package/dist/types/raw/user/Followers.js +0 -3
  433. package/dist/types/raw/user/Followers.js.map +0 -1
  434. package/dist/types/raw/user/Following.js +0 -3
  435. package/dist/types/raw/user/Following.js.map +0 -1
  436. package/dist/types/raw/user/Likes.d.ts +0 -1059
  437. package/dist/types/raw/user/Likes.js +0 -3
  438. package/dist/types/raw/user/Likes.js.map +0 -1
  439. package/dist/types/raw/user/Tweets.js +0 -3
  440. package/dist/types/raw/user/Tweets.js.map +0 -1
  441. package/dist/types/raw/user/User.js.map +0 -1
  442. package/dist/types/services/args/TweetFilter.d.ts +0 -50
  443. package/dist/types/services/args/TweetFilter.js +0 -76
  444. package/dist/types/services/args/TweetFilter.js.map +0 -1
  445. package/src/services/helper/urls/Tweets.ts +0 -46
  446. package/src/services/helper/urls/Users.ts +0 -78
  447. /package/src/{types/raw → twitter/types}/tweet/Favouriters.ts +0 -0
  448. /package/src/{types/raw → twitter/types}/tweet/Retweeters.ts +0 -0
  449. /package/src/{types/raw → twitter/types}/tweet/Tweet.ts +0 -0
  450. /package/src/{types/raw → twitter/types}/tweet/Tweets.ts +0 -0
  451. /package/src/{types/raw → twitter/types}/user/Followers.ts +0 -0
  452. /package/src/{types/raw → twitter/types}/user/Following.ts +0 -0
  453. /package/src/{types/raw → twitter/types}/user/Likes.ts +0 -0
  454. /package/src/{types/raw → twitter/types}/user/User.ts +0 -0
@@ -1,33 +1,33 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.AuthCookie = void 0;
4
- /**
5
- * The cookie containing the tokens that are used to authenticate against Twitter.
6
- *
7
- * @internal
8
- */
9
- var AuthCookie = /** @class */ (function () {
10
- function AuthCookie(cookie) {
11
- var _a, _b, _c, _d;
12
- this.auth_token = (_a = cookie === null || cookie === void 0 ? void 0 : cookie.auth_token) !== null && _a !== void 0 ? _a : '';
13
- this.ct0 = (_b = cookie === null || cookie === void 0 ? void 0 : cookie.ct0) !== null && _b !== void 0 ? _b : '';
14
- this.kdt = (_c = cookie === null || cookie === void 0 ? void 0 : cookie.kdt) !== null && _c !== void 0 ? _c : '';
15
- this.twid = (_d = cookie === null || cookie === void 0 ? void 0 : cookie.twid) !== null && _d !== void 0 ? _d : '';
16
- }
17
- /**
18
- * @returns The string respresentation of this cookie in the valid cookie string format.
19
- */
20
- AuthCookie.prototype.toString = function () {
21
- /** The string representation of this cookie. */
22
- var cookieString = '';
23
- // Iterating through the (key, value) pairs of this cookie
24
- for (var _i = 0, _a = Object.entries(this); _i < _a.length; _i++) {
25
- var _b = _a[_i], key = _b[0], value = _b[1];
26
- cookieString += "".concat(key, "=").concat(value, ";");
27
- }
28
- return cookieString;
29
- };
30
- return AuthCookie;
31
- }());
32
- exports.AuthCookie = AuthCookie;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.AuthCookie = void 0;
4
+ /**
5
+ * The cookie containing the tokens that are used to authenticate against Twitter.
6
+ *
7
+ * @internal
8
+ */
9
+ var AuthCookie = /** @class */ (function () {
10
+ function AuthCookie(cookie) {
11
+ var _a, _b, _c, _d;
12
+ this.auth_token = (_a = cookie === null || cookie === void 0 ? void 0 : cookie.auth_token) !== null && _a !== void 0 ? _a : '';
13
+ this.ct0 = (_b = cookie === null || cookie === void 0 ? void 0 : cookie.ct0) !== null && _b !== void 0 ? _b : '';
14
+ this.kdt = (_c = cookie === null || cookie === void 0 ? void 0 : cookie.kdt) !== null && _c !== void 0 ? _c : '';
15
+ this.twid = (_d = cookie === null || cookie === void 0 ? void 0 : cookie.twid) !== null && _d !== void 0 ? _d : '';
16
+ }
17
+ /**
18
+ * @returns The string respresentation of this cookie in the valid cookie string format.
19
+ */
20
+ AuthCookie.prototype.toString = function () {
21
+ /** The string representation of this cookie. */
22
+ var cookieString = '';
23
+ // Iterating through the (key, value) pairs of this cookie
24
+ for (var _i = 0, _a = Object.entries(this); _i < _a.length; _i++) {
25
+ var _b = _a[_i], key = _b[0], value = _b[1];
26
+ cookieString += "".concat(key, "=").concat(value, ";");
27
+ }
28
+ return cookieString;
29
+ };
30
+ return AuthCookie;
31
+ }());
32
+ exports.AuthCookie = AuthCookie;
33
33
  //# sourceMappingURL=AuthCookie.js.map
@@ -1,34 +1,34 @@
1
- import { ICursor, ICursoredData } from "../../types/Service";
2
- /**
3
- * The cursor to the batch of data to be fetched.
4
- *
5
- * @internal
6
- */
7
- export declare class Cursor implements ICursor {
8
- /** The cursor string. */
9
- value: string;
10
- /**
11
- * Initializes a new cursor from the given cursor string.
12
- *
13
- * @param cursorStr The string representation of the cursor.
14
- */
15
- constructor(cursorStr: string);
16
- }
17
- /**
18
- * The data that us fetched batch-wise along with a cursor.
19
- *
20
- * @internal
21
- *
22
- * @typeParam Type - The type of data present in the list.
23
- */
24
- export declare class CursoredData<T> implements ICursoredData<T> {
25
- /** The list of data of the given type. */
26
- list: T[];
27
- /** The cursor to the next batch of data. */
28
- next: Cursor;
29
- /**
30
- * @param list The list of data item to store.
31
- * @param next The cursor to the next batch of data.
32
- */
33
- constructor(list?: T[], next?: string);
34
- }
1
+ import { ICursor, ICursoredData } from "../../types/Service";
2
+ /**
3
+ * The cursor to the batch of data to be fetched.
4
+ *
5
+ * @internal
6
+ */
7
+ export declare class Cursor implements ICursor {
8
+ /** The cursor string. */
9
+ value: string;
10
+ /**
11
+ * Initializes a new cursor from the given cursor string.
12
+ *
13
+ * @param cursorStr The string representation of the cursor.
14
+ */
15
+ constructor(cursorStr: string);
16
+ }
17
+ /**
18
+ * The data that us fetched batch-wise along with a cursor.
19
+ *
20
+ * @internal
21
+ *
22
+ * @typeParam Type - The type of data present in the list.
23
+ */
24
+ export declare class CursoredData<T> implements ICursoredData<T> {
25
+ /** The list of data of the given type. */
26
+ list: T[];
27
+ /** The cursor to the next batch of data. */
28
+ next: Cursor;
29
+ /**
30
+ * @param list The list of data item to store.
31
+ * @param next The cursor to the next batch of data.
32
+ */
33
+ constructor(list?: T[], next?: string);
34
+ }
@@ -1,42 +1,42 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.CursoredData = exports.Cursor = void 0;
4
- /**
5
- * The cursor to the batch of data to be fetched.
6
- *
7
- * @internal
8
- */
9
- var Cursor = /** @class */ (function () {
10
- /**
11
- * Initializes a new cursor from the given cursor string.
12
- *
13
- * @param cursorStr The string representation of the cursor.
14
- */
15
- function Cursor(cursorStr) {
16
- this.value = cursorStr;
17
- }
18
- return Cursor;
19
- }());
20
- exports.Cursor = Cursor;
21
- /**
22
- * The data that us fetched batch-wise along with a cursor.
23
- *
24
- * @internal
25
- *
26
- * @typeParam Type - The type of data present in the list.
27
- */
28
- var CursoredData = /** @class */ (function () {
29
- /**
30
- * @param list The list of data item to store.
31
- * @param next The cursor to the next batch of data.
32
- */
33
- function CursoredData(list, next) {
34
- if (list === void 0) { list = []; }
35
- if (next === void 0) { next = ''; }
36
- this.list = list;
37
- this.next = new Cursor(next);
38
- }
39
- return CursoredData;
40
- }());
41
- exports.CursoredData = CursoredData;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.CursoredData = exports.Cursor = void 0;
4
+ /**
5
+ * The cursor to the batch of data to be fetched.
6
+ *
7
+ * @internal
8
+ */
9
+ var Cursor = /** @class */ (function () {
10
+ /**
11
+ * Initializes a new cursor from the given cursor string.
12
+ *
13
+ * @param cursorStr The string representation of the cursor.
14
+ */
15
+ function Cursor(cursorStr) {
16
+ this.value = cursorStr;
17
+ }
18
+ return Cursor;
19
+ }());
20
+ exports.Cursor = Cursor;
21
+ /**
22
+ * The data that us fetched batch-wise along with a cursor.
23
+ *
24
+ * @internal
25
+ *
26
+ * @typeParam Type - The type of data present in the list.
27
+ */
28
+ var CursoredData = /** @class */ (function () {
29
+ /**
30
+ * @param list The list of data item to store.
31
+ * @param next The cursor to the next batch of data.
32
+ */
33
+ function CursoredData(list, next) {
34
+ if (list === void 0) { list = []; }
35
+ if (next === void 0) { next = ''; }
36
+ this.list = list;
37
+ this.next = new Cursor(next);
38
+ }
39
+ return CursoredData;
40
+ }());
41
+ exports.CursoredData = CursoredData;
42
42
  //# sourceMappingURL=CursoredData.js.map
@@ -1,53 +1,53 @@
1
- import { ITweet, ITweetEntities } from '../../types/Tweet';
2
- import { Result as RawTweet, Entities2 as RawTweetEntities } from '../../types/raw/tweet/Tweet';
3
- /**
4
- * The different types parsed entities like urls, media, mentions, hashtags, etc.
5
- *
6
- * @internal
7
- */
8
- export declare class TweetEntities implements ITweetEntities {
9
- /** The list of hashtags mentioned in the tweet. */
10
- hashtags: string[];
11
- /** The list of urls mentioned in the tweet. */
12
- urls: string[];
13
- /** The list of IDs of users mentioned in the tweet. */
14
- mentionedUsers: string[];
15
- /** The list of urls to various media mentioned in the tweet. */
16
- media: string[];
17
- constructor(entities: RawTweetEntities);
18
- }
19
- /**
20
- * The details of a single Tweet.
21
- *
22
- * @internal
23
- */
24
- export declare class Tweet implements ITweet {
25
- /** The rest id of the tweet. */
26
- id: string;
27
- /** The rest id of the user who made the tweet. */
28
- tweetBy: string;
29
- /** The date and time of creation of the tweet, in UTC string format. */
30
- createdAt: string;
31
- /** Additional tweet entities like urls, mentions, etc. */
32
- entities: TweetEntities;
33
- /** The rest id of the tweet which is quoted in the tweet. */
34
- quoted: string;
35
- /** The full text content of the tweet. */
36
- fullText: string;
37
- /** The rest id of the user to which the tweet is a reply. */
38
- replyTo: string;
39
- /** The language in which the tweet is written. */
40
- lang: string;
41
- /** The number of quotes of the tweet. */
42
- quoteCount: number;
43
- /** The number of replies to the tweet. */
44
- replyCount: number;
45
- /** The number of retweets of the tweet. */
46
- retweetCount: number;
47
- /** The number of likes of the tweet. */
48
- likeCount: number;
49
- /**
50
- * @param tweet The raw tweet data.
51
- */
52
- constructor(tweet: RawTweet);
53
- }
1
+ import { ITweet, ITweetEntities } from '../../types/Tweet';
2
+ import { Result as RawTweet, Entities2 as RawTweetEntities } from '../../twitter/types/tweet/Tweet';
3
+ /**
4
+ * The different types parsed entities like urls, media, mentions, hashtags, etc.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare class TweetEntities implements ITweetEntities {
9
+ /** The list of hashtags mentioned in the tweet. */
10
+ hashtags: string[];
11
+ /** The list of urls mentioned in the tweet. */
12
+ urls: string[];
13
+ /** The list of IDs of users mentioned in the tweet. */
14
+ mentionedUsers: string[];
15
+ /** The list of urls to various media mentioned in the tweet. */
16
+ media: string[];
17
+ constructor(entities: RawTweetEntities);
18
+ }
19
+ /**
20
+ * The details of a single Tweet.
21
+ *
22
+ * @internal
23
+ */
24
+ export declare class Tweet implements ITweet {
25
+ /** The rest id of the tweet. */
26
+ id: string;
27
+ /** The rest id of the user who made the tweet. */
28
+ tweetBy: string;
29
+ /** The date and time of creation of the tweet, in UTC string format. */
30
+ createdAt: string;
31
+ /** Additional tweet entities like urls, mentions, etc. */
32
+ entities: TweetEntities;
33
+ /** The rest id of the tweet which is quoted in the tweet. */
34
+ quoted: string;
35
+ /** The full text content of the tweet. */
36
+ fullText: string;
37
+ /** The rest id of the user to which the tweet is a reply. */
38
+ replyTo: string;
39
+ /** The language in which the tweet is written. */
40
+ lang: string;
41
+ /** The number of quotes of the tweet. */
42
+ quoteCount: number;
43
+ /** The number of replies to the tweet. */
44
+ replyCount: number;
45
+ /** The number of retweets of the tweet. */
46
+ retweetCount: number;
47
+ /** The number of likes of the tweet. */
48
+ likeCount: number;
49
+ /**
50
+ * @param tweet The raw tweet data.
51
+ */
52
+ constructor(tweet: RawTweet);
53
+ }
@@ -1,104 +1,104 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- exports.__esModule = true;
26
- exports.Tweet = exports.TweetEntities = void 0;
27
- // PARSERS
28
- var Parsers = __importStar(require("../../services/helper/Parser"));
29
- /**
30
- * The different types parsed entities like urls, media, mentions, hashtags, etc.
31
- *
32
- * @internal
33
- */
34
- var TweetEntities = /** @class */ (function () {
35
- // MEMBER METHODS
36
- function TweetEntities(entities) {
37
- // MEMBER DATA
38
- /** The list of hashtags mentioned in the tweet. */
39
- this.hashtags = [];
40
- /** The list of urls mentioned in the tweet. */
41
- this.urls = [];
42
- /** The list of IDs of users mentioned in the tweet. */
43
- this.mentionedUsers = [];
44
- /** The list of urls to various media mentioned in the tweet. */
45
- this.media = [];
46
- // Extracting user mentions
47
- if (entities.user_mentions) {
48
- for (var _i = 0, _a = entities.user_mentions; _i < _a.length; _i++) {
49
- var user = _a[_i];
50
- this.mentionedUsers.push(user.id_str);
51
- }
52
- }
53
- // Extracting urls
54
- if (entities.urls) {
55
- for (var _b = 0, _c = entities.urls; _b < _c.length; _b++) {
56
- var url = _c[_b];
57
- this.urls.push(url.expanded_url);
58
- }
59
- }
60
- // Extracting hashtags
61
- if (entities.hashtags) {
62
- for (var _d = 0, _e = entities.hashtags; _d < _e.length; _d++) {
63
- var hashtag = _e[_d];
64
- this.hashtags.push(hashtag.text);
65
- }
66
- }
67
- // Extracting media urls (if any)
68
- if (entities.media) {
69
- for (var _f = 0, _g = entities.media; _f < _g.length; _f++) {
70
- var media = _g[_f];
71
- this.media.push(media.media_url_https);
72
- }
73
- }
74
- }
75
- return TweetEntities;
76
- }());
77
- exports.TweetEntities = TweetEntities;
78
- /**
79
- * The details of a single Tweet.
80
- *
81
- * @internal
82
- */
83
- var Tweet = /** @class */ (function () {
84
- /**
85
- * @param tweet The raw tweet data.
86
- */
87
- function Tweet(tweet) {
88
- this.id = tweet.rest_id;
89
- this.createdAt = tweet.legacy.created_at;
90
- this.tweetBy = tweet.legacy.user_id_str;
91
- this.entities = new TweetEntities(tweet.legacy.entities);
92
- this.quoted = tweet.legacy.quoted_status_id_str;
93
- this.fullText = Parsers.normalizeText(tweet.legacy.full_text);
94
- this.replyTo = tweet.legacy.in_reply_to_status_id_str;
95
- this.lang = tweet.legacy.lang;
96
- this.quoteCount = tweet.legacy.quote_count;
97
- this.replyCount = tweet.legacy.reply_count;
98
- this.retweetCount = tweet.legacy.retweet_count;
99
- this.likeCount = tweet.legacy.favorite_count;
100
- }
101
- return Tweet;
102
- }());
103
- exports.Tweet = Tweet;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ exports.__esModule = true;
26
+ exports.Tweet = exports.TweetEntities = void 0;
27
+ // PARSERS
28
+ var Parsers = __importStar(require("../../services/helper/Parser"));
29
+ /**
30
+ * The different types parsed entities like urls, media, mentions, hashtags, etc.
31
+ *
32
+ * @internal
33
+ */
34
+ var TweetEntities = /** @class */ (function () {
35
+ // MEMBER METHODS
36
+ function TweetEntities(entities) {
37
+ // MEMBER DATA
38
+ /** The list of hashtags mentioned in the tweet. */
39
+ this.hashtags = [];
40
+ /** The list of urls mentioned in the tweet. */
41
+ this.urls = [];
42
+ /** The list of IDs of users mentioned in the tweet. */
43
+ this.mentionedUsers = [];
44
+ /** The list of urls to various media mentioned in the tweet. */
45
+ this.media = [];
46
+ // Extracting user mentions
47
+ if (entities.user_mentions) {
48
+ for (var _i = 0, _a = entities.user_mentions; _i < _a.length; _i++) {
49
+ var user = _a[_i];
50
+ this.mentionedUsers.push(user.id_str);
51
+ }
52
+ }
53
+ // Extracting urls
54
+ if (entities.urls) {
55
+ for (var _b = 0, _c = entities.urls; _b < _c.length; _b++) {
56
+ var url = _c[_b];
57
+ this.urls.push(url.expanded_url);
58
+ }
59
+ }
60
+ // Extracting hashtags
61
+ if (entities.hashtags) {
62
+ for (var _d = 0, _e = entities.hashtags; _d < _e.length; _d++) {
63
+ var hashtag = _e[_d];
64
+ this.hashtags.push(hashtag.text);
65
+ }
66
+ }
67
+ // Extracting media urls (if any)
68
+ if (entities.media) {
69
+ for (var _f = 0, _g = entities.media; _f < _g.length; _f++) {
70
+ var media = _g[_f];
71
+ this.media.push(media.media_url_https);
72
+ }
73
+ }
74
+ }
75
+ return TweetEntities;
76
+ }());
77
+ exports.TweetEntities = TweetEntities;
78
+ /**
79
+ * The details of a single Tweet.
80
+ *
81
+ * @internal
82
+ */
83
+ var Tweet = /** @class */ (function () {
84
+ /**
85
+ * @param tweet The raw tweet data.
86
+ */
87
+ function Tweet(tweet) {
88
+ this.id = tweet.rest_id;
89
+ this.createdAt = tweet.legacy.created_at;
90
+ this.tweetBy = tweet.legacy.user_id_str;
91
+ this.entities = new TweetEntities(tweet.legacy.entities);
92
+ this.quoted = tweet.legacy.quoted_status_id_str;
93
+ this.fullText = Parsers.normalizeText(tweet.legacy.full_text);
94
+ this.replyTo = tweet.legacy.in_reply_to_status_id_str;
95
+ this.lang = tweet.legacy.lang;
96
+ this.quoteCount = tweet.legacy.quote_count;
97
+ this.replyCount = tweet.legacy.reply_count;
98
+ this.retweetCount = tweet.legacy.retweet_count;
99
+ this.likeCount = tweet.legacy.favorite_count;
100
+ }
101
+ return Tweet;
102
+ }());
103
+ exports.Tweet = Tweet;
104
104
  //# sourceMappingURL=Tweet.js.map
@@ -1,41 +1,41 @@
1
- import { IUser } from '../../types/User';
2
- import { Result as RawUser } from '../../types/raw/user/User';
3
- /**
4
- * The details of a single user.
5
- *
6
- * @internal
7
- */
8
- export declare class User implements IUser {
9
- /** The rest id of the user. */
10
- id: string;
11
- /** The username/screenname of the user. */
12
- userName: string;
13
- /** The full name of the user. */
14
- fullName: string;
15
- /** The creation date of user's account. */
16
- createdAt: string;
17
- /** The user's description. */
18
- description: string;
19
- /** Whether the account is verified or not. */
20
- isVerified: boolean;
21
- /** The number of tweets liked by the user. */
22
- favouritesCount: number;
23
- /** The number of followers of the user. */
24
- followersCount: number;
25
- /** The number of following of the user. */
26
- followingsCount: number;
27
- /** The number of tweets made by the user. */
28
- statusesCount: number;
29
- /** The location of user as provided by user. */
30
- location: string;
31
- /** The rest id of the tweet pinned in the user's profile. */
32
- pinnedTweet: string;
33
- /** The url of the profile banner image. */
34
- profileBanner: string;
35
- /** The url of the profile image. */
36
- profileImage: string;
37
- /**
38
- * @param user The raw user data.
39
- */
40
- constructor(user: RawUser);
41
- }
1
+ import { IUser } from '../../types/User';
2
+ import { Result as RawUser } from '../../twitter/types/user/User';
3
+ /**
4
+ * The details of a single user.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare class User implements IUser {
9
+ /** The rest id of the user. */
10
+ id: string;
11
+ /** The username/screenname of the user. */
12
+ userName: string;
13
+ /** The full name of the user. */
14
+ fullName: string;
15
+ /** The creation date of user's account. */
16
+ createdAt: string;
17
+ /** The user's description. */
18
+ description: string;
19
+ /** Whether the account is verified or not. */
20
+ isVerified: boolean;
21
+ /** The number of tweets liked by the user. */
22
+ favouritesCount: number;
23
+ /** The number of followers of the user. */
24
+ followersCount: number;
25
+ /** The number of following of the user. */
26
+ followingsCount: number;
27
+ /** The number of tweets made by the user. */
28
+ statusesCount: number;
29
+ /** The location of user as provided by user. */
30
+ location: string;
31
+ /** The rest id of the tweet pinned in the user's profile. */
32
+ pinnedTweet: string;
33
+ /** The url of the profile banner image. */
34
+ profileBanner: string;
35
+ /** The url of the profile image. */
36
+ profileImage: string;
37
+ /**
38
+ * @param user The raw user data.
39
+ */
40
+ constructor(user: RawUser);
41
+ }