xdk 0.1.0__tar.gz

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 (303) hide show
  1. xdk-0.1.0/.gitignore +4 -0
  2. xdk-0.1.0/PKG-INFO +80 -0
  3. xdk-0.1.0/README.md +53 -0
  4. xdk-0.1.0/pyproject.toml +73 -0
  5. xdk-0.1.0/tests/__init__.py +0 -0
  6. xdk-0.1.0/tests/aaasubscriptions/__init__.py +0 -0
  7. xdk-0.1.0/tests/aaasubscriptions/test_contracts.py +131 -0
  8. xdk-0.1.0/tests/aaasubscriptions/test_generic.py +125 -0
  9. xdk-0.1.0/tests/aaasubscriptions/test_structure.py +88 -0
  10. xdk-0.1.0/tests/account_activity/__init__.py +0 -0
  11. xdk-0.1.0/tests/account_activity/test_contracts.py +501 -0
  12. xdk-0.1.0/tests/account_activity/test_generic.py +125 -0
  13. xdk-0.1.0/tests/account_activity/test_structure.py +297 -0
  14. xdk-0.1.0/tests/bookmarks/__init__.py +0 -0
  15. xdk-0.1.0/tests/bookmarks/test_contracts.py +465 -0
  16. xdk-0.1.0/tests/bookmarks/test_generic.py +123 -0
  17. xdk-0.1.0/tests/bookmarks/test_pagination.py +352 -0
  18. xdk-0.1.0/tests/bookmarks/test_structure.py +324 -0
  19. xdk-0.1.0/tests/communities/__init__.py +0 -0
  20. xdk-0.1.0/tests/communities/test_contracts.py +194 -0
  21. xdk-0.1.0/tests/communities/test_generic.py +124 -0
  22. xdk-0.1.0/tests/communities/test_pagination.py +210 -0
  23. xdk-0.1.0/tests/communities/test_structure.py +157 -0
  24. xdk-0.1.0/tests/community_notes/__init__.py +0 -0
  25. xdk-0.1.0/tests/community_notes/test_contracts.py +372 -0
  26. xdk-0.1.0/tests/community_notes/test_generic.py +125 -0
  27. xdk-0.1.0/tests/community_notes/test_pagination.py +352 -0
  28. xdk-0.1.0/tests/community_notes/test_structure.py +268 -0
  29. xdk-0.1.0/tests/compliance/__init__.py +0 -0
  30. xdk-0.1.0/tests/compliance/test_contracts.py +621 -0
  31. xdk-0.1.0/tests/compliance/test_generic.py +124 -0
  32. xdk-0.1.0/tests/compliance/test_structure.py +386 -0
  33. xdk-0.1.0/tests/conftest.py +21 -0
  34. xdk-0.1.0/tests/connection/__init__.py +0 -0
  35. xdk-0.1.0/tests/connection/test_contracts.py +107 -0
  36. xdk-0.1.0/tests/connection/test_generic.py +124 -0
  37. xdk-0.1.0/tests/connection/test_structure.py +84 -0
  38. xdk-0.1.0/tests/direct_messages/__init__.py +0 -0
  39. xdk-0.1.0/tests/direct_messages/test_contracts.py +748 -0
  40. xdk-0.1.0/tests/direct_messages/test_generic.py +125 -0
  41. xdk-0.1.0/tests/direct_messages/test_pagination.py +512 -0
  42. xdk-0.1.0/tests/direct_messages/test_structure.py +487 -0
  43. xdk-0.1.0/tests/general/__init__.py +0 -0
  44. xdk-0.1.0/tests/general/test_contracts.py +97 -0
  45. xdk-0.1.0/tests/general/test_generic.py +122 -0
  46. xdk-0.1.0/tests/general/test_structure.py +84 -0
  47. xdk-0.1.0/tests/likes/__init__.py +0 -0
  48. xdk-0.1.0/tests/likes/test_contracts.py +194 -0
  49. xdk-0.1.0/tests/likes/test_generic.py +122 -0
  50. xdk-0.1.0/tests/likes/test_structure.py +142 -0
  51. xdk-0.1.0/tests/lists/__init__.py +0 -0
  52. xdk-0.1.0/tests/lists/test_contracts.py +1260 -0
  53. xdk-0.1.0/tests/lists/test_generic.py +122 -0
  54. xdk-0.1.0/tests/lists/test_pagination.py +494 -0
  55. xdk-0.1.0/tests/lists/test_structure.py +749 -0
  56. xdk-0.1.0/tests/media/__init__.py +0 -0
  57. xdk-0.1.0/tests/media/test_contracts.py +1003 -0
  58. xdk-0.1.0/tests/media/test_generic.py +122 -0
  59. xdk-0.1.0/tests/media/test_structure.py +557 -0
  60. xdk-0.1.0/tests/spaces/__init__.py +0 -0
  61. xdk-0.1.0/tests/spaces/test_contracts.py +534 -0
  62. xdk-0.1.0/tests/spaces/test_generic.py +122 -0
  63. xdk-0.1.0/tests/spaces/test_pagination.py +210 -0
  64. xdk-0.1.0/tests/spaces/test_structure.py +351 -0
  65. xdk-0.1.0/tests/stream/__init__.py +0 -0
  66. xdk-0.1.0/tests/stream/test_contracts.py +1463 -0
  67. xdk-0.1.0/tests/stream/test_generic.py +122 -0
  68. xdk-0.1.0/tests/stream/test_pagination.py +210 -0
  69. xdk-0.1.0/tests/stream/test_structure.py +908 -0
  70. xdk-0.1.0/tests/trends/__init__.py +0 -0
  71. xdk-0.1.0/tests/trends/test_contracts.py +194 -0
  72. xdk-0.1.0/tests/trends/test_generic.py +122 -0
  73. xdk-0.1.0/tests/trends/test_structure.py +134 -0
  74. xdk-0.1.0/tests/tweets/__init__.py +0 -0
  75. xdk-0.1.0/tests/tweets/test_contracts.py +3134 -0
  76. xdk-0.1.0/tests/tweets/test_generic.py +122 -0
  77. xdk-0.1.0/tests/tweets/test_pagination.py +1630 -0
  78. xdk-0.1.0/tests/tweets/test_structure.py +2052 -0
  79. xdk-0.1.0/tests/usage/__init__.py +0 -0
  80. xdk-0.1.0/tests/usage/test_contracts.py +107 -0
  81. xdk-0.1.0/tests/usage/test_generic.py +122 -0
  82. xdk-0.1.0/tests/usage/test_structure.py +82 -0
  83. xdk-0.1.0/tests/users/__init__.py +0 -0
  84. xdk-0.1.0/tests/users/test_contracts.py +1825 -0
  85. xdk-0.1.0/tests/users/test_generic.py +122 -0
  86. xdk-0.1.0/tests/users/test_pagination.py +1488 -0
  87. xdk-0.1.0/tests/users/test_structure.py +1240 -0
  88. xdk-0.1.0/tests/webhooks/__init__.py +0 -0
  89. xdk-0.1.0/tests/webhooks/test_contracts.py +368 -0
  90. xdk-0.1.0/tests/webhooks/test_generic.py +123 -0
  91. xdk-0.1.0/tests/webhooks/test_structure.py +224 -0
  92. xdk-0.1.0/uv.lock +1093 -0
  93. xdk-0.1.0/xdk/__init__.py +11 -0
  94. xdk-0.1.0/xdk/aaasubscriptions/__init__.py +9 -0
  95. xdk-0.1.0/xdk/aaasubscriptions/client.py +75 -0
  96. xdk-0.1.0/xdk/aaasubscriptions/models.py +35 -0
  97. xdk-0.1.0/xdk/account_activity/__init__.py +9 -0
  98. xdk-0.1.0/xdk/account_activity/client.py +244 -0
  99. xdk-0.1.0/xdk/account_activity/models.py +113 -0
  100. xdk-0.1.0/xdk/bookmarks/__init__.py +9 -0
  101. xdk-0.1.0/xdk/bookmarks/client.py +302 -0
  102. xdk-0.1.0/xdk/bookmarks/models.py +133 -0
  103. xdk-0.1.0/xdk/client.py +164 -0
  104. xdk-0.1.0/xdk/communities/__init__.py +9 -0
  105. xdk-0.1.0/xdk/communities/client.py +140 -0
  106. xdk-0.1.0/xdk/communities/models.py +54 -0
  107. xdk-0.1.0/xdk/community_notes/__init__.py +9 -0
  108. xdk-0.1.0/xdk/community_notes/client.py +254 -0
  109. xdk-0.1.0/xdk/community_notes/models.py +130 -0
  110. xdk-0.1.0/xdk/compliance/__init__.py +9 -0
  111. xdk-0.1.0/xdk/compliance/client.py +371 -0
  112. xdk-0.1.0/xdk/compliance/models.py +144 -0
  113. xdk-0.1.0/xdk/connection/__init__.py +9 -0
  114. xdk-0.1.0/xdk/connection/client.py +58 -0
  115. xdk-0.1.0/xdk/connection/models.py +29 -0
  116. xdk-0.1.0/xdk/direct_messages/__init__.py +9 -0
  117. xdk-0.1.0/xdk/direct_messages/client.py +526 -0
  118. xdk-0.1.0/xdk/direct_messages/models.py +298 -0
  119. xdk-0.1.0/xdk/general/__init__.py +9 -0
  120. xdk-0.1.0/xdk/general/client.py +51 -0
  121. xdk-0.1.0/xdk/general/models.py +18 -0
  122. xdk-0.1.0/xdk/likes/__init__.py +9 -0
  123. xdk-0.1.0/xdk/likes/client.py +177 -0
  124. xdk-0.1.0/xdk/likes/models.py +85 -0
  125. xdk-0.1.0/xdk/lists/__init__.py +9 -0
  126. xdk-0.1.0/xdk/lists/client.py +772 -0
  127. xdk-0.1.0/xdk/lists/models.py +425 -0
  128. xdk-0.1.0/xdk/media/__init__.py +9 -0
  129. xdk-0.1.0/xdk/media/client.py +554 -0
  130. xdk-0.1.0/xdk/media/models.py +645 -0
  131. xdk-0.1.0/xdk/oauth2_auth.py +158 -0
  132. xdk-0.1.0/xdk/paginator.py +277 -0
  133. xdk-0.1.0/xdk/python/README.md +53 -0
  134. xdk-0.1.0/xdk/python/pyproject.toml +73 -0
  135. xdk-0.1.0/xdk/python/tests/__init__.py +0 -0
  136. xdk-0.1.0/xdk/python/tests/aaasubscriptions/__init__.py +0 -0
  137. xdk-0.1.0/xdk/python/tests/aaasubscriptions/test_contracts.py +131 -0
  138. xdk-0.1.0/xdk/python/tests/aaasubscriptions/test_generic.py +125 -0
  139. xdk-0.1.0/xdk/python/tests/aaasubscriptions/test_structure.py +88 -0
  140. xdk-0.1.0/xdk/python/tests/account_activity/__init__.py +0 -0
  141. xdk-0.1.0/xdk/python/tests/account_activity/test_contracts.py +501 -0
  142. xdk-0.1.0/xdk/python/tests/account_activity/test_generic.py +125 -0
  143. xdk-0.1.0/xdk/python/tests/account_activity/test_structure.py +297 -0
  144. xdk-0.1.0/xdk/python/tests/bookmarks/__init__.py +0 -0
  145. xdk-0.1.0/xdk/python/tests/bookmarks/test_contracts.py +465 -0
  146. xdk-0.1.0/xdk/python/tests/bookmarks/test_generic.py +123 -0
  147. xdk-0.1.0/xdk/python/tests/bookmarks/test_pagination.py +527 -0
  148. xdk-0.1.0/xdk/python/tests/bookmarks/test_structure.py +324 -0
  149. xdk-0.1.0/xdk/python/tests/communities/__init__.py +0 -0
  150. xdk-0.1.0/xdk/python/tests/communities/test_contracts.py +194 -0
  151. xdk-0.1.0/xdk/python/tests/communities/test_generic.py +124 -0
  152. xdk-0.1.0/xdk/python/tests/communities/test_pagination.py +382 -0
  153. xdk-0.1.0/xdk/python/tests/communities/test_structure.py +157 -0
  154. xdk-0.1.0/xdk/python/tests/community_notes/__init__.py +0 -0
  155. xdk-0.1.0/xdk/python/tests/community_notes/test_contracts.py +372 -0
  156. xdk-0.1.0/xdk/python/tests/community_notes/test_generic.py +125 -0
  157. xdk-0.1.0/xdk/python/tests/community_notes/test_pagination.py +527 -0
  158. xdk-0.1.0/xdk/python/tests/community_notes/test_structure.py +268 -0
  159. xdk-0.1.0/xdk/python/tests/compliance/__init__.py +0 -0
  160. xdk-0.1.0/xdk/python/tests/compliance/test_contracts.py +621 -0
  161. xdk-0.1.0/xdk/python/tests/compliance/test_generic.py +124 -0
  162. xdk-0.1.0/xdk/python/tests/compliance/test_structure.py +386 -0
  163. xdk-0.1.0/xdk/python/tests/conftest.py +21 -0
  164. xdk-0.1.0/xdk/python/tests/connection/__init__.py +0 -0
  165. xdk-0.1.0/xdk/python/tests/connection/test_contracts.py +107 -0
  166. xdk-0.1.0/xdk/python/tests/connection/test_generic.py +124 -0
  167. xdk-0.1.0/xdk/python/tests/connection/test_structure.py +84 -0
  168. xdk-0.1.0/xdk/python/tests/direct_messages/__init__.py +0 -0
  169. xdk-0.1.0/xdk/python/tests/direct_messages/test_contracts.py +748 -0
  170. xdk-0.1.0/xdk/python/tests/direct_messages/test_generic.py +125 -0
  171. xdk-0.1.0/xdk/python/tests/direct_messages/test_pagination.py +690 -0
  172. xdk-0.1.0/xdk/python/tests/direct_messages/test_structure.py +487 -0
  173. xdk-0.1.0/xdk/python/tests/general/__init__.py +0 -0
  174. xdk-0.1.0/xdk/python/tests/general/test_contracts.py +97 -0
  175. xdk-0.1.0/xdk/python/tests/general/test_generic.py +122 -0
  176. xdk-0.1.0/xdk/python/tests/general/test_structure.py +84 -0
  177. xdk-0.1.0/xdk/python/tests/likes/__init__.py +0 -0
  178. xdk-0.1.0/xdk/python/tests/likes/test_contracts.py +194 -0
  179. xdk-0.1.0/xdk/python/tests/likes/test_generic.py +122 -0
  180. xdk-0.1.0/xdk/python/tests/likes/test_structure.py +142 -0
  181. xdk-0.1.0/xdk/python/tests/lists/__init__.py +0 -0
  182. xdk-0.1.0/xdk/python/tests/lists/test_contracts.py +1260 -0
  183. xdk-0.1.0/xdk/python/tests/lists/test_generic.py +122 -0
  184. xdk-0.1.0/xdk/python/tests/lists/test_pagination.py +672 -0
  185. xdk-0.1.0/xdk/python/tests/lists/test_structure.py +749 -0
  186. xdk-0.1.0/xdk/python/tests/media/__init__.py +0 -0
  187. xdk-0.1.0/xdk/python/tests/media/test_contracts.py +1003 -0
  188. xdk-0.1.0/xdk/python/tests/media/test_generic.py +122 -0
  189. xdk-0.1.0/xdk/python/tests/media/test_structure.py +557 -0
  190. xdk-0.1.0/xdk/python/tests/spaces/__init__.py +0 -0
  191. xdk-0.1.0/xdk/python/tests/spaces/test_contracts.py +534 -0
  192. xdk-0.1.0/xdk/python/tests/spaces/test_generic.py +122 -0
  193. xdk-0.1.0/xdk/python/tests/spaces/test_pagination.py +382 -0
  194. xdk-0.1.0/xdk/python/tests/spaces/test_structure.py +351 -0
  195. xdk-0.1.0/xdk/python/tests/stream/__init__.py +0 -0
  196. xdk-0.1.0/xdk/python/tests/stream/test_contracts.py +1463 -0
  197. xdk-0.1.0/xdk/python/tests/stream/test_generic.py +122 -0
  198. xdk-0.1.0/xdk/python/tests/stream/test_pagination.py +382 -0
  199. xdk-0.1.0/xdk/python/tests/stream/test_structure.py +908 -0
  200. xdk-0.1.0/xdk/python/tests/trends/__init__.py +0 -0
  201. xdk-0.1.0/xdk/python/tests/trends/test_contracts.py +194 -0
  202. xdk-0.1.0/xdk/python/tests/trends/test_generic.py +122 -0
  203. xdk-0.1.0/xdk/python/tests/trends/test_structure.py +134 -0
  204. xdk-0.1.0/xdk/python/tests/tweets/__init__.py +0 -0
  205. xdk-0.1.0/xdk/python/tests/tweets/test_contracts.py +3134 -0
  206. xdk-0.1.0/xdk/python/tests/tweets/test_generic.py +122 -0
  207. xdk-0.1.0/xdk/python/tests/tweets/test_pagination.py +1832 -0
  208. xdk-0.1.0/xdk/python/tests/tweets/test_structure.py +2052 -0
  209. xdk-0.1.0/xdk/python/tests/usage/__init__.py +0 -0
  210. xdk-0.1.0/xdk/python/tests/usage/test_contracts.py +107 -0
  211. xdk-0.1.0/xdk/python/tests/usage/test_generic.py +122 -0
  212. xdk-0.1.0/xdk/python/tests/usage/test_structure.py +82 -0
  213. xdk-0.1.0/xdk/python/tests/users/__init__.py +0 -0
  214. xdk-0.1.0/xdk/python/tests/users/test_contracts.py +1825 -0
  215. xdk-0.1.0/xdk/python/tests/users/test_generic.py +122 -0
  216. xdk-0.1.0/xdk/python/tests/users/test_pagination.py +1687 -0
  217. xdk-0.1.0/xdk/python/tests/users/test_structure.py +1240 -0
  218. xdk-0.1.0/xdk/python/tests/webhooks/__init__.py +0 -0
  219. xdk-0.1.0/xdk/python/tests/webhooks/test_contracts.py +368 -0
  220. xdk-0.1.0/xdk/python/tests/webhooks/test_generic.py +123 -0
  221. xdk-0.1.0/xdk/python/tests/webhooks/test_structure.py +224 -0
  222. xdk-0.1.0/xdk/python/xdk/__init__.py +11 -0
  223. xdk-0.1.0/xdk/python/xdk/aaasubscriptions/__init__.py +9 -0
  224. xdk-0.1.0/xdk/python/xdk/aaasubscriptions/client.py +75 -0
  225. xdk-0.1.0/xdk/python/xdk/aaasubscriptions/models.py +44 -0
  226. xdk-0.1.0/xdk/python/xdk/account_activity/__init__.py +9 -0
  227. xdk-0.1.0/xdk/python/xdk/account_activity/client.py +244 -0
  228. xdk-0.1.0/xdk/python/xdk/account_activity/models.py +140 -0
  229. xdk-0.1.0/xdk/python/xdk/bookmarks/__init__.py +9 -0
  230. xdk-0.1.0/xdk/python/xdk/bookmarks/client.py +302 -0
  231. xdk-0.1.0/xdk/python/xdk/bookmarks/models.py +169 -0
  232. xdk-0.1.0/xdk/python/xdk/client.py +164 -0
  233. xdk-0.1.0/xdk/python/xdk/communities/__init__.py +9 -0
  234. xdk-0.1.0/xdk/python/xdk/communities/client.py +140 -0
  235. xdk-0.1.0/xdk/python/xdk/communities/models.py +66 -0
  236. xdk-0.1.0/xdk/python/xdk/community_notes/__init__.py +9 -0
  237. xdk-0.1.0/xdk/python/xdk/community_notes/client.py +254 -0
  238. xdk-0.1.0/xdk/python/xdk/community_notes/models.py +163 -0
  239. xdk-0.1.0/xdk/python/xdk/compliance/__init__.py +9 -0
  240. xdk-0.1.0/xdk/python/xdk/compliance/client.py +371 -0
  241. xdk-0.1.0/xdk/python/xdk/compliance/models.py +177 -0
  242. xdk-0.1.0/xdk/python/xdk/connection/__init__.py +9 -0
  243. xdk-0.1.0/xdk/python/xdk/connection/client.py +58 -0
  244. xdk-0.1.0/xdk/python/xdk/connection/models.py +35 -0
  245. xdk-0.1.0/xdk/python/xdk/direct_messages/__init__.py +9 -0
  246. xdk-0.1.0/xdk/python/xdk/direct_messages/client.py +526 -0
  247. xdk-0.1.0/xdk/python/xdk/direct_messages/models.py +370 -0
  248. xdk-0.1.0/xdk/python/xdk/general/__init__.py +9 -0
  249. xdk-0.1.0/xdk/python/xdk/general/client.py +51 -0
  250. xdk-0.1.0/xdk/python/xdk/general/models.py +21 -0
  251. xdk-0.1.0/xdk/python/xdk/likes/__init__.py +9 -0
  252. xdk-0.1.0/xdk/python/xdk/likes/client.py +177 -0
  253. xdk-0.1.0/xdk/python/xdk/likes/models.py +103 -0
  254. xdk-0.1.0/xdk/python/xdk/lists/__init__.py +9 -0
  255. xdk-0.1.0/xdk/python/xdk/lists/client.py +772 -0
  256. xdk-0.1.0/xdk/python/xdk/lists/models.py +539 -0
  257. xdk-0.1.0/xdk/python/xdk/media/__init__.py +9 -0
  258. xdk-0.1.0/xdk/python/xdk/media/client.py +554 -0
  259. xdk-0.1.0/xdk/python/xdk/media/models.py +822 -0
  260. xdk-0.1.0/xdk/python/xdk/oauth2_auth.py +158 -0
  261. xdk-0.1.0/xdk/python/xdk/paginator.py +277 -0
  262. xdk-0.1.0/xdk/python/xdk/spaces/__init__.py +9 -0
  263. xdk-0.1.0/xdk/python/xdk/spaces/client.py +439 -0
  264. xdk-0.1.0/xdk/python/xdk/spaces/models.py +280 -0
  265. xdk-0.1.0/xdk/python/xdk/stream/__init__.py +9 -0
  266. xdk-0.1.0/xdk/python/xdk/stream/client.py +1189 -0
  267. xdk-0.1.0/xdk/python/xdk/stream/models.py +2214 -0
  268. xdk-0.1.0/xdk/python/xdk/trends/__init__.py +9 -0
  269. xdk-0.1.0/xdk/python/xdk/trends/client.py +118 -0
  270. xdk-0.1.0/xdk/python/xdk/trends/models.py +39 -0
  271. xdk-0.1.0/xdk/python/xdk/tweets/__init__.py +9 -0
  272. xdk-0.1.0/xdk/python/xdk/tweets/client.py +2702 -0
  273. xdk-0.1.0/xdk/python/xdk/tweets/models.py +3245 -0
  274. xdk-0.1.0/xdk/python/xdk/usage/__init__.py +9 -0
  275. xdk-0.1.0/xdk/python/xdk/usage/client.py +68 -0
  276. xdk-0.1.0/xdk/python/xdk/usage/models.py +52 -0
  277. xdk-0.1.0/xdk/python/xdk/users/__init__.py +9 -0
  278. xdk-0.1.0/xdk/python/xdk/users/client.py +1293 -0
  279. xdk-0.1.0/xdk/python/xdk/users/models.py +1143 -0
  280. xdk-0.1.0/xdk/python/xdk/webhooks/__init__.py +9 -0
  281. xdk-0.1.0/xdk/python/xdk/webhooks/client.py +183 -0
  282. xdk-0.1.0/xdk/python/xdk/webhooks/models.py +116 -0
  283. xdk-0.1.0/xdk/spaces/__init__.py +9 -0
  284. xdk-0.1.0/xdk/spaces/client.py +439 -0
  285. xdk-0.1.0/xdk/spaces/models.py +229 -0
  286. xdk-0.1.0/xdk/stream/__init__.py +9 -0
  287. xdk-0.1.0/xdk/stream/client.py +1189 -0
  288. xdk-0.1.0/xdk/stream/models.py +1776 -0
  289. xdk-0.1.0/xdk/trends/__init__.py +9 -0
  290. xdk-0.1.0/xdk/trends/client.py +118 -0
  291. xdk-0.1.0/xdk/trends/models.py +33 -0
  292. xdk-0.1.0/xdk/tweets/__init__.py +9 -0
  293. xdk-0.1.0/xdk/tweets/client.py +2702 -0
  294. xdk-0.1.0/xdk/tweets/models.py +2597 -0
  295. xdk-0.1.0/xdk/usage/__init__.py +9 -0
  296. xdk-0.1.0/xdk/usage/client.py +68 -0
  297. xdk-0.1.0/xdk/usage/models.py +43 -0
  298. xdk-0.1.0/xdk/users/__init__.py +9 -0
  299. xdk-0.1.0/xdk/users/client.py +1293 -0
  300. xdk-0.1.0/xdk/users/models.py +918 -0
  301. xdk-0.1.0/xdk/webhooks/__init__.py +9 -0
  302. xdk-0.1.0/xdk/webhooks/client.py +183 -0
  303. xdk-0.1.0/xdk/webhooks/models.py +92 -0
