x-twitter-scraper 0.16.0 → 0.17.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 (198) hide show
  1. package/CHANGELOG.md +33 -5
  2. package/README.md +1 -0
  3. package/client.d.mts +8 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +8 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/internal/detect-platform.d.mts +3 -1
  10. package/internal/detect-platform.d.mts.map +1 -1
  11. package/internal/detect-platform.d.ts +3 -1
  12. package/internal/detect-platform.d.ts.map +1 -1
  13. package/internal/detect-platform.js +1 -1
  14. package/internal/detect-platform.js.map +1 -1
  15. package/internal/detect-platform.mjs +1 -1
  16. package/internal/detect-platform.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/resources/events.d.mts +50 -11
  19. package/resources/events.d.mts.map +1 -1
  20. package/resources/events.d.ts +50 -11
  21. package/resources/events.d.ts.map +1 -1
  22. package/resources/events.js.map +1 -1
  23. package/resources/events.mjs.map +1 -1
  24. package/resources/index.d.mts +1 -1
  25. package/resources/index.d.mts.map +1 -1
  26. package/resources/index.d.ts +1 -1
  27. package/resources/index.d.ts.map +1 -1
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs.map +1 -1
  30. package/resources/monitors/index.d.mts +2 -1
  31. package/resources/monitors/index.d.mts.map +1 -1
  32. package/resources/monitors/index.d.ts +2 -1
  33. package/resources/monitors/index.d.ts.map +1 -1
  34. package/resources/monitors/index.js +3 -1
  35. package/resources/monitors/index.js.map +1 -1
  36. package/resources/monitors/index.mjs +1 -0
  37. package/resources/monitors/index.mjs.map +1 -1
  38. package/resources/monitors/keywords.d.mts +10 -96
  39. package/resources/monitors/keywords.d.mts.map +1 -1
  40. package/resources/monitors/keywords.d.ts +10 -96
  41. package/resources/monitors/keywords.d.ts.map +1 -1
  42. package/resources/monitors/monitors.d.mts +6 -2
  43. package/resources/monitors/monitors.d.mts.map +1 -1
  44. package/resources/monitors/monitors.d.ts +6 -2
  45. package/resources/monitors/monitors.d.ts.map +1 -1
  46. package/resources/monitors/monitors.js +4 -0
  47. package/resources/monitors/monitors.js.map +1 -1
  48. package/resources/monitors/monitors.mjs +4 -0
  49. package/resources/monitors/monitors.mjs.map +1 -1
  50. package/resources/monitors/posts.d.mts +344 -0
  51. package/resources/monitors/posts.d.mts.map +1 -0
  52. package/resources/monitors/posts.d.ts +344 -0
  53. package/resources/monitors/posts.d.ts.map +1 -0
  54. package/resources/monitors/posts.js +94 -0
  55. package/resources/monitors/posts.js.map +1 -0
  56. package/resources/monitors/posts.mjs +90 -0
  57. package/resources/monitors/posts.mjs.map +1 -0
  58. package/resources/shared.d.mts +577 -2
  59. package/resources/shared.d.mts.map +1 -1
  60. package/resources/shared.d.ts +577 -2
  61. package/resources/shared.d.ts.map +1 -1
  62. package/resources/support/index.d.mts +1 -1
  63. package/resources/support/index.d.mts.map +1 -1
  64. package/resources/support/index.d.ts +1 -1
  65. package/resources/support/index.d.ts.map +1 -1
  66. package/resources/support/index.js.map +1 -1
  67. package/resources/support/index.mjs.map +1 -1
  68. package/resources/support/support.d.mts +2 -2
  69. package/resources/support/support.d.mts.map +1 -1
  70. package/resources/support/support.d.ts +2 -2
  71. package/resources/support/support.d.ts.map +1 -1
  72. package/resources/support/support.js.map +1 -1
  73. package/resources/support/support.mjs.map +1 -1
  74. package/resources/support/tickets.d.mts +12 -20
  75. package/resources/support/tickets.d.mts.map +1 -1
  76. package/resources/support/tickets.d.ts +12 -20
  77. package/resources/support/tickets.d.ts.map +1 -1
  78. package/resources/webhooks.d.mts +5 -4
  79. package/resources/webhooks.d.mts.map +1 -1
  80. package/resources/webhooks.d.ts +5 -4
  81. package/resources/webhooks.d.ts.map +1 -1
  82. package/resources/webhooks.js.map +1 -1
  83. package/resources/webhooks.mjs.map +1 -1
  84. package/resources/x/accounts.d.mts +14 -4
  85. package/resources/x/accounts.d.mts.map +1 -1
  86. package/resources/x/accounts.d.ts +14 -4
  87. package/resources/x/accounts.d.ts.map +1 -1
  88. package/resources/x/accounts.js +6 -4
  89. package/resources/x/accounts.js.map +1 -1
  90. package/resources/x/accounts.mjs +6 -4
  91. package/resources/x/accounts.mjs.map +1 -1
  92. package/resources/x/broadcasts.d.mts +3 -131
  93. package/resources/x/broadcasts.d.mts.map +1 -1
  94. package/resources/x/broadcasts.d.ts +3 -131
  95. package/resources/x/broadcasts.d.ts.map +1 -1
  96. package/resources/x/communities/communities.d.mts +92 -1
  97. package/resources/x/communities/communities.d.mts.map +1 -1
  98. package/resources/x/communities/communities.d.ts +92 -1
  99. package/resources/x/communities/communities.d.ts.map +1 -1
  100. package/resources/x/communities/communities.js +14 -0
  101. package/resources/x/communities/communities.js.map +1 -1
  102. package/resources/x/communities/communities.mjs +14 -0
  103. package/resources/x/communities/communities.mjs.map +1 -1
  104. package/resources/x/communities/index.d.mts +1 -1
  105. package/resources/x/communities/index.d.mts.map +1 -1
  106. package/resources/x/communities/index.d.ts +1 -1
  107. package/resources/x/communities/index.d.ts.map +1 -1
  108. package/resources/x/communities/index.js.map +1 -1
  109. package/resources/x/communities/index.mjs.map +1 -1
  110. package/resources/x/community-notes.d.mts +122 -510
  111. package/resources/x/community-notes.d.mts.map +1 -1
  112. package/resources/x/community-notes.d.ts +122 -510
  113. package/resources/x/community-notes.d.ts.map +1 -1
  114. package/resources/x/community-notes.js.map +1 -1
  115. package/resources/x/community-notes.mjs.map +1 -1
  116. package/resources/x/index.d.mts +7 -6
  117. package/resources/x/index.d.mts.map +1 -1
  118. package/resources/x/index.d.ts +7 -6
  119. package/resources/x/index.d.ts.map +1 -1
  120. package/resources/x/index.js +3 -1
  121. package/resources/x/index.js.map +1 -1
  122. package/resources/x/index.mjs +1 -0
  123. package/resources/x/index.mjs.map +1 -1
  124. package/resources/x/jobs.d.mts +144 -291
  125. package/resources/x/jobs.d.mts.map +1 -1
  126. package/resources/x/jobs.d.ts +144 -291
  127. package/resources/x/jobs.d.ts.map +1 -1
  128. package/resources/x/jobs.js.map +1 -1
  129. package/resources/x/jobs.mjs.map +1 -1
  130. package/resources/x/lists.d.mts +21 -419
  131. package/resources/x/lists.d.mts.map +1 -1
  132. package/resources/x/lists.d.ts +21 -419
  133. package/resources/x/lists.d.ts.map +1 -1
  134. package/resources/x/spaces.d.mts +213 -693
  135. package/resources/x/spaces.d.mts.map +1 -1
  136. package/resources/x/spaces.d.ts +213 -693
  137. package/resources/x/spaces.d.ts.map +1 -1
  138. package/resources/x/spaces.js.map +1 -1
  139. package/resources/x/spaces.mjs.map +1 -1
  140. package/resources/x/sports.d.mts +1349 -0
  141. package/resources/x/sports.d.mts.map +1 -0
  142. package/resources/x/sports.d.ts +1349 -0
  143. package/resources/x/sports.d.ts.map +1 -0
  144. package/resources/x/sports.js +76 -0
  145. package/resources/x/sports.js.map +1 -0
  146. package/resources/x/sports.mjs +72 -0
  147. package/resources/x/sports.mjs.map +1 -0
  148. package/resources/x/tweets/tweets.d.mts +11 -13
  149. package/resources/x/tweets/tweets.d.mts.map +1 -1
  150. package/resources/x/tweets/tweets.d.ts +11 -13
  151. package/resources/x/tweets/tweets.d.ts.map +1 -1
  152. package/resources/x/users/users.d.mts +29 -585
  153. package/resources/x/users/users.d.mts.map +1 -1
  154. package/resources/x/users/users.d.ts +29 -585
  155. package/resources/x/users/users.d.ts.map +1 -1
  156. package/resources/x/users/users.js.map +1 -1
  157. package/resources/x/users/users.mjs.map +1 -1
  158. package/resources/x/x.d.mts +55 -118
  159. package/resources/x/x.d.mts.map +1 -1
  160. package/resources/x/x.d.ts +55 -118
  161. package/resources/x/x.d.ts.map +1 -1
  162. package/resources/x/x.js +4 -0
  163. package/resources/x/x.js.map +1 -1
  164. package/resources/x/x.mjs +4 -0
  165. package/resources/x/x.mjs.map +1 -1
  166. package/skills/x-twitter-scraper/references/api-endpoints-x-api.md +1 -0
  167. package/src/client.ts +8 -0
  168. package/src/internal/detect-platform.ts +2 -2
  169. package/src/resources/events.ts +72 -10
  170. package/src/resources/index.ts +1 -0
  171. package/src/resources/monitors/index.ts +21 -0
  172. package/src/resources/monitors/keywords.ts +10 -118
  173. package/src/resources/monitors/monitors.ts +46 -0
  174. package/src/resources/monitors/posts.ts +463 -0
  175. package/src/resources/shared.ts +773 -200
  176. package/src/resources/support/index.ts +1 -0
  177. package/src/resources/support/support.ts +2 -0
  178. package/src/resources/support/tickets.ts +14 -21
  179. package/src/resources/webhooks.ts +5 -4
  180. package/src/resources/x/accounts.ts +19 -4
  181. package/src/resources/x/broadcasts.ts +3 -159
  182. package/src/resources/x/communities/communities.ts +113 -0
  183. package/src/resources/x/communities/index.ts +3 -0
  184. package/src/resources/x/community-notes.ts +137 -582
  185. package/src/resources/x/index.ts +62 -0
  186. package/src/resources/x/jobs.ts +160 -334
  187. package/src/resources/x/lists.ts +21 -493
  188. package/src/resources/x/spaces.ts +227 -817
  189. package/src/resources/x/sports.ts +1675 -0
  190. package/src/resources/x/tweets/tweets.ts +15 -15
  191. package/src/resources/x/users/users.ts +29 -693
  192. package/src/resources/x/x.ts +175 -128
  193. package/src/version.ts +1 -1
  194. package/version.d.mts +1 -1
  195. package/version.d.ts +1 -1
  196. package/version.js +1 -1
  197. package/version.mjs +1 -1
  198. package/src/lib/.keep +0 -2
@@ -82,7 +82,7 @@ export declare class Users extends APIResource {
82
82
  * );
83
83
  * ```
84
84
  */
85
- retrieveFollowerIds(id: string, query?: UserRetrieveFollowerIDsParams | null | undefined, options?: RequestOptions): APIPromise<UserRetrieveFollowerIDsResponse>;
85
+ retrieveFollowerIds(id: string, query?: UserRetrieveFollowerIDsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUserIds>;
86
86
  /**
87
87
  * Returns public follower profiles for the selected user, newest first. x.com puts
88
88
  * some promoted followers first; Xquik doesn't.
@@ -127,7 +127,7 @@ export declare class Users extends APIResource {
127
127
  * );
128
128
  * ```
129
129
  */
130
- retrieveFollowingIds(id: string, query?: UserRetrieveFollowingIDsParams | null | undefined, options?: RequestOptions): APIPromise<UserRetrieveFollowingIDsResponse>;
130
+ retrieveFollowingIds(id: string, query?: UserRetrieveFollowingIDsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedUserIds>;
131
131
  /**
132
132
  * Returns the posts on the user's Highlights tab, in X's order. An account without
133
133
  * highlights returns an empty list.
@@ -175,7 +175,7 @@ export declare class Users extends APIResource {
175
175
  * await client.x.users.retrieveListMemberships('id');
176
176
  * ```
177
177
  */
178
- retrieveListMemberships(id: string, query?: UserRetrieveListMembershipsParams | null | undefined, options?: RequestOptions): APIPromise<UserRetrieveListMembershipsResponse>;
178
+ retrieveListMemberships(id: string, query?: UserRetrieveListMembershipsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedLists>;
179
179
  /**
180
180
  * Returns the public X Lists the selected user created, in X's order, as the
181
181
  * profile's Lists tab shows them. Each List costs 1 credit. A protected account
@@ -186,7 +186,7 @@ export declare class Users extends APIResource {
186
186
  * const response = await client.x.users.retrieveLists('id');
187
187
  * ```
188
188
  */
189
- retrieveLists(id: string, query?: UserRetrieveListsParams | null | undefined, options?: RequestOptions): APIPromise<UserRetrieveListsResponse>;
189
+ retrieveLists(id: string, query?: UserRetrieveListsParams | null | undefined, options?: RequestOptions): APIPromise<Shared.PaginatedLists>;
190
190
  /**
191
191
  * Says whether one user is broadcasting live video on X right now, with their
192
192
  * latest broadcast, live or ended. Each check costs 1 credit.
@@ -554,18 +554,7 @@ export interface UserRetrieveBatchTweetsResponse {
554
554
  */
555
555
  unprocessed_ids: Array<string>;
556
556
  }
557
- /**
558
- * A page of user IDs without profiles. Follow next_cursor while the response
559
- * reports more pages.
560
- */
561
- export interface UserRetrieveFollowerIDsResponse {
562
- has_next_page: boolean;
563
- /**
564
- * X user IDs, newest relationship first.
565
- */
566
- ids: Array<string>;
567
- next_cursor: string;
568
- }
557
+ export type UserRetrieveFollowerIDsResponse = Shared.PaginatedUserIds;
569
558
  /**
570
559
  * A standard or terminal maximum-coverage relationship page.
571
560
  */
@@ -740,18 +729,7 @@ export declare namespace UserRetrieveFollowingResponse {
740
729
  }
741
730
  }