xdk-0.1.0/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ /target
2
+ .venv/
3
+ test_output/
4
+ __pycache__/
xdk-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: xdk
3
+ Version: 0.1.0
4
+ Summary: Python SDK for the X API
5
+ Project-URL: Homepage, https://github.com/xdk/xdk-python
6
+ Project-URL: Repository, https://github.com/xdk/xdk-python
7
+ Author-email: XDK Team <info@xdk.com>
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Python: >=3.8
18
+ Requires-Dist: pydantic>=2.0.0
19
+ Requires-Dist: requests-oauthlib>=1.3.0
20
+ Requires-Dist: requests>=2.25.0
21
+ Provides-Extra: dev
22
+ Requires-Dist: black; extra == 'dev'
23
+ Requires-Dist: pytest; extra == 'dev'
24
+ Requires-Dist: pytest-cov; extra == 'dev'
25
+ Requires-Dist: ruff; extra == 'dev'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # XDK Python SDK
29
+
30
+ A Python SDK for the X API.
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ uv add xdk
36
+ ```
37
+
38
+ Or with pip:
39
+ ```bash
40
+ pip install xdk
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ ```python
46
+ from xdk import Client
47
+
48
+ # Initialize the client
49
+ client = Client(
50
+ api_key="your_api_key",
51
+ api_secret="your_api_secret",
52
+ access_token="your_access_token",
53
+ access_token_secret="your_access_token_secret"
54
+ )
55
+
56
+ # Use the client to interact with the X API
57
+ # For example, to get tweets:
58
+ tweets = client.tweets.get_tweets(ids=["1234567890"])
59
+
60
+ # To search for tweets:
61
+ search_results = client.tweets.tweets_recent_search(query="python")
62
+
63
+ # To post a tweet:
64
+ tweet = client.tweets.post_tweets(tweet_data={"text": "Hello, world!"})
65
+ ```
66
+
67
+ ## Features
68
+
69
+ - Full support for the X API v2
70
+ - Simple and intuitive interface
71
+ - Comprehensive documentation
72
+ - Type hints for better IDE support
73
+
74
+ ## Documentation
75
+
76
+ For more information, see the [documentation](https://xdk.com/docs/python).
77
+
78
+ ## License
79
+
80
+ This project is licensed under the MIT License - see the LICENSE file for details.
xdk-0.1.0/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # XDK Python SDK
2
+
3
+ A Python SDK for the X API.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ uv add xdk
9
+ ```
10
+
11
+ Or with pip:
12
+ ```bash
13
+ pip install xdk
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```python
19
+ from xdk import Client
20
+
21
+ # Initialize the client
22
+ client = Client(
23
+ api_key="your_api_key",
24
+ api_secret="your_api_secret",
25
+ access_token="your_access_token",
26
+ access_token_secret="your_access_token_secret"
27
+ )
28
+
29
+ # Use the client to interact with the X API
30
+ # For example, to get tweets:
31
+ tweets = client.tweets.get_tweets(ids=["1234567890"])
32
+
33
+ # To search for tweets:
34
+ search_results = client.tweets.tweets_recent_search(query="python")
35
+
36
+ # To post a tweet:
37
+ tweet = client.tweets.post_tweets(tweet_data={"text": "Hello, world!"})
38
+ ```
39
+
40
+ ## Features
41
+
42
+ - Full support for the X API v2
43
+ - Simple and intuitive interface
44
+ - Comprehensive documentation
45
+ - Type hints for better IDE support
46
+
47
+ ## Documentation
48
+
49
+ For more information, see the [documentation](https://xdk.com/docs/python).
50
+
51
+ ## License
52
+
53
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,73 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "xdk"
7
+ version = "0.1.0"
8
+ description = "Python SDK for the X API"
9
+ authors = [
10
+ {name = "XDK Team", email = "info@xdk.com"},
11
+ ]
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ ]
25
+ dependencies = [
26
+ "requests>=2.25.0",
27
+ "requests-oauthlib>=1.3.0",
28
+ "pydantic>=2.0.0",
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/xdk/xdk-python"
33
+ Repository = "https://github.com/xdk/xdk-python"
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "black",
38
+ "pytest",
39
+ "pytest-cov",
40
+ "ruff",
41
+ ]
42
+
43
+ [tool.pytest.ini_options]
44
+ testpaths = ["tests"]
45
+ python_files = ["test_*.py"]
46
+ python_classes = ["Test*"]
47
+ python_functions = ["test_*"]
48
+
49
+ [tool.black]
50
+ line-length = 88
51
+ target-version = ['py38']
52
+
53
+ [tool.ruff]
54
+ target-version = "py38"
55
+ line-length = 88
56
+ select = [
57
+ "E", # pycodestyle errors
58
+ "W", # pycodestyle warnings
59
+ "F", # pyflakes
60
+ "I", # isort
61
+ "B", # flake8-bugbear
62
+ "C4", # flake8-comprehensions
63
+ "UP", # pyupgrade
64
+ ]
65
+ ignore = []
66
+
67
+ [tool.ruff.per-file-ignores]
68
+ "__init__.py" = ["F401"]
69
+
70
+ [dependency-groups]
71
+ dev = [
72
+ "pytest>=8.3.5",
73
+ ]
File without changes
File without changes
@@ -0,0 +1,131 @@
1
+ """
2
+ Auto-generated contract tests for AAASubscriptions client.
3
+
4
+ This module contains tests that validate the request/response contracts
5
+ of the AAASubscriptions client against the OpenAPI specification.
6
+
7
+ Generated automatically - do not edit manually.
8
+ """
9
+
10
+ import pytest
11
+ import json
12
+ from unittest.mock import Mock, patch
13
+ from xdk.aaasubscriptions.client import AAASubscriptionsClient
14
+ from xdk import Client
15
+
16
+
17
+ class TestAAASubscriptionsContracts:
18
+ """Test the API contracts of AAASubscriptionsClient."""
19
+
20
+
21
+ def setup_class(self):
22
+ """Set up test fixtures."""
23
+ self.client = Client(base_url="https://api.example.com")
24
+ self.aaasubscriptions_client = getattr(self.client, "aaasubscriptions")
25
+
26
+
27
+ def test_create_account_activity_subscription_request_structure(self):
28
+ """Test create_account_activity_subscription request structure."""
29
+ # Mock the session to capture request details
30
+ with patch.object(self.client, "session") as mock_session:
31
+ mock_response = Mock()
32
+ mock_response.status_code = 200
33
+ mock_response.json.return_value = {
34
+ "data": None,
35
+ }
36
+ mock_response.raise_for_status.return_value = None
37
+ mock_session.post.return_value = mock_response
38
+ # Prepare test parameters
39
+ kwargs = {}
40
+ # Add required parameters
41
+ kwargs["webhook_id"] = "test_value"
42
+ # Add request body if required
43
+ # Import and create proper request model instance
44
+ from xdk.aaasubscriptions.models import (
45
+ CreateAccountActivitySubscriptionRequest,
46
+ )
47
+ # Create instance with minimal valid data (empty instance should work for most cases)
48
+ kwargs["body"] = CreateAccountActivitySubscriptionRequest()
49
+ # Call the method
50
+ try:
51
+ method = getattr(
52
+ self.aaasubscriptions_client, "create_account_activity_subscription"
53
+ )
54
+ result = method(**kwargs)
55
+ # Verify the request was made
56
+ mock_session.post.assert_called_once()
57
+ # Verify request structure
58
+ call_args = mock_session.post.call_args
59
+ # Check URL structure
60
+ called_url = (
61
+ call_args[0][0] if call_args[0] else call_args[1].get("url", "")
62
+ )
63
+ expected_path = (
64
+ "/2/account_activity/webhooks/{webhook_id}/subscriptions/all"
65
+ )
66
+ assert expected_path.replace("{", "").replace(
67
+ "}", ""
68
+ ) in called_url or any(
69
+ param in called_url for param in ["test_", "42"]
70
+ ), f"URL should contain path template elements: {called_url}"
71
+ # Verify response structure
72
+ assert result is not None, "Method should return a result"
73
+ except Exception as e:
74
+ pytest.fail(
75
+ f"Contract test failed for create_account_activity_subscription: {e}"
76
+ )
77
+
78
+
79
+ def test_create_account_activity_subscription_required_parameters(self):
80
+ """Test that create_account_activity_subscription handles parameters correctly."""
81
+ method = getattr(
82
+ self.aaasubscriptions_client, "create_account_activity_subscription"
83
+ )
84
+ # Test with missing required parameters - mock the request to avoid network calls
85
+ with patch.object(self.client, "session") as mock_session:
86
+ # Mock a 400 response (typical for missing required parameters)
87
+ mock_response = Mock()
88
+ mock_response.status_code = 400
89
+ mock_response.json.return_value = {"error": "Missing required parameters"}
90
+ mock_response.raise_for_status.side_effect = Exception("Bad Request")
91
+ mock_session.post.return_value = mock_response
92
+ # Call without required parameters should either raise locally or via server response
93
+ with pytest.raises((TypeError, ValueError, Exception)):
94
+ method()
95
+
96
+
97
+ def test_create_account_activity_subscription_response_structure(self):
98
+ """Test create_account_activity_subscription response structure validation."""
99
+ with patch.object(self.client, "session") as mock_session:
100
+ # Create mock response with expected structure
101
+ mock_response_data = {
102
+ "data": None,
103
+ }
104
+ mock_response = Mock()
105
+ mock_response.status_code = 200
106
+ mock_response.json.return_value = mock_response_data
107
+ mock_response.raise_for_status.return_value = None
108
+ mock_session.post.return_value = mock_response
109
+ # Prepare minimal valid parameters
110
+ kwargs = {}
111
+ kwargs["webhook_id"] = "test"
112
+ # Add request body if required
113
+ # Import and create proper request model instance
114
+ from xdk.aaasubscriptions.models import (
115
+ CreateAccountActivitySubscriptionRequest,
116
+ )
117
+ # Create instance with minimal valid data (empty instance should work for most cases)
118
+ kwargs["body"] = CreateAccountActivitySubscriptionRequest()
119
+ # Call method and verify response structure
120
+ method = getattr(
121
+ self.aaasubscriptions_client, "create_account_activity_subscription"
122
+ )
123
+ result = method(**kwargs)
124
+ # Verify response object has expected attributes
125
+ # Optional field - just check it doesn't cause errors if accessed
126
+ try:
127
+ getattr(result, "data", None)
128
+ except Exception as e:
129
+ pytest.fail(
130
+ f"Accessing optional field 'data' should not cause errors: {e}"
131
+ )
@@ -0,0 +1,125 @@
1
+ """
2
+ Auto-generated generic tests for AAASubscriptions client.
3
+
4
+ This module contains general tests that validate the overall client
5
+ functionality, imports, and error handling that don't need to be
6
+ repeated for each operation.
7
+
8
+ Generated automatically - do not edit manually.
9
+ """
10
+
11
+ import pytest
12
+ import inspect
13
+ from unittest.mock import Mock, patch
14
+ from xdk.aaasubscriptions.client import AAASubscriptionsClient
15
+ from xdk import Client
16
+
17
+
18
+ class TestAAASubscriptionsGeneric:
19
+ """Generic tests for AAASubscriptionsClient."""
20
+
21
+
22
+ def setup_class(self):
23
+ """Set up test fixtures."""
24
+ self.client = Client(base_url="https://api.example.com")
25
+ self.aaasubscriptions_client = getattr(self.client, "aaasubscriptions")
26
+
27
+
28
+ def test_client_exists(self):
29
+ """Test that AAASubscriptionsClient class exists and is importable."""
30
+ assert AAASubscriptionsClient is not None
31
+ assert hasattr(AAASubscriptionsClient, "__name__")
32
+ assert AAASubscriptionsClient.__name__ == "AAASubscriptionsClient"
33
+
34
+
35
+ def test_client_initialization(self):
36
+ """Test that AAASubscriptionsClient can be initialized properly."""
37
+ assert self.aaasubscriptions_client is not None
38
+ assert isinstance(self.aaasubscriptions_client, AAASubscriptionsClient)
39
+
40
+
41
+ def test_imports_work(self):
42
+ """Test that all expected imports work correctly."""
43
+ expected_imports = ["typing", "requests", "pydantic"]
44
+ for import_name in expected_imports:
45
+ try:
46
+ __import__(import_name)
47
+ except ImportError as e:
48
+ pytest.fail(f"Expected import '{import_name}' failed: {e}")
49
+
50
+
51
+ def test_error_responses_handling(self):
52
+ """Test that error responses are handled correctly across all methods."""
53
+ with patch.object(self.client, "session") as mock_session:
54
+ # Test 404 response
55
+ mock_response = Mock()
56
+ mock_response.status_code = 404
57
+ mock_response.raise_for_status.side_effect = Exception("Not Found")
58
+ mock_session.get.return_value = mock_response
59
+ mock_session.post.return_value = mock_response
60
+ mock_session.put.return_value = mock_response
61
+ mock_session.delete.return_value = mock_response
62
+ # Get first available method for testing error handling
63
+ client_methods = [
64
+ name
65
+ for name in dir(AAASubscriptionsClient)
66
+ if not name.startswith("_")
67
+ and callable(getattr(AAASubscriptionsClient, name))
68
+ ]
69
+ if client_methods:
70
+ method_name = client_methods[0]
71
+ method = getattr(self.aaasubscriptions_client, method_name)
72
+ # Try calling the method and expect an exception
73
+ with pytest.raises(Exception):
74
+ try:
75
+ # Try with no args first
76
+ method()
77
+ except TypeError:
78
+ # If it needs args, try with basic test args
79
+ try:
80
+ method("test_id")
81
+ except TypeError:
82
+ # If it needs more specific args, try with kwargs
83
+ method(id="test_id", query="test")
84
+
85
+
86
+ def test_client_has_expected_base_functionality(self):
87
+ """Test that the client has expected base functionality."""
88
+ # Should be able to access the client through main Client
89
+ assert hasattr(self.client, "aaasubscriptions")
90
+ # Client should have standard Python object features
91
+ assert hasattr(self.aaasubscriptions_client, "__class__")
92
+ assert hasattr(self.aaasubscriptions_client, "__dict__")
93
+ # Should have at least one public method
94
+ public_methods = [
95
+ name
96
+ for name in dir(self.aaasubscriptions_client)
97
+ if not name.startswith("_")
98
+ and callable(getattr(self.aaasubscriptions_client, name))
99
+ ]
100
+ assert (
101
+ len(public_methods) > 0
102
+ ), f"AAASubscriptionsClient should have at least one public method"
103
+
104
+
105
+ def test_client_method_signatures_are_valid(self):
106
+ """Test that all client methods have valid Python signatures."""
107
+ public_methods = [
108
+ name
109
+ for name in dir(AAASubscriptionsClient)
110
+ if not name.startswith("_")
111
+ and callable(getattr(AAASubscriptionsClient, name))
112
+ ]
113
+ for method_name in public_methods:
114
+ method = getattr(AAASubscriptionsClient, method_name)
115
+ # Should be able to get signature without error
116
+ try:
117
+ sig = inspect.signature(method)
118
+ params = list(sig.parameters.keys())
119
+ # Should have 'self' as first parameter (if it's an instance method)
120
+ if params:
121
+ assert (
122
+ params[0] == "self"
123
+ ), f"Method {method_name} should have 'self' as first parameter"
124
+ except (ValueError, TypeError) as e:
125
+ pytest.fail(f"Method {method_name} has invalid signature: {e}")
@@ -0,0 +1,88 @@
1
+ """
2
+ Auto-generated structural tests for AAASubscriptions client.
3
+
4
+ This module contains tests that validate the structure and API surface
5
+ of the AAASubscriptions client. These tests ensure that all expected methods
6
+ exist and have the correct signatures.
7
+
8
+ Generated automatically - do not edit manually.
9
+ """
10
+
11
+ import pytest
12
+ import inspect
13
+ from typing import get_type_hints
14
+ from xdk.aaasubscriptions.client import AAASubscriptionsClient
15
+ from xdk import Client
16
+
17
+
18
+ class TestAAASubscriptionsStructure:
19
+ """Test the structure of AAASubscriptionsClient."""
20
+
21
+
22
+ def setup_class(self):
23
+ """Set up test fixtures."""
24
+ self.client = Client(base_url="https://api.example.com")
25
+ self.aaasubscriptions_client = getattr(self.client, "aaasubscriptions")
26
+
27
+
28
+ def test_create_account_activity_subscription_exists(self):
29
+ """Test that create_account_activity_subscription method exists with correct signature."""
30
+ # Check method exists
31
+ method = getattr(
32
+ AAASubscriptionsClient, "create_account_activity_subscription", None
33
+ )
34
+ assert (
35
+ method is not None
36
+ ), f"Method create_account_activity_subscription does not exist on AAASubscriptionsClient"
37
+ # Check method is callable
38
+ assert callable(method), f"create_account_activity_subscription is not callable"
39
+ # Check method signature
40
+ sig = inspect.signature(method)
41
+ params = list(sig.parameters.keys())
42
+ # Should have 'self' as first parameter
43
+ assert (
44
+ len(params) >= 1
45
+ ), f"create_account_activity_subscription should have at least 'self' parameter"
46
+ assert (
47
+ params[0] == "self"
48
+ ), f"First parameter should be 'self', got '{params[0]}'"
49
+ # Check required parameters exist (excluding 'self')
50
+ required_params = [
51
+ "webhook_id",
52
+ ]
53
+ for required_param in required_params:
54
+ assert (
55
+ required_param in params
56
+ ), f"Required parameter '{required_param}' missing from create_account_activity_subscription"
57
+ # Check optional parameters have defaults (excluding 'self')
58
+ optional_params = []
59
+ for optional_param in optional_params:
60
+ if optional_param in params:
61
+ param_obj = sig.parameters[optional_param]
62
+ assert (
63
+ param_obj.default is not inspect.Parameter.empty
64
+ ), f"Optional parameter '{optional_param}' should have a default value"
65
+
66
+
67
+ def test_create_account_activity_subscription_return_annotation(self):
68
+ """Test that create_account_activity_subscription has proper return type annotation."""
69
+ method = getattr(AAASubscriptionsClient, "create_account_activity_subscription")
70
+ sig = inspect.signature(method)
71
+ # Check return annotation exists
72
+ assert (
73
+ sig.return_annotation is not inspect.Signature.empty
74
+ ), f"Method create_account_activity_subscription should have return type annotation"
75
+
76
+
77
+ def test_all_expected_methods_exist(self):
78
+ """Test that all expected methods exist on the client."""
79
+ expected_methods = [
80
+ "create_account_activity_subscription",
81
+ ]
82
+ for expected_method in expected_methods:
83
+ assert hasattr(
84
+ AAASubscriptionsClient, expected_method
85
+ ), f"Expected method '{expected_method}' not found on AAASubscriptionsClient"
86
+ assert callable(
87
+ getattr(AAASubscriptionsClient, expected_method)
88
+ ), f"'{expected_method}' exists but is not callable"
File without changes