742
731
  }
743
- /**
744
- * A page of user IDs without profiles. Follow next_cursor while the response
745
- * reports more pages.
746
- */
747
- export interface UserRetrieveFollowingIDsResponse {
748
- has_next_page: boolean;
749
- /**
750
- * X user IDs, newest relationship first.
751
- */
752
- ids: Array<string>;
753
- next_cursor: string;
754
- }
732
+ export type UserRetrieveFollowingIDsResponse = Shared.PaginatedUserIds;
755
733
  export interface UserRetrieveInsightsResponse {
756
734
  /**
757
735
  * Engagement insights of one profile. Engagements are likes, replies, reposts and
@@ -878,453 +856,47 @@ export declare namespace UserRetrieveInsightsResponse {
878
856
  }
879
857
  }
880
858
  }
881
- /**
882
- * One page of public X Lists. Follow next_cursor while the response reports more
883
- * pages. Each returned List costs 1 credit.
884
- */
885
- export interface UserRetrieveListMembershipsResponse {
886
- has_next_page: boolean;
887
- lists: Array<UserRetrieveListMembershipsResponse.List>;
888
- next_cursor: string;
889
- }
859
+ export type UserRetrieveListMembershipsResponse = Shared.PaginatedLists;
890
860
  export declare namespace UserRetrieveListMembershipsResponse {
891
- /**
892
- * Public X List with its owner's public profile. Leaves out what X tells the
893
- * reading account, such as whether it follows the List.
894
- */
895
- interface List {
896
- /**
897
- * Numeric ID of the List.
898
- */
899
- id: string;
900
- /**
901
- * Name the owner gave the List.
902
- */
903
- name: string;
904
- /**
905
- * URL of the banner the owner uploaded. Absent when the owner uploaded none.
906
- */
907
- bannerUrl?: string;
908
- /**
909
- * When the owner made the List.
910
- */
911
- createdAt?: string;
912
- /**
913
- * Banner the owner uploaded.
914
- */
915
- customBanner?: List.CustomBanner;
916
- /**
917
- * Banner X shows when the owner uploaded none. X picks it per reading account, so
918
- * 2 calls can return different ones.
919
- */
920
- defaultBanner?: List.DefaultBanner;
921
- /**
922
- * About text of the List. Empty when the owner wrote none.
923
- */
924
- description?: string;
925
- /**
926
- * Avatar URLs of a few List members, which X may pick per request.
927
- */
928
- facepileUrls?: Array<string>;
929
- /**
930
- * Accounts on the List.
931
- */
932
- memberCount?: number;
933
- /**
934
- * Member count as X words it, such as 35 members.
935
- */
936
- membersContext?: string;
937
- /**
938
- * Public profile of the account that owns the List.
939
- */
940
- owner?: Shared.UserProfile;
941
- /**
942
- * Accounts that follow the List, which X calls followers.
943
- */
944
- subscriberCount?: number;
945
- /**
946
- * List page on x.com.
947
- */
948
- url?: string;
949
- }
861
+ type List = Shared.XList;
950
862
  namespace List {
951
- /**
952
- * Banner the owner uploaded.
953
- */
954
- interface CustomBanner {
955
- /**
956
- * Banner image URL.
957
- */
958
- url: string;
959
- /**
960
- * Banner height in pixels.
961
- */
962
- height?: number;
963
- /**
964
- * Media ID of an uploaded banner.
965
- */
966
- mediaId?: string;
967
- /**
968
- * Stable media key of an uploaded banner.
969
- */
970
- mediaKey?: string;
971
- /**
972
- * Dominant colors of an uploaded banner and their shares.
973
- */
974
- palette?: Array<CustomBanner.Palette>;
975
- /**
976
- * Area X marks as the subject of the banner, in pixels.
977
- */
978
- salientRect?: CustomBanner.SalientRect;
979
- /**
980
- * Banner width in pixels.
981
- */
982
- width?: number;
983
- }
863
+ type CustomBanner = Shared.XListBanner;
984
864
  namespace CustomBanner {
985
- interface Palette {
986
- /**
987
- * Share of the banner
988
- */
989
- percentage?: number;
990
- /**
991
- * The color's red, green and blue values.
992
- */
993
- rgb?: Palette.Rgb;
994
- }
865
+ type Palette = Shared.XListBanner.Palette;
995
866
  namespace Palette {
996
- /**
997
- * The color's red, green and blue values.
998
- */
999
- interface Rgb {
1000
- blue?: number;
1001
- green?: number;
1002
- red?: number;
1003
- }
1004
- }
1005
- /**
1006
- * Area X marks as the subject of the banner, in pixels.
1007
- */
1008
- interface SalientRect {
1009
- /**
1010
- * Height of the marked area.
1011
- */
1012
- height?: number;
1013
- /**
1014
- * Pixels from the banner's left.
1015
- */
1016
- left?: number;
1017
- /**
1018
- * Pixels from the banner's top.
1019
- */
1020
- top?: number;
1021
- /**
1022
- * Width of the marked area.
1023
- */
1024
- width?: number;
867
+ type Rgb = Shared.XListBanner.Palette.Rgb;
1025
868
  }
869
+ type SalientRect = Shared.XListBanner.SalientRect;
1026
870
  }
1027
- /**
1028
- * Banner X shows when the owner uploaded none. X picks it per reading account, so
1029
- * 2 calls can return different ones.
1030
- */
1031
- interface DefaultBanner {
1032
- /**
1033
- * Banner image URL.
1034
- */
1035
- url: string;
1036
- /**
1037
- * Banner height in pixels.
1038
- */
1039
- height?: number;
1040
- /**
1041
- * Media ID of an uploaded banner.
1042
- */
1043
- mediaId?: string;
1044
- /**
1045
- * Stable media key of an uploaded banner.
1046
- */
1047
- mediaKey?: string;
1048
- /**
1049
- * Dominant colors of an uploaded banner and their shares.
1050
- */
1051
- palette?: Array<DefaultBanner.Palette>;
1052
- /**
1053
- * Area X marks as the subject of the banner, in pixels.
1054
- */
1055
- salientRect?: DefaultBanner.SalientRect;
1056
- /**
1057
- * Banner width in pixels.
1058
- */
1059
- width?: number;
1060
- }
871
+ type DefaultBanner = Shared.XListBanner;
1061
872
  namespace DefaultBanner {
1062
- interface Palette {
1063
- /**
1064
- * Share of the banner
1065
- */
1066
- percentage?: number;
1067
- /**
1068
- * The color's red, green and blue values.
1069
- */
1070
- rgb?: Palette.Rgb;
1071
- }
873
+ type Palette = Shared.XListBanner.Palette;
1072
874
  namespace Palette {
1073
- /**
1074
- * The color's red, green and blue values.
1075
- */
1076
- interface Rgb {
1077
- blue?: number;
1078
- green?: number;
1079
- red?: number;
1080
- }
1081
- }
1082
- /**
1083
- * Area X marks as the subject of the banner, in pixels.
1084
- */
1085
- interface SalientRect {
1086
- /**
1087
- * Height of the marked area.
1088
- */
1089
- height?: number;
1090
- /**
1091
- * Pixels from the banner's left.
1092
- */
1093
- left?: number;
1094
- /**
1095
- * Pixels from the banner's top.
1096
- */
1097
- top?: number;
1098
- /**
1099
- * Width of the marked area.
1100
- */
1101
- width?: number;
875
+ type Rgb = Shared.XListBanner.Palette.Rgb;
1102
876
  }
877
+ type SalientRect = Shared.XListBanner.SalientRect;
1103
878
  }
1104
879
  }
1105
880
  }
1106
- /**
1107
- * One page of public X Lists. Follow next_cursor while the response reports more
1108
- * pages. Each returned List costs 1 credit.
1109
- */
1110
- export interface UserRetrieveListsResponse {
1111
- has_next_page: boolean;
1112
- lists: Array<UserRetrieveListsResponse.List>;
1113
- next_cursor: string;
1114
- }
881
+ export type UserRetrieveListsResponse = Shared.PaginatedLists;
1115
882
  export declare namespace UserRetrieveListsResponse {
1116
- /**
1117
- * Public X List with its owner's public profile. Leaves out what X tells the
1118
- * reading account, such as whether it follows the List.
1119
- */
1120
- interface List {
1121
- /**
1122
- * Numeric ID of the List.
1123
- */
1124
- id: string;
1125
- /**
1126
- * Name the owner gave the List.
1127
- */
1128
- name: string;
1129
- /**
1130
- * URL of the banner the owner uploaded. Absent when the owner uploaded none.
1131
- */
1132
- bannerUrl?: string;
1133
- /**
1134
- * When the owner made the List.
1135
- */
1136
- createdAt?: string;
1137
- /**
1138
- * Banner the owner uploaded.
1139
- */
1140
- customBanner?: List.CustomBanner;
1141
- /**
1142
- * Banner X shows when the owner uploaded none. X picks it per reading account, so
1143
- * 2 calls can return different ones.
1144
- */
1145
- defaultBanner?: List.DefaultBanner;
1146
- /**
1147
- * About text of the List. Empty when the owner wrote none.
1148
- */
1149
- description?: string;
1150
- /**
1151
- * Avatar URLs of a few List members, which X may pick per request.
1152
- */
1153
- facepileUrls?: Array<string>;
1154
- /**
1155
- * Accounts on the List.
1156
- */
1157
- memberCount?: number;
1158
- /**
1159
- * Member count as X words it, such as 35 members.
1160
- */
1161
- membersContext?: string;
1162
- /**
1163
- * Public profile of the account that owns the List.
1164
- */
1165
- owner?: Shared.UserProfile;
1166
- /**
1167
- * Accounts that follow the List, which X calls followers.
1168
- */
1169
- subscriberCount?: number;
1170
- /**
1171
- * List page on x.com.
1172
- */
1173
- url?: string;
1174
- }
883
+ type List = Shared.XList;
1175
884
  namespace List {
1176
- /**
1177
- * Banner the owner uploaded.
1178
- */
1179
- interface CustomBanner {
1180
- /**
1181
- * Banner image URL.
1182
- */
1183
- url: string;
1184
- /**
1185
- * Banner height in pixels.
1186
- */
1187
- height?: number;
1188
- /**
1189
- * Media ID of an uploaded banner.
1190
- */
1191
- mediaId?: string;
1192
- /**
1193
- * Stable media key of an uploaded banner.
1194
- */
1195
- mediaKey?: string;
1196
- /**
1197
- * Dominant colors of an uploaded banner and their shares.
1198
- */
1199
- palette?: Array<CustomBanner.Palette>;
1200
- /**
1201
- * Area X marks as the subject of the banner, in pixels.
1202
- */
1203
- salientRect?: CustomBanner.SalientRect;
1204
- /**
1205
- * Banner width in pixels.
1206
- */
1207
- width?: number;
1208
- }
885
+ type CustomBanner = Shared.XListBanner;
1209
886
  namespace CustomBanner {
1210
- interface Palette {
1211
- /**
1212
- * Share of the banner
1213
- */
1214
- percentage?: number;
1215
- /**
1216
- * The color's red, green and blue values.
1217
- */
1218
- rgb?: Palette.Rgb;
1219
- }
887
+ type Palette = Shared.XListBanner.Palette;
1220
888
  namespace Palette {
1221
- /**
1222
- * The color's red, green and blue values.
1223
- */
1224
- interface Rgb {
1225
- blue?: number;
1226
- green?: number;
1227
- red?: number;
1228
- }
1229
- }
1230
- /**
1231
- * Area X marks as the subject of the banner, in pixels.
1232
- */
1233
- interface SalientRect {
1234
- /**
1235
- * Height of the marked area.
1236
- */
1237
- height?: number;
1238
- /**
1239
- * Pixels from the banner's left.
1240
- */
1241
- left?: number;
1242
- /**
1243
- * Pixels from the banner's top.
1244
- */
1245
- top?: number;
1246
- /**
1247
- * Width of the marked area.
1248
- */
1249
- width?: number;
889
+ type Rgb = Shared.XListBanner.Palette.Rgb;
1250
890
  }
891
+ type SalientRect = Shared.XListBanner.SalientRect;
1251
892
  }
1252
- /**
1253
- * Banner X shows when the owner uploaded none. X picks it per reading account, so
1254
- * 2 calls can return different ones.
1255
- */
1256
- interface DefaultBanner {
1257
- /**
1258
- * Banner image URL.
1259
- */
1260
- url: string;
1261
- /**
1262
- * Banner height in pixels.
1263
- */
1264
- height?: number;
1265
- /**
1266
- * Media ID of an uploaded banner.
1267
- */
1268
- mediaId?: string;
1269
- /**
1270
- * Stable media key of an uploaded banner.
1271
- */
1272
- mediaKey?: string;
1273
- /**
1274
- * Dominant colors of an uploaded banner and their shares.
1275
- */
1276
- palette?: Array<DefaultBanner.Palette>;
1277
- /**
1278
- * Area X marks as the subject of the banner, in pixels.
1279
- */
1280
- salientRect?: DefaultBanner.SalientRect;
1281
- /**
1282
- * Banner width in pixels.
1283
- */
1284
- width?: number;
1285
- }
893
+ type DefaultBanner = Shared.XListBanner;
1286
894
  namespace DefaultBanner {
1287
- interface Palette {
1288
- /**
1289
- * Share of the banner
1290
- */
1291
- percentage?: number;
1292
- /**
1293
- * The color's red, green and blue values.
1294
- */
1295
- rgb?: Palette.Rgb;
1296
- }
895
+ type Palette = Shared.XListBanner.Palette;
1297
896
  namespace Palette {
1298
- /**
1299
- * The color's red, green and blue values.
1300
- */
1301
- interface Rgb {
1302
- blue?: number;
1303
- green?: number;
1304
- red?: number;
1305
- }
1306
- }
1307
- /**
1308
- * Area X marks as the subject of the banner, in pixels.
1309
- */
1310
- interface SalientRect {
1311
- /**
1312
- * Height of the marked area.
1313
- */
1314
- height?: number;
1315
- /**
1316
- * Pixels from the banner's left.
1317
- */
1318
- left?: number;
1319
- /**
1320
- * Pixels from the banner's top.
1321
- */
1322
- top?: number;
1323
- /**
1324
- * Width of the marked area.
1325
- */
1326
- width?: number;
897
+ type Rgb = Shared.XListBanner.Palette.Rgb;
1327
898
  }
899
+ type SalientRect = Shared.XListBanner.SalientRect;
1328
900
  }
1329
901
  }
1330
902
  }
@@ -1336,7 +908,7 @@ export interface UserRetrieveLiveResponse {
1336
908
  /**
1337
909
  * Latest broadcast, live or ended. Null when X shows none.
1338
910
  */
1339
- broadcast: UserRetrieveLiveResponse.Broadcast | null;
911
+ broadcast: Shared.Broadcast | null;
1340
912
  /**
1341
913
  * True while the user's latest broadcast is running.
1342
914
  */
@@ -1351,137 +923,9 @@ export interface UserRetrieveLiveResponse {
1351
923
  userName: string;
1352
924
  }
1353
925
  export declare namespace UserRetrieveLiveResponse {
1354
- /**
1355
- * X broadcast, a live video
1356
- */
1357
- interface Broadcast {
1358
- /**
1359
- * Broadcast ID
1360
- */
1361
- id: string;
1362
- /**
1363
- * Camera rotation in degrees
1364
- */
1365
- cameraRotation?: number;
1366
- /**
1367
- * X's code for who may chat
1368
- */
1369
- chatOption?: number;
1370
- /**
1371
- * Public X profile.
1372
- */
1373
- creator?: Shared.UserProfile;
1374
- /**
1375
- * When the broadcast ended
1376
- */
1377
- endedAt?: string;
1378
- /**
1379
- * Video height in pixels
1380
- */
1381
- height?: number;
1382
- /**
1383
- * Whether X offers a recording of the broadcast
1384
- */
1385
- isAvailableForReplay?: boolean;
1386
- /**
1387
- * Whether the video stream runs in high-latency mode
1388
- */
1389
- isHighLatency?: boolean;
1390
- /**
1391
- * Whether X marks the chat private
1392
- */
1393
- isPrivateChat?: boolean;
1394
- /**
1395
- * Whether the broadcaster edited the title of the replay
1396
- */
1397
- isTitleEdited?: boolean;
1398
- /**
1399
- * When the video stream last reached X
1400
- */
1401
- lastPingAt?: string;
1402
- /**
1403
- * X's media key for the video
1404
- */
1405
- mediaKey?: string;
1406
- /**
1407
- * Broadcaster, as X's live video service names the account
1408
- */
1409
- periscopeUser?: Broadcast.PeriscopeUser;
1410
- /**
1411
- * Image X shows before the broadcast starts
1412
- */
1413
- preLiveSlateUrl?: string;
1414
- /**
1415
- * When the broadcast was set to start
1416
- */
1417
- scheduledStart?: string;
1418
- /**
1419
- * What produced the video stream, as X names it
1420
- */
1421
- source?: string;
1422
- /**
1423
- * When the broadcast went live
1424
- */
1425
- startedAt?: string;
1426
- /**
1427
- * Such as NotStarted, Running or Ended, as X names it
1428
- */
1429
- state?: string;
1430
- /**
1431
- * Broadcast title
1432
- */
1433
- title?: string;
1434
- /**
1435
- * Accounts that watched, live or after
1436
- */
1437
- totalWatched?: number;
1438
- /**
1439
- * Accounts watching, as X counts them
1440
- */
1441
- totalWatching?: number;
1442
- /**
1443
- * Search tweet with author. Zero metrics may mean X omitted counts.
1444
- */
1445
- tweet?: Shared.SearchTweet;
1446
- /**
1447
- * ID of the post that announces the broadcast
1448
- */
1449
- tweetId?: string;
1450
- /**
1451
- * X's revision number of the broadcast
1452
- */
1453
- version?: number;
1454
- /**
1455
- * Video width in pixels
1456
- */
1457
- width?: number;
1458
- }
926
+ type Broadcast = Shared.Broadcast;
1459
927
  namespace Broadcast {
1460
- /**
1461
- * Broadcaster, as X's live video service names the account
1462
- */
1463
- interface PeriscopeUser {
1464
- /**
1465
- * Live video account ID
1466
- */
1467
- id?: string;
1468
- /**
1469
- * Live video display name
1470
- */
1471
- displayName?: string;
1472
- /**
1473
- * Live video avatar URL
1474
- */
1475
- profilePicture?: string;
1476
- /**
1477
- * The broadcaster's avatar at full size
1478
- */
1479
- profilePictureOriginal?: string;
1480
- /**
1481
- * Live video username
1482
- */
1483
- username?: string;
1484
- }
928
+ type PeriscopeUser = Shared.Broadcast.PeriscopeUser;
1485
929
  }
1486
930
  }
1487
931
  /**