diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cda9cbdf..10f30916 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.2" + ".": "0.2.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 6127ab43..31642603 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 266 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-ba5efdf86108ef077f2db1f8a05b84d58f7f218fe2b7e0eb72e3c371cfa30015.yml -openapi_spec_hash: 6c2d47cd85674ece07dc37e471a36ac9 +configured_endpoints: 265 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/onlyfansapi/onlyfansapi-c7b4dde3eb431e3c636e2b6bc3a7bc40aaee037783648040876793082942a877.yml +openapi_spec_hash: b2059518c78b8c03fcbd4e1773ff4d77 config_hash: 397c91e15c0024f8b5bbed9b82c2348c diff --git a/CHANGELOG.md b/CHANGELOG.md index e9d2a81d..7e9d00ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,168 @@ # Changelog +## 0.2.0 (2026-07-10) + +Full Changelog: [v0.1.2...v0.2.0](https://github.com/onlyfansapi/onlyfansapi-python/compare/v0.1.2...v0.2.0) + +### Features + +* **api:** api update ([53307f5](https://github.com/onlyfansapi/onlyfansapi-python/commit/53307f5b33c42961dbf9f7789352398b1aad35d0)) +* **api:** api update ([1b7e3b7](https://github.com/onlyfansapi/onlyfansapi-python/commit/1b7e3b7d85306ebb0c36b33dc219486c290a07a0)) +* **api:** api update ([870ce5c](https://github.com/onlyfansapi/onlyfansapi-python/commit/870ce5c5344eac82f50ab138e3cf660d5dbcde99)) +* **api:** api update ([4c8f998](https://github.com/onlyfansapi/onlyfansapi-python/commit/4c8f9989a83e200bfda79edba3b644e7bc776734)) +* **api:** api update ([bf85410](https://github.com/onlyfansapi/onlyfansapi-python/commit/bf8541014f378eb7783b4d548dec868ac023fb4b)) +* **api:** api update ([bc4ad9c](https://github.com/onlyfansapi/onlyfansapi-python/commit/bc4ad9cda2cddd4b44f3a6ec598cd9843ff5422e)) +* **api:** api update ([6d845ea](https://github.com/onlyfansapi/onlyfansapi-python/commit/6d845eace2c48224721825fb92f286f41608a531)) +* **api:** api update ([d2ff421](https://github.com/onlyfansapi/onlyfansapi-python/commit/d2ff421e1e4741943cb6dfb61ee8bc68e5273ce7)) +* **api:** api update ([1e34cdf](https://github.com/onlyfansapi/onlyfansapi-python/commit/1e34cdfb2c77dcf8e7bfe3429b624ba6564c12c2)) +* **api:** api update ([02ae244](https://github.com/onlyfansapi/onlyfansapi-python/commit/02ae244cb2aaf005d9244be1cb2410935f626c56)) +* **api:** api update ([179a592](https://github.com/onlyfansapi/onlyfansapi-python/commit/179a5923e7580bf0483d05abccd2ab731a09bc01)) +* **api:** api update ([c7f90dd](https://github.com/onlyfansapi/onlyfansapi-python/commit/c7f90dd1b7064ad48334a1c97791bac616228a25)) +* **api:** api update ([293346c](https://github.com/onlyfansapi/onlyfansapi-python/commit/293346ce4cc45bc6c893ce146907aecd9d45083b)) +* **api:** api update ([9a82aec](https://github.com/onlyfansapi/onlyfansapi-python/commit/9a82aec51c4f60f11ea2d3db069898301c22e48d)) +* **api:** api update ([0742c6b](https://github.com/onlyfansapi/onlyfansapi-python/commit/0742c6b01b8ee727616da3c71232bdb71dc28a7d)) +* **api:** api update ([f557b21](https://github.com/onlyfansapi/onlyfansapi-python/commit/f557b2178e60a8d96edbabe78099094198240c1c)) +* **api:** api update ([c29e6e2](https://github.com/onlyfansapi/onlyfansapi-python/commit/c29e6e299fcae1882ba3a1982ad8996a0e29aa24)) +* **api:** api update ([64e0325](https://github.com/onlyfansapi/onlyfansapi-python/commit/64e03259d17d1f27f44ae4ab2d8ee3cba744677b)) +* **api:** api update ([d69001b](https://github.com/onlyfansapi/onlyfansapi-python/commit/d69001b11519fca2f88a08610e4c11f462b10690)) +* **api:** api update ([f3f6a7d](https://github.com/onlyfansapi/onlyfansapi-python/commit/f3f6a7de15830eabbd9ad57d5edd600a444872cb)) +* **api:** api update ([2e11f3f](https://github.com/onlyfansapi/onlyfansapi-python/commit/2e11f3feabcda807f76fedc5ac8ad70db68ab4d0)) +* **api:** api update ([7d8523a](https://github.com/onlyfansapi/onlyfansapi-python/commit/7d8523acbc7171c2bf2af963f457f242d86e5119)) +* **api:** api update ([3101371](https://github.com/onlyfansapi/onlyfansapi-python/commit/310137122207eeb85389095d4d26dc2555333c2e)) +* **api:** api update ([7c99e2a](https://github.com/onlyfansapi/onlyfansapi-python/commit/7c99e2a1cc79d09a7d53d4c68237af06e4e4d1ab)) +* **api:** api update ([c11f180](https://github.com/onlyfansapi/onlyfansapi-python/commit/c11f180fe2c833e9ad40434312cfe47447be8dfb)) +* **api:** api update ([4830edd](https://github.com/onlyfansapi/onlyfansapi-python/commit/4830eddc35ed953f5730edf979b5c0db75ccb082)) +* **api:** api update ([3ef2bad](https://github.com/onlyfansapi/onlyfansapi-python/commit/3ef2bad1be2bb4fcef4f65dde2d5704384a821c3)) +* **api:** api update ([c4b4d34](https://github.com/onlyfansapi/onlyfansapi-python/commit/c4b4d347ddc13bf7ef358f1953a145aef07c6785)) +* **api:** api update ([6fd0c37](https://github.com/onlyfansapi/onlyfansapi-python/commit/6fd0c3711c712c47f78cae2359ee20eca694e26f)) +* **api:** api update ([84ef257](https://github.com/onlyfansapi/onlyfansapi-python/commit/84ef257f42d7c15262dc63d5869e9b48b8f1d62b)) +* **api:** api update ([a822c22](https://github.com/onlyfansapi/onlyfansapi-python/commit/a822c221e7d433bf7f36f2f608ec6ee2f4212fff)) +* **api:** api update ([96068ce](https://github.com/onlyfansapi/onlyfansapi-python/commit/96068ce6fe8c0fa94b475877815cc8c1670a48b3)) +* **api:** api update ([14e5452](https://github.com/onlyfansapi/onlyfansapi-python/commit/14e54524baf40026eae7cad18828f9e9a9246522)) +* **api:** api update ([9ff85c9](https://github.com/onlyfansapi/onlyfansapi-python/commit/9ff85c92011773ac85fd43a9c8fed24f1d09ed69)) +* **api:** api update ([690697f](https://github.com/onlyfansapi/onlyfansapi-python/commit/690697fed189cd6acc18c9bf40164729e13d5344)) +* **api:** api update ([d4ea3a3](https://github.com/onlyfansapi/onlyfansapi-python/commit/d4ea3a356bab292a092a599f4a4fd7394ae149e1)) +* **api:** api update ([ece2e64](https://github.com/onlyfansapi/onlyfansapi-python/commit/ece2e64dec3f9356b351d1862a1f22871a528970)) +* **api:** api update ([0e5181b](https://github.com/onlyfansapi/onlyfansapi-python/commit/0e5181b69361214e8a78e5ca7c3f915b2ea57aec)) +* **api:** api update ([a2f1e64](https://github.com/onlyfansapi/onlyfansapi-python/commit/a2f1e64f365be407a6b3b5267e293f808fa684e1)) +* **api:** api update ([3093ab5](https://github.com/onlyfansapi/onlyfansapi-python/commit/3093ab5168081988522eaae6afc8aab54e525b0c)) +* **api:** api update ([7d8cf8d](https://github.com/onlyfansapi/onlyfansapi-python/commit/7d8cf8d441a41fd773f832e787da2a17fe97bb5d)) +* **api:** api update ([f07fda7](https://github.com/onlyfansapi/onlyfansapi-python/commit/f07fda75461b72f717dbea6aecb141f63153afd6)) +* **api:** api update ([65fd101](https://github.com/onlyfansapi/onlyfansapi-python/commit/65fd1014fca65692c9c0d1a9960fafea61a0d876)) +* **api:** api update ([1a4584e](https://github.com/onlyfansapi/onlyfansapi-python/commit/1a4584e4ac241ff185911411b0b56fa2eb73b62c)) +* **api:** api update ([6b0bbf8](https://github.com/onlyfansapi/onlyfansapi-python/commit/6b0bbf8ccd12982f2ff8e53014db7e24dfb2bf83)) +* **api:** api update ([6f86464](https://github.com/onlyfansapi/onlyfansapi-python/commit/6f8646432b9297b31885ea2912f1325ba86e5949)) +* **api:** api update ([d99d328](https://github.com/onlyfansapi/onlyfansapi-python/commit/d99d328ea9231b173ce3694207f1acb04331322c)) +* **api:** api update ([1a1f70d](https://github.com/onlyfansapi/onlyfansapi-python/commit/1a1f70df2843def16fe176ac59863f41b3864467)) +* **api:** api update ([6733605](https://github.com/onlyfansapi/onlyfansapi-python/commit/673360549e2dba4c0558234ee9b172304530f3d8)) +* **api:** api update ([34b0116](https://github.com/onlyfansapi/onlyfansapi-python/commit/34b01164051b22ec5c95c03104ecf086cf5c38a9)) +* **api:** api update ([2623e4f](https://github.com/onlyfansapi/onlyfansapi-python/commit/2623e4ff6f4beb7e4601c4d5bfd3c445be5b53d8)) +* **api:** api update ([5ecfe50](https://github.com/onlyfansapi/onlyfansapi-python/commit/5ecfe507bb879f29f5f7d3ef84294d7495a77c27)) +* **api:** api update ([e04b31f](https://github.com/onlyfansapi/onlyfansapi-python/commit/e04b31fbb676188666fea058aec58892b665e560)) +* **api:** api update ([ff80138](https://github.com/onlyfansapi/onlyfansapi-python/commit/ff8013848469ba5059d0ae9f43164ea3de6f17ec)) +* **api:** api update ([86e264e](https://github.com/onlyfansapi/onlyfansapi-python/commit/86e264e4f4596e989c1227b0f8717a562ccb5c8a)) +* **api:** api update ([7dd3175](https://github.com/onlyfansapi/onlyfansapi-python/commit/7dd3175dea435e9d03ba94cd548b45588cdadc12)) +* **api:** api update ([2eede93](https://github.com/onlyfansapi/onlyfansapi-python/commit/2eede932d7795151755cef1373ef723b594b51ec)) +* **api:** api update ([d7f273e](https://github.com/onlyfansapi/onlyfansapi-python/commit/d7f273e31c9f47d142a18b0a2a9a72b520277a41)) +* **api:** api update ([61824c2](https://github.com/onlyfansapi/onlyfansapi-python/commit/61824c2c6a658abc8a5b256f26153c852fdf07ca)) +* **api:** api update ([c065f5e](https://github.com/onlyfansapi/onlyfansapi-python/commit/c065f5e87e1c8a34984dabc5b36fc8b5d89dc04e)) +* **api:** api update ([e6371a9](https://github.com/onlyfansapi/onlyfansapi-python/commit/e6371a97aef6d5b5724bee5ff93856d5444f39cf)) +* **api:** api update ([fcbc734](https://github.com/onlyfansapi/onlyfansapi-python/commit/fcbc734d81a4fe09530f934f619c65bbbbc21a8c)) +* **api:** api update ([27d82bd](https://github.com/onlyfansapi/onlyfansapi-python/commit/27d82bd7196e95abb0d4dae7b7d83880e9758e2e)) +* **api:** api update ([8e6951a](https://github.com/onlyfansapi/onlyfansapi-python/commit/8e6951a2d77aa5c1e7bf04346006b23aac571f12)) +* **api:** api update ([2a9d43d](https://github.com/onlyfansapi/onlyfansapi-python/commit/2a9d43da2583fc5787269d8419544ba0ed3256f6)) +* **api:** api update ([219a4ad](https://github.com/onlyfansapi/onlyfansapi-python/commit/219a4ad76a013f4409e78c39bf98ff178063b0e5)) +* **api:** api update ([b4de79a](https://github.com/onlyfansapi/onlyfansapi-python/commit/b4de79adfe74b16d971c2ac5c0483c6ea2823b17)) +* **api:** api update ([6dac13e](https://github.com/onlyfansapi/onlyfansapi-python/commit/6dac13ef7bfe10bdf41a445e2bbf733574b6ce49)) +* **api:** api update ([d37311c](https://github.com/onlyfansapi/onlyfansapi-python/commit/d37311c2c3241b721cfb6c4bb23768871ddb37d3)) +* **api:** api update ([ad185f2](https://github.com/onlyfansapi/onlyfansapi-python/commit/ad185f2dba151f99f4305a991d59c732bfed3567)) +* **api:** api update ([fb91a8a](https://github.com/onlyfansapi/onlyfansapi-python/commit/fb91a8a2ae01b12b8e23d04019f14cf589d2b6d6)) +* **api:** api update ([34b2ef5](https://github.com/onlyfansapi/onlyfansapi-python/commit/34b2ef520908d102c015ca22ae14cd962971803a)) +* **api:** api update ([bc6eecc](https://github.com/onlyfansapi/onlyfansapi-python/commit/bc6eecce257a653fb292faa08083275940e2988d)) +* **api:** api update ([8c1fc5b](https://github.com/onlyfansapi/onlyfansapi-python/commit/8c1fc5bf584345d8f7322a364f372bafb9a61105)) +* **api:** api update ([b3e9ad4](https://github.com/onlyfansapi/onlyfansapi-python/commit/b3e9ad4baf8a196ac8709aebd2544c35d7c4cb9f)) +* **api:** api update ([6206d4e](https://github.com/onlyfansapi/onlyfansapi-python/commit/6206d4ea6f90f4670efd1bbbc575198dc83fa378)) +* **api:** api update ([c4cb460](https://github.com/onlyfansapi/onlyfansapi-python/commit/c4cb46035be4dc92c35f839c4b0357c669990ee7)) +* **api:** api update ([5730eb7](https://github.com/onlyfansapi/onlyfansapi-python/commit/5730eb709799c6cb7602376ad4932b99d272fda8)) +* **api:** api update ([05a7a76](https://github.com/onlyfansapi/onlyfansapi-python/commit/05a7a761f83da67c48b5adb881fb7355fe273d90)) +* **api:** api update ([a5bef62](https://github.com/onlyfansapi/onlyfansapi-python/commit/a5bef6249c6f41017cbdf93596d31b1d1d734d8d)) +* **api:** api update ([cd59ef9](https://github.com/onlyfansapi/onlyfansapi-python/commit/cd59ef9dca60b078e1ca0b3735af93d67e3d4151)) +* **api:** api update ([85a1343](https://github.com/onlyfansapi/onlyfansapi-python/commit/85a134346cdbe797c852dea9ea87cb8fb2b6b85f)) +* **api:** api update ([3b888d1](https://github.com/onlyfansapi/onlyfansapi-python/commit/3b888d1755cb600905e1a0517077bf0429b822c6)) +* **api:** api update ([c9bffa9](https://github.com/onlyfansapi/onlyfansapi-python/commit/c9bffa987a47eb406f6525aa2fb409e925d45c3b)) +* **api:** api update ([cd72d9b](https://github.com/onlyfansapi/onlyfansapi-python/commit/cd72d9b088e050776dd050a0aca1222404fd178c)) +* **api:** api update ([98cccb2](https://github.com/onlyfansapi/onlyfansapi-python/commit/98cccb29301a35d2fa083b533b772d834fe0326d)) +* **api:** api update ([5e54e4d](https://github.com/onlyfansapi/onlyfansapi-python/commit/5e54e4dcab360a81947e39d3a917851859db8235)) +* **api:** api update ([c0e6856](https://github.com/onlyfansapi/onlyfansapi-python/commit/c0e6856931fd11a311e8f23773d2d92f011239ff)) +* **api:** api update ([8094519](https://github.com/onlyfansapi/onlyfansapi-python/commit/8094519c54d9931fb860e6b8c7ae002d9ff1317c)) +* **api:** api update ([cc58005](https://github.com/onlyfansapi/onlyfansapi-python/commit/cc58005c7034682c16182a57dddd4810849773a1)) +* **api:** api update ([e79bbd9](https://github.com/onlyfansapi/onlyfansapi-python/commit/e79bbd972288c882a5cbafbf30a99f8b38d77ab6)) +* **api:** api update ([c3e0de4](https://github.com/onlyfansapi/onlyfansapi-python/commit/c3e0de4a6dd1170cd75d77838f07fb395005b452)) +* **api:** api update ([4a0e815](https://github.com/onlyfansapi/onlyfansapi-python/commit/4a0e815fe74f83e0fad633e6fc1033ec0afbcc2a)) +* **api:** api update ([22e3621](https://github.com/onlyfansapi/onlyfansapi-python/commit/22e362138fea30764aff89a049bc5ab8acd163d9)) +* **api:** api update ([b9bc8ef](https://github.com/onlyfansapi/onlyfansapi-python/commit/b9bc8ef90c9c5cfbd5b81add12e94e78786b46b0)) +* **api:** api update ([d19b34e](https://github.com/onlyfansapi/onlyfansapi-python/commit/d19b34eb66ef42f568b9d93e1bd3a75a2e2e841c)) +* **api:** api update ([39eabdf](https://github.com/onlyfansapi/onlyfansapi-python/commit/39eabdf3aa114aefab93cd6d62bb3c55e573d5f7)) +* **api:** api update ([661fcbb](https://github.com/onlyfansapi/onlyfansapi-python/commit/661fcbb83e78132732f94a2fa03ba0d946b7a924)) +* **api:** api update ([3045117](https://github.com/onlyfansapi/onlyfansapi-python/commit/304511738133992687cbe662a050ef7601886cb3)) +* **api:** api update ([8f04ca3](https://github.com/onlyfansapi/onlyfansapi-python/commit/8f04ca304dcd6a9c87a8e754147bf94f3f74e145)) +* **api:** api update ([0b39e31](https://github.com/onlyfansapi/onlyfansapi-python/commit/0b39e3184b3f54a930e11724881f5ca4b89b7405)) +* **api:** api update ([71220c9](https://github.com/onlyfansapi/onlyfansapi-python/commit/71220c909703a5f8da6eee5713682ebaf53df63e)) +* **api:** api update ([5bfca35](https://github.com/onlyfansapi/onlyfansapi-python/commit/5bfca356b7868b864ef49dc0aa4f77fe6ae73aa3)) +* **api:** api update ([1fed67f](https://github.com/onlyfansapi/onlyfansapi-python/commit/1fed67f63373d363e1bacb35db41929479c5d09f)) +* **api:** api update ([d42b221](https://github.com/onlyfansapi/onlyfansapi-python/commit/d42b2211fc03d932c9ca8e94ac562f42f706e4b9)) +* **api:** api update ([2d4e1d9](https://github.com/onlyfansapi/onlyfansapi-python/commit/2d4e1d9147ca5247b796c0100fb2bb05c4618f46)) +* **api:** api update ([56d3af6](https://github.com/onlyfansapi/onlyfansapi-python/commit/56d3af65bb3977a2fe5e4ba229cff154cd5fd3b6)) +* **api:** api update ([afd3835](https://github.com/onlyfansapi/onlyfansapi-python/commit/afd3835d291685dc853fb3d65912f56dc623c485)) +* **api:** api update ([bbaa897](https://github.com/onlyfansapi/onlyfansapi-python/commit/bbaa89714c89ec78261079236b42f2d5d1ddb930)) +* **api:** api update ([06c6eef](https://github.com/onlyfansapi/onlyfansapi-python/commit/06c6eefd0f8f8cb4ee28d7977dd27e594f14c155)) +* **api:** api update ([a96c6d7](https://github.com/onlyfansapi/onlyfansapi-python/commit/a96c6d73c2a5f5dfed976f2ec235b082c2569872)) +* **api:** api update ([eb632d4](https://github.com/onlyfansapi/onlyfansapi-python/commit/eb632d41920d0f838135d5f1d66502298b430bcc)) +* **api:** api update ([6b9ad4e](https://github.com/onlyfansapi/onlyfansapi-python/commit/6b9ad4e06d8663bb4a7959432dbdd1f253b3436e)) +* **api:** api update ([98a84e7](https://github.com/onlyfansapi/onlyfansapi-python/commit/98a84e77ee2bf89462136939c7b6ddfd39a0c619)) +* **api:** api update ([f0a25cd](https://github.com/onlyfansapi/onlyfansapi-python/commit/f0a25cd6b38cdae7c64dfeb113c489b216dda816)) +* **api:** api update ([8bbc9d6](https://github.com/onlyfansapi/onlyfansapi-python/commit/8bbc9d67d84d394af2936841c24ca07f5cce0944)) +* **api:** api update ([3551f5f](https://github.com/onlyfansapi/onlyfansapi-python/commit/3551f5fbba68388f3c5215acec8488b22b83bf30)) +* **api:** api update ([57a911a](https://github.com/onlyfansapi/onlyfansapi-python/commit/57a911acb35d93fd2586a5ae34cc6fd708943b2e)) +* **api:** api update ([e64239d](https://github.com/onlyfansapi/onlyfansapi-python/commit/e64239d0f6358f959e78a679908eddb39f8bff21)) +* **api:** api update ([aa704e0](https://github.com/onlyfansapi/onlyfansapi-python/commit/aa704e0fa956d67a1551857fecfbceaf52a42b5c)) +* **api:** api update ([8ada88c](https://github.com/onlyfansapi/onlyfansapi-python/commit/8ada88cd402259d9daa8cd20e95e3b44d67e0bf5)) +* **api:** api update ([924de03](https://github.com/onlyfansapi/onlyfansapi-python/commit/924de03411c4481b1bf81c6b67dad9d5640c0916)) +* **api:** api update ([fe65d3e](https://github.com/onlyfansapi/onlyfansapi-python/commit/fe65d3ebaaf73dd96c60fbb8dd96292e8b13ae5a)) +* **api:** api update ([b466abb](https://github.com/onlyfansapi/onlyfansapi-python/commit/b466abb391150e3ce362ab9846f672facc69551f)) +* **api:** api update ([db0732e](https://github.com/onlyfansapi/onlyfansapi-python/commit/db0732e227750931db1a25a278456fd7b95424fb)) +* **api:** api update ([2952e4b](https://github.com/onlyfansapi/onlyfansapi-python/commit/2952e4b60838f01d8bd0e586249cd917d607cb62)) +* **api:** api update ([de81294](https://github.com/onlyfansapi/onlyfansapi-python/commit/de812940595d4332b9f42d267f88f12c9783db1a)) +* **api:** api update ([9e94503](https://github.com/onlyfansapi/onlyfansapi-python/commit/9e9450351d93e7a6bd02ac847569349ec71fddb5)) +* **api:** api update ([43194d7](https://github.com/onlyfansapi/onlyfansapi-python/commit/43194d71262d5d50f797a8ccba2659a6c3c2887f)) +* **api:** api update ([4594ec1](https://github.com/onlyfansapi/onlyfansapi-python/commit/4594ec136232b42f3d456b09516ec08065fdfafd)) +* **api:** api update ([c06f3ab](https://github.com/onlyfansapi/onlyfansapi-python/commit/c06f3abf1381148f5e48b85f0086b1af17e2a0d3)) +* **api:** api update ([3525475](https://github.com/onlyfansapi/onlyfansapi-python/commit/3525475272b3341f91f4b75160f63b106321e139)) +* **api:** api update ([3e7e17b](https://github.com/onlyfansapi/onlyfansapi-python/commit/3e7e17b1e3ab8993aba06ffec2ef5378d18f93d2)) +* **api:** api update ([62090dc](https://github.com/onlyfansapi/onlyfansapi-python/commit/62090dc02ca59eb6efec90625d71d312043b55a1)) +* **api:** api update ([9ce94a8](https://github.com/onlyfansapi/onlyfansapi-python/commit/9ce94a833a666de930b770d1ba2c59596ff2d330)) +* **api:** api update ([cb29cb5](https://github.com/onlyfansapi/onlyfansapi-python/commit/cb29cb5216eaf0bbbc57186287b11e829710b6a1)) +* **api:** api update ([43559da](https://github.com/onlyfansapi/onlyfansapi-python/commit/43559da1af5ee18c58b99677f3cfd559e0e2106e)) +* **api:** api update ([9ffc9d3](https://github.com/onlyfansapi/onlyfansapi-python/commit/9ffc9d354f805880d3363c4084fe49935a7a9d10)) +* **api:** api update ([0942b23](https://github.com/onlyfansapi/onlyfansapi-python/commit/0942b231431790866d93cc2e477082c5aee0b87c)) +* **api:** api update ([88c6d42](https://github.com/onlyfansapi/onlyfansapi-python/commit/88c6d42c3c75411714bd70c03322d76b7960208a)) +* **api:** api update ([af71d0c](https://github.com/onlyfansapi/onlyfansapi-python/commit/af71d0ce89f943af5d27d66a5fbb1cd8e7285f9b)) +* **api:** api update ([015b0d1](https://github.com/onlyfansapi/onlyfansapi-python/commit/015b0d11070c3801c8bb26ff99b2f7f1d9ad5627)) +* **api:** api update ([0babea3](https://github.com/onlyfansapi/onlyfansapi-python/commit/0babea32599dc9d8603ba9e6519f9760367ad1f6)) +* **api:** api update ([196b012](https://github.com/onlyfansapi/onlyfansapi-python/commit/196b0123732493210c74e905d55c82ceafee11b9)) +* **api:** api update ([2c2c2d5](https://github.com/onlyfansapi/onlyfansapi-python/commit/2c2c2d5611f7d22371608b4e105d702fc96cbbd1)) +* **api:** api update ([0a74e45](https://github.com/onlyfansapi/onlyfansapi-python/commit/0a74e45ef5ecbefdfb4b2d3ca47c04004f77ee18)) +* **api:** api update ([2b072d1](https://github.com/onlyfansapi/onlyfansapi-python/commit/2b072d1cb4c48b00c3cd66616334e9edd580899d)) +* **api:** api update ([f2f2094](https://github.com/onlyfansapi/onlyfansapi-python/commit/f2f2094213516b1f79af9f22dc03a84a2a074a1a)) +* **api:** api update ([d22aec4](https://github.com/onlyfansapi/onlyfansapi-python/commit/d22aec4906882366899e5bef242bc1a6ca3ca7d6)) +* **api:** api update ([a67bd8b](https://github.com/onlyfansapi/onlyfansapi-python/commit/a67bd8b1e7a96890aaf430233e80dcebf94e6aa0)) +* **api:** api update ([4b08bce](https://github.com/onlyfansapi/onlyfansapi-python/commit/4b08bcecf591dcc5d35dad618d89d806cddab4b8)) + + +### Bug Fixes + +* **auth:** prioritize first auth header ([ab97425](https://github.com/onlyfansapi/onlyfansapi-python/commit/ab9742585886846cff053430684a5881ec1540bc)) + ## 0.1.2 (2026-05-25) Full Changelog: [v0.1.1...v0.1.2](https://github.com/onlyfansapi/onlyfansapi-python/compare/v0.1.1...v0.1.2) diff --git a/api.md b/api.md index f704b20c..39147900 100644 --- a/api.md +++ b/api.md @@ -233,18 +233,6 @@ Methods: - client.chats.mark_all_as_read.all(account) -> MarkAllAsReadAllResponse -# Messages - -Types: - -```python -from onlyfansapi.types import MessageAttachTagsResponse -``` - -Methods: - -- client.messages.attach_tags(message_id, \*, account, \*\*params) -> MessageAttachTagsResponse - # ClientSessions Types: @@ -520,12 +508,12 @@ Methods: Types: ```python -from onlyfansapi.types import MediaDownloadResponse, MediaScrapeResponse, MediaUploadResponse +from onlyfansapi.types import MediaScrapeResponse, MediaUploadResponse ``` Methods: -- client.media.download(cdn_url, \*, account) -> str +- client.media.download(cdn_url, \*, account) -> None - client.media.scrape(account, \*\*params) -> MediaScrapeResponse - client.media.upload(account, \*\*params) -> MediaUploadResponse @@ -579,7 +567,7 @@ Methods: - client.media.vault.lists.create(account, \*\*params) -> ListCreateResponse - client.media.vault.lists.retrieve(list_id, \*, account) -> ListRetrieveResponse -- client.media.vault.lists.update(list_id, \*, account) -> ListUpdateResponse +- client.media.vault.lists.update(list_id, \*, account, \*\*params) -> ListUpdateResponse - client.media.vault.lists.list(account, \*\*params) -> ListListResponse - client.media.vault.lists.delete(list_id, \*, account) -> ListDeleteResponse diff --git a/pyproject.toml b/pyproject.toml index 184c99e0..856f0210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onlyfans" -version = "0.1.2" +version = "0.2.0" description = "The official Python library for the OnlyFansAPI API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onlyfansapi/_client.py b/src/onlyfansapi/_client.py index 4fd6cdfc..00d71ffd 100644 --- a/src/onlyfansapi/_client.py +++ b/src/onlyfansapi/_client.py @@ -53,7 +53,6 @@ payouts, stories, accounts, - messages, profiles, settings, webhooks, @@ -90,7 +89,6 @@ from .resources.bundles import BundlesResource, AsyncBundlesResource from .resources.payouts import PayoutsResource, AsyncPayoutsResource from .resources.accounts import AccountsResource, AsyncAccountsResource - from .resources.messages import MessagesResource, AsyncMessagesResource from .resources.profiles import ProfilesResource, AsyncProfilesResource from .resources.webhooks import WebhooksResource, AsyncWebhooksResource from .resources.fans.fans import FansResource, AsyncFansResource @@ -251,12 +249,6 @@ def chats(self) -> ChatsResource: return ChatsResource(self) - @cached_property - def messages(self) -> MessagesResource: - from .resources.messages import MessagesResource - - return MessagesResource(self) - @cached_property def client_sessions(self) -> ClientSessionsResource: from .resources.client_sessions import ClientSessionsResource @@ -311,7 +303,7 @@ def giphy(self) -> GiphyResource: @cached_property def link_tags(self) -> LinkTagsResource: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import LinkTagsResource return LinkTagsResource(self) @@ -505,9 +497,11 @@ def qs(self) -> Querystring: @override def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: - return { - **(self._default if security.get("default", False) else {}), - } + headers: dict[str, str] = {} + if security.get("default", False): + for key, value in self._default.items(): + headers.setdefault(key, value) + return headers @property def _default(self) -> dict[str, str]: @@ -719,12 +713,6 @@ def chats(self) -> AsyncChatsResource: return AsyncChatsResource(self) - @cached_property - def messages(self) -> AsyncMessagesResource: - from .resources.messages import AsyncMessagesResource - - return AsyncMessagesResource(self) - @cached_property def client_sessions(self) -> AsyncClientSessionsResource: from .resources.client_sessions import AsyncClientSessionsResource @@ -779,7 +767,7 @@ def giphy(self) -> AsyncGiphyResource: @cached_property def link_tags(self) -> AsyncLinkTagsResource: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import AsyncLinkTagsResource return AsyncLinkTagsResource(self) @@ -973,9 +961,11 @@ def qs(self) -> Querystring: @override def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: - return { - **(self._default if security.get("default", False) else {}), - } + headers: dict[str, str] = {} + if security.get("default", False): + for key, value in self._default.items(): + headers.setdefault(key, value) + return headers @property def _default(self) -> dict[str, str]: @@ -1129,12 +1119,6 @@ def chats(self) -> chats.ChatsResourceWithRawResponse: return ChatsResourceWithRawResponse(self._client.chats) - @cached_property - def messages(self) -> messages.MessagesResourceWithRawResponse: - from .resources.messages import MessagesResourceWithRawResponse - - return MessagesResourceWithRawResponse(self._client.messages) - @cached_property def client_sessions(self) -> client_sessions.ClientSessionsResourceWithRawResponse: from .resources.client_sessions import ClientSessionsResourceWithRawResponse @@ -1189,7 +1173,7 @@ def giphy(self) -> giphy.GiphyResourceWithRawResponse: @cached_property def link_tags(self) -> link_tags.LinkTagsResourceWithRawResponse: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import LinkTagsResourceWithRawResponse return LinkTagsResourceWithRawResponse(self._client.link_tags) @@ -1422,12 +1406,6 @@ def chats(self) -> chats.AsyncChatsResourceWithRawResponse: return AsyncChatsResourceWithRawResponse(self._client.chats) - @cached_property - def messages(self) -> messages.AsyncMessagesResourceWithRawResponse: - from .resources.messages import AsyncMessagesResourceWithRawResponse - - return AsyncMessagesResourceWithRawResponse(self._client.messages) - @cached_property def client_sessions(self) -> client_sessions.AsyncClientSessionsResourceWithRawResponse: from .resources.client_sessions import AsyncClientSessionsResourceWithRawResponse @@ -1482,7 +1460,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithRawResponse: @cached_property def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithRawResponse: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import AsyncLinkTagsResourceWithRawResponse return AsyncLinkTagsResourceWithRawResponse(self._client.link_tags) @@ -1715,12 +1693,6 @@ def chats(self) -> chats.ChatsResourceWithStreamingResponse: return ChatsResourceWithStreamingResponse(self._client.chats) - @cached_property - def messages(self) -> messages.MessagesResourceWithStreamingResponse: - from .resources.messages import MessagesResourceWithStreamingResponse - - return MessagesResourceWithStreamingResponse(self._client.messages) - @cached_property def client_sessions(self) -> client_sessions.ClientSessionsResourceWithStreamingResponse: from .resources.client_sessions import ClientSessionsResourceWithStreamingResponse @@ -1775,7 +1747,7 @@ def giphy(self) -> giphy.GiphyResourceWithStreamingResponse: @cached_property def link_tags(self) -> link_tags.LinkTagsResourceWithStreamingResponse: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import LinkTagsResourceWithStreamingResponse return LinkTagsResourceWithStreamingResponse(self._client.link_tags) @@ -2008,12 +1980,6 @@ def chats(self) -> chats.AsyncChatsResourceWithStreamingResponse: return AsyncChatsResourceWithStreamingResponse(self._client.chats) - @cached_property - def messages(self) -> messages.AsyncMessagesResourceWithStreamingResponse: - from .resources.messages import AsyncMessagesResourceWithStreamingResponse - - return AsyncMessagesResourceWithStreamingResponse(self._client.messages) - @cached_property def client_sessions(self) -> client_sessions.AsyncClientSessionsResourceWithStreamingResponse: from .resources.client_sessions import AsyncClientSessionsResourceWithStreamingResponse @@ -2068,7 +2034,7 @@ def giphy(self) -> giphy.AsyncGiphyResourceWithStreamingResponse: @cached_property def link_tags(self) -> link_tags.AsyncLinkTagsResourceWithStreamingResponse: - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" from .resources.link_tags import AsyncLinkTagsResourceWithStreamingResponse return AsyncLinkTagsResourceWithStreamingResponse(self._client.link_tags) diff --git a/src/onlyfansapi/_version.py b/src/onlyfansapi/_version.py index 790de9b3..a6edd998 100644 --- a/src/onlyfansapi/_version.py +++ b/src/onlyfansapi/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onlyfansapi" -__version__ = "0.1.2" # x-release-please-version +__version__ = "0.2.0" # x-release-please-version diff --git a/src/onlyfansapi/resources/__init__.py b/src/onlyfansapi/resources/__init__.py index 00eec24d..60042b7d 100644 --- a/src/onlyfansapi/resources/__init__.py +++ b/src/onlyfansapi/resources/__init__.py @@ -128,14 +128,6 @@ AccountsResourceWithStreamingResponse, AsyncAccountsResourceWithStreamingResponse, ) -from .messages import ( - MessagesResource, - AsyncMessagesResource, - MessagesResourceWithRawResponse, - AsyncMessagesResourceWithRawResponse, - MessagesResourceWithStreamingResponse, - AsyncMessagesResourceWithStreamingResponse, -) from .profiles import ( ProfilesResource, AsyncProfilesResource, @@ -388,12 +380,6 @@ "AsyncChatsResourceWithRawResponse", "ChatsResourceWithStreamingResponse", "AsyncChatsResourceWithStreamingResponse", - "MessagesResource", - "AsyncMessagesResource", - "MessagesResourceWithRawResponse", - "AsyncMessagesResourceWithRawResponse", - "MessagesResourceWithStreamingResponse", - "AsyncMessagesResourceWithStreamingResponse", "ClientSessionsResource", "AsyncClientSessionsResource", "ClientSessionsResourceWithRawResponse", diff --git a/src/onlyfansapi/resources/authenticate.py b/src/onlyfansapi/resources/authenticate.py index aae19208..d97b35b7 100644 --- a/src/onlyfansapi/resources/authenticate.py +++ b/src/onlyfansapi/resources/authenticate.py @@ -165,7 +165,7 @@ def start( force_connect: bool | Omit = omit, name: str | Omit = omit, password: str | Omit = omit, - proxy_country: Literal["us", "uk"] | Omit = omit, + proxy_country: Literal["us", "uk", "gb"] | Omit = omit, user_agent: str | Omit = omit, xbc: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -440,7 +440,7 @@ async def start( force_connect: bool | Omit = omit, name: str | Omit = omit, password: str | Omit = omit, - proxy_country: Literal["us", "uk"] | Omit = omit, + proxy_country: Literal["us", "uk", "gb"] | Omit = omit, user_agent: str | Omit = omit, xbc: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. diff --git a/src/onlyfansapi/resources/chats/chats.py b/src/onlyfansapi/resources/chats/chats.py index 2e50426d..1a6591bf 100644 --- a/src/onlyfansapi/resources/chats/chats.py +++ b/src/onlyfansapi/resources/chats/chats.py @@ -399,8 +399,8 @@ def start_typing( ) -> ChatStartTypingResponse: """ Calling this endpoint will show the target fan a "Model is typing..." note in - the chat for ~4 seconds. If you want to continue showing the indicator call this - endpoint multiple times. Free - no credits charged. + the chat for ~4 seconds. Duplicate calls for the same account and chat are + coalesced during that window. Args: extra_headers: Send extra headers @@ -811,8 +811,8 @@ async def start_typing( ) -> ChatStartTypingResponse: """ Calling this endpoint will show the target fan a "Model is typing..." note in - the chat for ~4 seconds. If you want to continue showing the indicator call this - endpoint multiple times. Free - no credits charged. + the chat for ~4 seconds. Duplicate calls for the same account and chat are + coalesced during that window. Args: extra_headers: Send extra headers diff --git a/src/onlyfansapi/resources/client_sessions.py b/src/onlyfansapi/resources/client_sessions.py index c1ea87e0..38a1d318 100644 --- a/src/onlyfansapi/resources/client_sessions.py +++ b/src/onlyfansapi/resources/client_sessions.py @@ -49,7 +49,7 @@ def create( *, display_name: str, client_reference_id: str | Omit = omit, - proxy_country: Optional[Literal["us", "uk"]] | Omit = omit, + proxy_country: Optional[Literal["us", "uk", "gb"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -117,7 +117,7 @@ async def create( *, display_name: str, client_reference_id: str | Omit = omit, - proxy_country: Optional[Literal["us", "uk"]] | Omit = omit, + proxy_country: Optional[Literal["us", "uk", "gb"]] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/onlyfansapi/resources/data_exports.py b/src/onlyfansapi/resources/data_exports.py index 2eaf7c0e..05ee9932 100644 --- a/src/onlyfansapi/resources/data_exports.py +++ b/src/onlyfansapi/resources/data_exports.py @@ -117,11 +117,12 @@ def create( (optional, USD), `maxSubscribePrice` (optional, USD), `location` (optional), `minPostsCount` (optional, minimum posts), `minPhotosCount` (optional, minimum photos), `minVideosCount` (optional, minimum videos), `minSubscribersCount` - (optional, minimum subscribers), `minJoinDate` (optional, ISO 8601 date), - `minLastSeenAt` (optional, ISO 8601 date), `createdAtFrom` (optional, ISO 8601 - date, profile added to DB after), `createdAtTo` (optional, ISO 8601 date, - profile added to DB before), `instagram` (optional), `twitter` (optional), - `tiktok` (optional), `maxResults` (optional, limit results). + (optional, minimum subscribers), `maxSubscribersCount` (optional, maximum + subscribers), `minJoinDate` (optional, ISO 8601 date), `minLastSeenAt` + (optional, ISO 8601 date), `createdAtFrom` (optional, ISO 8601 date, profile + added to DB after), `createdAtTo` (optional, ISO 8601 date, profile added to DB + before), `instagram` (optional), `twitter` (optional), `tiktok` (optional), + `maxResults` (optional, limit results). extra_headers: Send extra headers @@ -466,11 +467,12 @@ async def create( (optional, USD), `maxSubscribePrice` (optional, USD), `location` (optional), `minPostsCount` (optional, minimum posts), `minPhotosCount` (optional, minimum photos), `minVideosCount` (optional, minimum videos), `minSubscribersCount` - (optional, minimum subscribers), `minJoinDate` (optional, ISO 8601 date), - `minLastSeenAt` (optional, ISO 8601 date), `createdAtFrom` (optional, ISO 8601 - date, profile added to DB after), `createdAtTo` (optional, ISO 8601 date, - profile added to DB before), `instagram` (optional), `twitter` (optional), - `tiktok` (optional), `maxResults` (optional, limit results). + (optional, minimum subscribers), `maxSubscribersCount` (optional, maximum + subscribers), `minJoinDate` (optional, ISO 8601 date), `minLastSeenAt` + (optional, ISO 8601 date), `createdAtFrom` (optional, ISO 8601 date, profile + added to DB after), `createdAtTo` (optional, ISO 8601 date, profile added to DB + before), `instagram` (optional), `twitter` (optional), `tiktok` (optional), + `maxResults` (optional, limit results). extra_headers: Send extra headers diff --git a/src/onlyfansapi/resources/link_tags.py b/src/onlyfansapi/resources/link_tags.py index 75f22c84..46d57c1c 100644 --- a/src/onlyfansapi/resources/link_tags.py +++ b/src/onlyfansapi/resources/link_tags.py @@ -24,7 +24,7 @@ class LinkTagsResource(SyncAPIResource): - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" @cached_property def with_raw_response(self) -> LinkTagsResourceWithRawResponse: @@ -48,7 +48,7 @@ def with_streaming_response(self) -> LinkTagsResourceWithStreamingResponse: def list( self, *, - type: Literal["trial_links", "tracking_links"] | Omit = omit, + type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -57,11 +57,11 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LinkTagListResponse: """ - Get all existing tags that have been used on free trial links and/or tracking - links for this account. This is a free endpoint. + Get all existing tags that have been used on free trial links, tracking links, + and/or Smart Links for this account. This is a free endpoint. Args: - type: Filter by link type. If not provided, returns tags for both types. + type: Filter by link type. If not provided, returns tags for all types. extra_headers: Send extra headers @@ -85,7 +85,7 @@ def list( class AsyncLinkTagsResource(AsyncAPIResource): - """APIs for managing tags on free trial links and tracking links""" + """APIs for managing tags on free trial links, tracking links, and Smart Links""" @cached_property def with_raw_response(self) -> AsyncLinkTagsResourceWithRawResponse: @@ -109,7 +109,7 @@ def with_streaming_response(self) -> AsyncLinkTagsResourceWithStreamingResponse: async def list( self, *, - type: Literal["trial_links", "tracking_links"] | Omit = omit, + type: Literal["trial_links", "tracking_links", "smart_links"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -118,11 +118,11 @@ async def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> LinkTagListResponse: """ - Get all existing tags that have been used on free trial links and/or tracking - links for this account. This is a free endpoint. + Get all existing tags that have been used on free trial links, tracking links, + and/or Smart Links for this account. This is a free endpoint. Args: - type: Filter by link type. If not provided, returns tags for both types. + type: Filter by link type. If not provided, returns tags for all types. extra_headers: Send extra headers diff --git a/src/onlyfansapi/resources/media/media.py b/src/onlyfansapi/resources/media/media.py index cc9894ea..d918af4e 100644 --- a/src/onlyfansapi/resources/media/media.py +++ b/src/onlyfansapi/resources/media/media.py @@ -17,7 +17,7 @@ AsyncUploadsResourceWithStreamingResponse, ) from ..._files import deepcopy_with_paths -from ..._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given +from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, FileTypes, omit, not_given from ..._utils import extract_files, path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -81,14 +81,15 @@ def download( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> str: + ) -> None: """Downloads a file directly from a `https://cdn*.onlyfans.com/*` URL. When the file is already cached on our CDN, this endpoint returns a `302` redirect to a `https://cdn.fansapi.com/*` URL. Most HTTP clients follow redirects - automatically (`curl` requires `-L`). Otherwise, the file is streamed through - our proxies and queued for caching. + automatically (`curl` requires `-L`). Otherwise, the file is redirected to + `dl.fansapi.com`, which streams it through the account proxy and reports billing + back to the API. Args: extra_headers: Send extra headers @@ -103,13 +104,13 @@ def download( raise ValueError(f"Expected a non-empty value for `account` but received {account!r}") if not cdn_url: raise ValueError(f"Expected a non-empty value for `cdn_url` but received {cdn_url!r}") - extra_headers = {"Accept": "text/plain", **(extra_headers or {})} + extra_headers = {"Accept": "*/*", **(extra_headers or {})} return self._get( path_template("/api/{account}/media/download/{cdn_url}", account=account, cdn_url=cdn_url), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=str, + cast_to=NoneType, ) def scrape( @@ -285,14 +286,15 @@ async def download( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> str: + ) -> None: """Downloads a file directly from a `https://cdn*.onlyfans.com/*` URL. When the file is already cached on our CDN, this endpoint returns a `302` redirect to a `https://cdn.fansapi.com/*` URL. Most HTTP clients follow redirects - automatically (`curl` requires `-L`). Otherwise, the file is streamed through - our proxies and queued for caching. + automatically (`curl` requires `-L`). Otherwise, the file is redirected to + `dl.fansapi.com`, which streams it through the account proxy and reports billing + back to the API. Args: extra_headers: Send extra headers @@ -307,13 +309,13 @@ async def download( raise ValueError(f"Expected a non-empty value for `account` but received {account!r}") if not cdn_url: raise ValueError(f"Expected a non-empty value for `cdn_url` but received {cdn_url!r}") - extra_headers = {"Accept": "text/plain", **(extra_headers or {})} + extra_headers = {"Accept": "*/*", **(extra_headers or {})} return await self._get( path_template("/api/{account}/media/download/{cdn_url}", account=account, cdn_url=cdn_url), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=str, + cast_to=NoneType, ) async def scrape( diff --git a/src/onlyfansapi/resources/media/vault/lists/lists.py b/src/onlyfansapi/resources/media/vault/lists/lists.py index f326e94e..b5f709f2 100644 --- a/src/onlyfansapi/resources/media/vault/lists/lists.py +++ b/src/onlyfansapi/resources/media/vault/lists/lists.py @@ -23,7 +23,7 @@ async_to_streamed_response_wrapper, ) from ....._base_client import make_request_options -from .....types.media.vault import list_list_params, list_create_params +from .....types.media.vault import list_list_params, list_create_params, list_update_params from .....types.media.vault.list_list_response import ListListResponse from .....types.media.vault.list_create_response import ListCreateResponse from .....types.media.vault.list_delete_response import ListDeleteResponse @@ -135,6 +135,7 @@ def update( list_id: str, *, account: str, + name: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -142,10 +143,13 @@ def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ListUpdateResponse: - """ - Rename a Vault list. + """Rename a Vault list. Args: + name: The new name for the vault list. + + Must not be greater than 255 characters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -160,6 +164,7 @@ def update( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return self._put( path_template("/api/{account}/media/vault/lists/{list_id}", account=account, list_id=list_id), + body=maybe_transform({"name": name}, list_update_params.ListUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -358,6 +363,7 @@ async def update( list_id: str, *, account: str, + name: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -365,10 +371,13 @@ async def update( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ListUpdateResponse: - """ - Rename a Vault list. + """Rename a Vault list. Args: + name: The new name for the vault list. + + Must not be greater than 255 characters. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -383,6 +392,7 @@ async def update( raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") return await self._put( path_template("/api/{account}/media/vault/lists/{list_id}", account=account, list_id=list_id), + body=await async_maybe_transform({"name": name}, list_update_params.ListUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/onlyfansapi/resources/messages.py b/src/onlyfansapi/resources/messages.py deleted file mode 100644 index 414fe8d4..00000000 --- a/src/onlyfansapi/resources/messages.py +++ /dev/null @@ -1,211 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..types import message_attach_tags_params -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import path_template, maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from .._base_client import make_request_options -from ..types.message_attach_tags_response import MessageAttachTagsResponse - -__all__ = ["MessagesResource", "AsyncMessagesResource"] - - -class MessagesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> MessagesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/onlyfansapi/onlyfansapi-python#accessing-raw-response-data-eg-headers - """ - return MessagesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> MessagesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/onlyfansapi/onlyfansapi-python#with_streaming_response - """ - return MessagesResourceWithStreamingResponse(self) - - def attach_tags( - self, - message_id: str, - *, - account: str, - rf_guest: str | Omit = omit, - rf_partner: str | Omit = omit, - rf_tag: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> MessageAttachTagsResponse: - """Attach Tags (Release Forms) to a message that has already been sent. - - Please - note, that this is a "sync" operation - for example, if you provide empty - `rfTag` it will remove all existing tags already attached to the message. - - Args: - rf_guest: Array of OnlyFans Release Form Guest IDs to tag in your message - - rf_partner: Array of OnlyFans Release Form Partners IDs to tag in your message - - rf_tag: Array of OnlyFans Creator User IDs to tag in your message - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account: - raise ValueError(f"Expected a non-empty value for `account` but received {account!r}") - if not message_id: - raise ValueError(f"Expected a non-empty value for `message_id` but received {message_id!r}") - return self._post( - path_template("/api/{account}/messages/{message_id}/attach-tags", account=account, message_id=message_id), - body=maybe_transform( - { - "rf_guest": rf_guest, - "rf_partner": rf_partner, - "rf_tag": rf_tag, - }, - message_attach_tags_params.MessageAttachTagsParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=MessageAttachTagsResponse, - ) - - -class AsyncMessagesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncMessagesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/onlyfansapi/onlyfansapi-python#accessing-raw-response-data-eg-headers - """ - return AsyncMessagesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncMessagesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/onlyfansapi/onlyfansapi-python#with_streaming_response - """ - return AsyncMessagesResourceWithStreamingResponse(self) - - async def attach_tags( - self, - message_id: str, - *, - account: str, - rf_guest: str | Omit = omit, - rf_partner: str | Omit = omit, - rf_tag: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> MessageAttachTagsResponse: - """Attach Tags (Release Forms) to a message that has already been sent. - - Please - note, that this is a "sync" operation - for example, if you provide empty - `rfTag` it will remove all existing tags already attached to the message. - - Args: - rf_guest: Array of OnlyFans Release Form Guest IDs to tag in your message - - rf_partner: Array of OnlyFans Release Form Partners IDs to tag in your message - - rf_tag: Array of OnlyFans Creator User IDs to tag in your message - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not account: - raise ValueError(f"Expected a non-empty value for `account` but received {account!r}") - if not message_id: - raise ValueError(f"Expected a non-empty value for `message_id` but received {message_id!r}") - return await self._post( - path_template("/api/{account}/messages/{message_id}/attach-tags", account=account, message_id=message_id), - body=await async_maybe_transform( - { - "rf_guest": rf_guest, - "rf_partner": rf_partner, - "rf_tag": rf_tag, - }, - message_attach_tags_params.MessageAttachTagsParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=MessageAttachTagsResponse, - ) - - -class MessagesResourceWithRawResponse: - def __init__(self, messages: MessagesResource) -> None: - self._messages = messages - - self.attach_tags = to_raw_response_wrapper( - messages.attach_tags, - ) - - -class AsyncMessagesResourceWithRawResponse: - def __init__(self, messages: AsyncMessagesResource) -> None: - self._messages = messages - - self.attach_tags = async_to_raw_response_wrapper( - messages.attach_tags, - ) - - -class MessagesResourceWithStreamingResponse: - def __init__(self, messages: MessagesResource) -> None: - self._messages = messages - - self.attach_tags = to_streamed_response_wrapper( - messages.attach_tags, - ) - - -class AsyncMessagesResourceWithStreamingResponse: - def __init__(self, messages: AsyncMessagesResource) -> None: - self._messages = messages - - self.attach_tags = async_to_streamed_response_wrapper( - messages.attach_tags, - ) diff --git a/src/onlyfansapi/resources/release_forms.py b/src/onlyfansapi/resources/release_forms.py index 42af3a5c..a927293d 100644 --- a/src/onlyfansapi/resources/release_forms.py +++ b/src/onlyfansapi/resources/release_forms.py @@ -151,7 +151,8 @@ def list_taggable_users( These are verified creators who have signed release forms to appear in your content. Use - `offset` and `limit` for pagination. + `offset` and `limit` for pagination, following `_pagination.next_page` until it + is `null`. Args: filter: Filter users by type: `all` or `pending`. @@ -321,7 +322,8 @@ async def list_taggable_users( These are verified creators who have signed release forms to appear in your content. Use - `offset` and `limit` for pagination. + `offset` and `limit` for pagination, following `_pagination.next_page` until it + is `null`. Args: filter: Filter users by type: `all` or `pending`. diff --git a/src/onlyfansapi/resources/smart_link_postbacks.py b/src/onlyfansapi/resources/smart_link_postbacks.py index 7c10116c..d3301aeb 100644 --- a/src/onlyfansapi/resources/smart_link_postbacks.py +++ b/src/onlyfansapi/resources/smart_link_postbacks.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Optional +from typing import Iterable, Optional from typing_extensions import Literal import httpx @@ -56,6 +56,9 @@ def create( conversion_types: SequenceNotStr[str], smart_link_scope: Literal["global", "campaign_specific"], url: str, + body: str | Omit = omit, + headers: Iterable[smart_link_postback_create_params.Header] | Omit = omit, + http_method: Literal["GET", "POST"] | Omit = omit, smart_link_ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -73,8 +76,15 @@ def create( smart_link_scope: `global` fires for all Smart Links. `campaign_specific` fires only for selected Smart Links. - url: The destination URL. Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and - `{ttclid}` are replaced when the postback is dispatched. + url: The destination URL. Variables such as `{external_click_id}`, `{fbclid}`, + `{gclid}`, and `{ttclid}` are replaced when the postback is dispatched. + + body: Optional request body template for POST postbacks. Variables are replaced when + the postback is dispatched. + + headers: Optional request headers. Header values may include postback variables. + + http_method: HTTP method used for the postback request. Defaults to `GET` when omitted. smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`. @@ -93,6 +103,9 @@ def create( "conversion_types": conversion_types, "smart_link_scope": smart_link_scope, "url": url, + "body": body, + "headers": headers, + "http_method": http_method, "smart_link_ids": smart_link_ids, }, smart_link_postback_create_params.SmartLinkPostbackCreateParams, @@ -141,6 +154,9 @@ def update( conversion_types: SequenceNotStr[str], smart_link_scope: Literal["global", "campaign_specific"], url: str, + body: str | Omit = omit, + headers: Iterable[smart_link_postback_update_params.Header] | Omit = omit, + http_method: Literal["GET", "POST"] | Omit = omit, smart_link_ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -159,6 +175,13 @@ def update( url: The destination URL. + body: Optional request body template for POST postbacks. Variables are replaced when + the postback is dispatched. + + headers: Optional request headers. Header values may include postback variables. + + http_method: HTTP method used for the postback request. Existing value is kept when omitted. + smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`. extra_headers: Send extra headers @@ -176,6 +199,9 @@ def update( "conversion_types": conversion_types, "smart_link_scope": smart_link_scope, "url": url, + "body": body, + "headers": headers, + "http_method": http_method, "smart_link_ids": smart_link_ids, }, smart_link_postback_update_params.SmartLinkPostbackUpdateParams, @@ -265,6 +291,9 @@ async def create( conversion_types: SequenceNotStr[str], smart_link_scope: Literal["global", "campaign_specific"], url: str, + body: str | Omit = omit, + headers: Iterable[smart_link_postback_create_params.Header] | Omit = omit, + http_method: Literal["GET", "POST"] | Omit = omit, smart_link_ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -282,8 +311,15 @@ async def create( smart_link_scope: `global` fires for all Smart Links. `campaign_specific` fires only for selected Smart Links. - url: The destination URL. Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and - `{ttclid}` are replaced when the postback is dispatched. + url: The destination URL. Variables such as `{external_click_id}`, `{fbclid}`, + `{gclid}`, and `{ttclid}` are replaced when the postback is dispatched. + + body: Optional request body template for POST postbacks. Variables are replaced when + the postback is dispatched. + + headers: Optional request headers. Header values may include postback variables. + + http_method: HTTP method used for the postback request. Defaults to `GET` when omitted. smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`. @@ -302,6 +338,9 @@ async def create( "conversion_types": conversion_types, "smart_link_scope": smart_link_scope, "url": url, + "body": body, + "headers": headers, + "http_method": http_method, "smart_link_ids": smart_link_ids, }, smart_link_postback_create_params.SmartLinkPostbackCreateParams, @@ -350,6 +389,9 @@ async def update( conversion_types: SequenceNotStr[str], smart_link_scope: Literal["global", "campaign_specific"], url: str, + body: str | Omit = omit, + headers: Iterable[smart_link_postback_update_params.Header] | Omit = omit, + http_method: Literal["GET", "POST"] | Omit = omit, smart_link_ids: SequenceNotStr[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -368,6 +410,13 @@ async def update( url: The destination URL. + body: Optional request body template for POST postbacks. Variables are replaced when + the postback is dispatched. + + headers: Optional request headers. Header values may include postback variables. + + http_method: HTTP method used for the postback request. Existing value is kept when omitted. + smart_link_ids: Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`. extra_headers: Send extra headers @@ -385,6 +434,9 @@ async def update( "conversion_types": conversion_types, "smart_link_scope": smart_link_scope, "url": url, + "body": body, + "headers": headers, + "http_method": http_method, "smart_link_ids": smart_link_ids, }, smart_link_postback_update_params.SmartLinkPostbackUpdateParams, diff --git a/src/onlyfansapi/resources/smart_links.py b/src/onlyfansapi/resources/smart_links.py index 375f214b..459927a9 100644 --- a/src/onlyfansapi/resources/smart_links.py +++ b/src/onlyfansapi/resources/smart_links.py @@ -156,10 +156,12 @@ def list( self, *, account_ids: Optional[str] | Omit = omit, + filter: smart_link_list_params.Filter | Omit = omit, limit: int | Omit = omit, meta_pixel_ids: Optional[str] | Omit = omit, name: Optional[str] | Omit = omit, offset: int | Omit = omit, + pixel_ids: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -176,12 +178,14 @@ def list( limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not be greater than 1000. - meta_pixel_ids: Comma-separated Meta Pixel IDs to include. + meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include. name: Filter Smart Links by name. Must not be greater than 255 characters. offset: The offset used for pagination. Default `0`. Must be at least 0. + pixel_ids: Comma-separated ad platform Pixel IDs to include. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -200,10 +204,12 @@ def list( query=maybe_transform( { "account_ids": account_ids, + "filter": filter, "limit": limit, "meta_pixel_ids": meta_pixel_ids, "name": name, "offset": offset, + "pixel_ids": pixel_ids, }, smart_link_list_params.SmartLinkListParams, ), @@ -394,6 +400,7 @@ def list_fans( min_revenue_net: float | Omit = omit, min_tips_net: float | Omit = omit, offset: int | Omit = omit, + previously_subscribed: bool | Omit = omit, sort: Literal[ "revenue_net", "-revenue_net", @@ -405,6 +412,7 @@ def list_fans( "-converted_at", ] | Omit = omit, + subscribed_using_promo: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -429,8 +437,13 @@ def list_fans( offset: Offset for pagination. Default `0` + previously_subscribed: Optional - Filter to returning subscribers (fans previously subscribed before + this subscription) + sort: Optional sort field. Default `-revenue_net` + subscribed_using_promo: Optional - Filter to fans who subscribed via a promotion/offer + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -456,7 +469,9 @@ def list_fans( "min_revenue_net": min_revenue_net, "min_tips_net": min_tips_net, "offset": offset, + "previously_subscribed": previously_subscribed, "sort": sort, + "subscribed_using_promo": subscribed_using_promo, }, smart_link_list_fans_params.SmartLinkListFansParams, ), @@ -737,10 +752,12 @@ async def list( self, *, account_ids: Optional[str] | Omit = omit, + filter: smart_link_list_params.Filter | Omit = omit, limit: int | Omit = omit, meta_pixel_ids: Optional[str] | Omit = omit, name: Optional[str] | Omit = omit, offset: int | Omit = omit, + pixel_ids: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -757,12 +774,14 @@ async def list( limit: The number of Smart Links to return. Default `50`. Must be at least 1. Must not be greater than 1000. - meta_pixel_ids: Comma-separated Meta Pixel IDs to include. + meta_pixel_ids: Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include. name: Filter Smart Links by name. Must not be greater than 255 characters. offset: The offset used for pagination. Default `0`. Must be at least 0. + pixel_ids: Comma-separated ad platform Pixel IDs to include. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -781,10 +800,12 @@ async def list( query=await async_maybe_transform( { "account_ids": account_ids, + "filter": filter, "limit": limit, "meta_pixel_ids": meta_pixel_ids, "name": name, "offset": offset, + "pixel_ids": pixel_ids, }, smart_link_list_params.SmartLinkListParams, ), @@ -975,6 +996,7 @@ async def list_fans( min_revenue_net: float | Omit = omit, min_tips_net: float | Omit = omit, offset: int | Omit = omit, + previously_subscribed: bool | Omit = omit, sort: Literal[ "revenue_net", "-revenue_net", @@ -986,6 +1008,7 @@ async def list_fans( "-converted_at", ] | Omit = omit, + subscribed_using_promo: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1010,8 +1033,13 @@ async def list_fans( offset: Offset for pagination. Default `0` + previously_subscribed: Optional - Filter to returning subscribers (fans previously subscribed before + this subscription) + sort: Optional sort field. Default `-revenue_net` + subscribed_using_promo: Optional - Filter to fans who subscribed via a promotion/offer + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1037,7 +1065,9 @@ async def list_fans( "min_revenue_net": min_revenue_net, "min_tips_net": min_tips_net, "offset": offset, + "previously_subscribed": previously_subscribed, "sort": sort, + "subscribed_using_promo": subscribed_using_promo, }, smart_link_list_fans_params.SmartLinkListFansParams, ), diff --git a/src/onlyfansapi/types/__init__.py b/src/onlyfansapi/types/__init__.py index 6d3ddf1a..8370c488 100644 --- a/src/onlyfansapi/types/__init__.py +++ b/src/onlyfansapi/types/__init__.py @@ -66,7 +66,6 @@ from .user_retrieve_response import UserRetrieveResponse as UserRetrieveResponse from .data_export_list_params import DataExportListParams as DataExportListParams from .fan_list_expired_params import FanListExpiredParams as FanListExpiredParams -from .media_download_response import MediaDownloadResponse as MediaDownloadResponse from .post_unarchive_response import PostUnarchiveResponse as PostUnarchiveResponse from .profile_retrieve_params import ProfileRetrieveParams as ProfileRetrieveParams from .promotion_create_params import PromotionCreateParams as PromotionCreateParams @@ -115,7 +114,6 @@ from .fan_set_custom_name_params import FanSetCustomNameParams as FanSetCustomNameParams from .giphy_list_trending_params import GiphyListTrendingParams as GiphyListTrendingParams from .mass_messaging_send_params import MassMessagingSendParams as MassMessagingSendParams -from .message_attach_tags_params import MessageAttachTagsParams as MessageAttachTagsParams from .notification_list_response import NotificationListResponse as NotificationListResponse from .smart_link_create_response import SmartLinkCreateResponse as SmartLinkCreateResponse from .smart_link_delete_response import SmartLinkDeleteResponse as SmartLinkDeleteResponse @@ -143,7 +141,6 @@ from .mass_messaging_list_response import MassMessagingListResponse as MassMessagingListResponse from .mass_messaging_send_response import MassMessagingSendResponse as MassMessagingSendResponse from .mass_messaging_update_params import MassMessagingUpdateParams as MassMessagingUpdateParams -from .message_attach_tags_response import MessageAttachTagsResponse as MessageAttachTagsResponse from .smart_link_retrieve_response import SmartLinkRetrieveResponse as SmartLinkRetrieveResponse from .trial_link_retrieve_response import TrialLinkRetrieveResponse as TrialLinkRetrieveResponse from .webhook_list_events_response import WebhookListEventsResponse as WebhookListEventsResponse diff --git a/src/onlyfansapi/types/analytics/financial/profitability_get_history_response.py b/src/onlyfansapi/types/analytics/financial/profitability_get_history_response.py index bca137b8..7fa2af0d 100644 --- a/src/onlyfansapi/types/analytics/financial/profitability_get_history_response.py +++ b/src/onlyfansapi/types/analytics/financial/profitability_get_history_response.py @@ -1,25 +1,49 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from typing_extensions import TypeAlias + +from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["ProfitabilityGetHistoryResponse", "ProfitabilityGetHistoryResponseItem"] +__all__ = ["ProfitabilityGetHistoryResponse", "Data"] + + +class Data(BaseModel): + active_milestones: Optional[str] = FieldInfo(alias="activeMilestones", default=None) + + agency_earnings: Optional[str] = FieldInfo(alias="agencyEarnings", default=None) + + commission_amount: Optional[str] = FieldInfo(alias="commissionAmount", default=None) + + commission_rate: Optional[str] = FieldInfo(alias="commissionRate", default=None) + costs: Optional[List[object]] = None -class ProfitabilityGetHistoryResponseItem(BaseModel): - gross_revenue: Optional[float] = None + creator_name: Optional[str] = FieldInfo(alias="creatorName", default=None) - margin: Optional[float] = None + has_commission_for_period: Optional[bool] = FieldInfo(alias="hasCommissionForPeriod", default=None) + + has_costs_for_period: Optional[bool] = FieldInfo(alias="hasCostsForPeriod", default=None) + + margin_percentage: Optional[str] = FieldInfo(alias="marginPercentage", default=None) month: Optional[int] = None - net_revenue: Optional[float] = None + only_fans_user_id: Optional[int] = FieldInfo(alias="onlyFansUserId", default=None) + + profit: Optional[str] = None + + projected_net: Optional[str] = FieldInfo(alias="projectedNet", default=None) + + rate_periods: Optional[List[object]] = FieldInfo(alias="ratePeriods", default=None) + + referral_note: Optional[str] = FieldInfo(alias="referralNote", default=None) - profit: Optional[float] = None + total_costs: Optional[str] = FieldInfo(alias="totalCosts", default=None) year: Optional[int] = None -ProfitabilityGetHistoryResponse: TypeAlias = List[ProfitabilityGetHistoryResponseItem] +class ProfitabilityGetHistoryResponse(BaseModel): + data: Optional[List[Data]] = None diff --git a/src/onlyfansapi/types/analytics/financial/profitability_get_profitability_response.py b/src/onlyfansapi/types/analytics/financial/profitability_get_profitability_response.py index 9670755f..8cacbcc4 100644 --- a/src/onlyfansapi/types/analytics/financial/profitability_get_profitability_response.py +++ b/src/onlyfansapi/types/analytics/financial/profitability_get_profitability_response.py @@ -1,29 +1,49 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from typing_extensions import TypeAlias + +from pydantic import Field as FieldInfo from ...._models import BaseModel -__all__ = ["ProfitabilityGetProfitabilityResponse", "ProfitabilityGetProfitabilityResponseItem"] +__all__ = ["ProfitabilityGetProfitabilityResponse", "Data"] + + +class Data(BaseModel): + active_milestones: Optional[str] = FieldInfo(alias="activeMilestones", default=None) + + agency_earnings: Optional[str] = FieldInfo(alias="agencyEarnings", default=None) + + commission_amount: Optional[str] = FieldInfo(alias="commissionAmount", default=None) + + commission_rate: Optional[str] = FieldInfo(alias="commissionRate", default=None) + + costs: Optional[List[object]] = None + + creator_name: Optional[str] = FieldInfo(alias="creatorName", default=None) + + has_commission_for_period: Optional[bool] = FieldInfo(alias="hasCommissionForPeriod", default=None) + + has_costs_for_period: Optional[bool] = FieldInfo(alias="hasCostsForPeriod", default=None) + margin_percentage: Optional[str] = FieldInfo(alias="marginPercentage", default=None) -class ProfitabilityGetProfitabilityResponseItem(BaseModel): - commission: Optional[float] = None + month: Optional[int] = None - creator_id: Optional[int] = None + only_fans_user_id: Optional[int] = FieldInfo(alias="onlyFansUserId", default=None) - gross_revenue: Optional[float] = None + profit: Optional[str] = None - margin: Optional[float] = None + projected_net: Optional[str] = FieldInfo(alias="projectedNet", default=None) - name: Optional[str] = None + rate_periods: Optional[List[object]] = FieldInfo(alias="ratePeriods", default=None) - net_revenue: Optional[float] = None + referral_note: Optional[str] = FieldInfo(alias="referralNote", default=None) - profit: Optional[float] = None + total_costs: Optional[str] = FieldInfo(alias="totalCosts", default=None) - total_costs: Optional[float] = None + year: Optional[int] = None -ProfitabilityGetProfitabilityResponse: TypeAlias = List[ProfitabilityGetProfitabilityResponseItem] +class ProfitabilityGetProfitabilityResponse(BaseModel): + data: Optional[List[Data]] = None diff --git a/src/onlyfansapi/types/authenticate_start_params.py b/src/onlyfansapi/types/authenticate_start_params.py index 0c7d0590..9a514021 100644 --- a/src/onlyfansapi/types/authenticate_start_params.py +++ b/src/onlyfansapi/types/authenticate_start_params.py @@ -53,7 +53,7 @@ class AuthenticateStartParams(TypedDict, total=False): Required when auth_type is `email_password`. """ - proxy_country: Annotated[Literal["us", "uk"], PropertyInfo(alias="proxyCountry")] + proxy_country: Annotated[Literal["us", "uk", "gb"], PropertyInfo(alias="proxyCountry")] """The country of the managed proxy server you want to use. Eg. "us" for United States. Cannot be used together with customProxy. diff --git a/src/onlyfansapi/types/client_session_create_params.py b/src/onlyfansapi/types/client_session_create_params.py index 27bb09b9..89116429 100644 --- a/src/onlyfansapi/types/client_session_create_params.py +++ b/src/onlyfansapi/types/client_session_create_params.py @@ -15,4 +15,4 @@ class ClientSessionCreateParams(TypedDict, total=False): client_reference_id: str """Your Internal Reference ID for the connected account.""" - proxy_country: Optional[Literal["us", "uk"]] + proxy_country: Optional[Literal["us", "uk", "gb"]] diff --git a/src/onlyfansapi/types/data_export_create_params.py b/src/onlyfansapi/types/data_export_create_params.py index 6e33559f..ecc3ccac 100644 --- a/src/onlyfansapi/types/data_export_create_params.py +++ b/src/onlyfansapi/types/data_export_create_params.py @@ -72,9 +72,9 @@ class DataExportCreateParams(TypedDict, total=False): (optional, USD), `location` (optional), `minPostsCount` (optional, minimum posts), `minPhotosCount` (optional, minimum photos), `minVideosCount` (optional, minimum videos), `minSubscribersCount` (optional, minimum subscribers), - `minJoinDate` (optional, ISO 8601 date), `minLastSeenAt` (optional, ISO 8601 - date), `createdAtFrom` (optional, ISO 8601 date, profile added to DB after), - `createdAtTo` (optional, ISO 8601 date, profile added to DB before), `instagram` - (optional), `twitter` (optional), `tiktok` (optional), `maxResults` (optional, - limit results). + `maxSubscribersCount` (optional, maximum subscribers), `minJoinDate` (optional, + ISO 8601 date), `minLastSeenAt` (optional, ISO 8601 date), `createdAtFrom` + (optional, ISO 8601 date, profile added to DB after), `createdAtTo` (optional, + ISO 8601 date, profile added to DB before), `instagram` (optional), `twitter` + (optional), `tiktok` (optional), `maxResults` (optional, limit results). """ diff --git a/src/onlyfansapi/types/data_export_list_response.py b/src/onlyfansapi/types/data_export_list_response.py index 76ca5269..a721c5ba 100644 --- a/src/onlyfansapi/types/data_export_list_response.py +++ b/src/onlyfansapi/types/data_export_list_response.py @@ -80,6 +80,8 @@ class DataData(BaseModel): failed_at: Optional[str] = None + failed_downloads: Optional[int] = None + failed_reason: Optional[str] = None file_type: Optional[str] = None diff --git a/src/onlyfansapi/types/data_export_retrieve_response.py b/src/onlyfansapi/types/data_export_retrieve_response.py index bcfde627..d9cc2ebb 100644 --- a/src/onlyfansapi/types/data_export_retrieve_response.py +++ b/src/onlyfansapi/types/data_export_retrieve_response.py @@ -74,6 +74,8 @@ class Data(BaseModel): failed_at: Optional[str] = None + failed_downloads: Optional[int] = None + failed_reason: Optional[str] = None file_type: Optional[str] = None diff --git a/src/onlyfansapi/types/link_tag_list_params.py b/src/onlyfansapi/types/link_tag_list_params.py index 5e15ebb3..32f06094 100644 --- a/src/onlyfansapi/types/link_tag_list_params.py +++ b/src/onlyfansapi/types/link_tag_list_params.py @@ -8,5 +8,5 @@ class LinkTagListParams(TypedDict, total=False): - type: Literal["trial_links", "tracking_links"] - """Filter by link type. If not provided, returns tags for both types.""" + type: Literal["trial_links", "tracking_links", "smart_links"] + """Filter by link type. If not provided, returns tags for all types.""" diff --git a/src/onlyfansapi/types/media/vault/__init__.py b/src/onlyfansapi/types/media/vault/__init__.py index 87e91afe..1335bbc4 100644 --- a/src/onlyfansapi/types/media/vault/__init__.py +++ b/src/onlyfansapi/types/media/vault/__init__.py @@ -5,6 +5,7 @@ from .list_list_params import ListListParams as ListListParams from .list_create_params import ListCreateParams as ListCreateParams from .list_list_response import ListListResponse as ListListResponse +from .list_update_params import ListUpdateParams as ListUpdateParams from .list_create_response import ListCreateResponse as ListCreateResponse from .list_delete_response import ListDeleteResponse as ListDeleteResponse from .list_update_response import ListUpdateResponse as ListUpdateResponse diff --git a/src/onlyfansapi/types/media/vault/list_update_params.py b/src/onlyfansapi/types/media/vault/list_update_params.py new file mode 100644 index 00000000..1e8190f3 --- /dev/null +++ b/src/onlyfansapi/types/media/vault/list_update_params.py @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ListUpdateParams"] + + +class ListUpdateParams(TypedDict, total=False): + account: Required[str] + + name: Required[str] + """The new name for the vault list. Must not be greater than 255 characters.""" diff --git a/src/onlyfansapi/types/media_download_response.py b/src/onlyfansapi/types/media_download_response.py deleted file mode 100644 index 8b95a306..00000000 --- a/src/onlyfansapi/types/media_download_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing_extensions import TypeAlias - -__all__ = ["MediaDownloadResponse"] - -MediaDownloadResponse: TypeAlias = str diff --git a/src/onlyfansapi/types/message_attach_tags_params.py b/src/onlyfansapi/types/message_attach_tags_params.py deleted file mode 100644 index 3857488d..00000000 --- a/src/onlyfansapi/types/message_attach_tags_params.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["MessageAttachTagsParams"] - - -class MessageAttachTagsParams(TypedDict, total=False): - account: Required[str] - - rf_guest: Annotated[str, PropertyInfo(alias="rfGuest")] - """Array of OnlyFans Release Form Guest IDs to tag in your message""" - - rf_partner: Annotated[str, PropertyInfo(alias="rfPartner")] - """Array of OnlyFans Release Form Partners IDs to tag in your message""" - - rf_tag: Annotated[str, PropertyInfo(alias="rfTag")] - """Array of OnlyFans Creator User IDs to tag in your message""" diff --git a/src/onlyfansapi/types/message_attach_tags_response.py b/src/onlyfansapi/types/message_attach_tags_response.py deleted file mode 100644 index 21d7fe86..00000000 --- a/src/onlyfansapi/types/message_attach_tags_response.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel - -__all__ = ["MessageAttachTagsResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "_Meta_RateLimits", "Data"] - - -class _Meta_Cache(BaseModel): - is_cached: Optional[bool] = None - - note: Optional[str] = None - - -class _Meta_Credits(BaseModel): - balance: Optional[int] = None - - note: Optional[str] = None - - used: Optional[int] = None - - -class _Meta_RateLimits(BaseModel): - limit_day: Optional[int] = None - - limit_minute: Optional[int] = None - - remaining_day: Optional[int] = None - - remaining_minute: Optional[int] = None - - -class _Meta(BaseModel): - api_cache: Optional[_Meta_Cache] = FieldInfo(alias="_cache", default=None) - - api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None) - - api_rate_limits: Optional[_Meta_RateLimits] = FieldInfo(alias="_rate_limits", default=None) - - -class Data(BaseModel): - success: Optional[bool] = None - - -class MessageAttachTagsResponse(BaseModel): - api_meta: Optional[_Meta] = FieldInfo(alias="_meta", default=None) - - data: Optional[Data] = None diff --git a/src/onlyfansapi/types/release_form_list_taggable_users_response.py b/src/onlyfansapi/types/release_form_list_taggable_users_response.py index 5317664a..0bcb18a5 100644 --- a/src/onlyfansapi/types/release_form_list_taggable_users_response.py +++ b/src/onlyfansapi/types/release_form_list_taggable_users_response.py @@ -55,6 +55,8 @@ class _Meta(BaseModel): class _Pagination(BaseModel): next_page: Optional[str] = None + notice: Optional[str] = None + class DataItemUserAvatarThumbs(BaseModel): c144: Optional[str] = None @@ -95,8 +97,6 @@ class DataItem(BaseModel): class Data(BaseModel): - has_more: Optional[bool] = FieldInfo(alias="hasMore", default=None) - items: Optional[List[DataItem]] = None diff --git a/src/onlyfansapi/types/smart_link_list_fans_params.py b/src/onlyfansapi/types/smart_link_list_fans_params.py index 28d9ab53..13f4075b 100644 --- a/src/onlyfansapi/types/smart_link_list_fans_params.py +++ b/src/onlyfansapi/types/smart_link_list_fans_params.py @@ -26,6 +26,12 @@ class SmartLinkListFansParams(TypedDict, total=False): offset: int """Offset for pagination. Default `0`""" + previously_subscribed: bool + """ + Optional - Filter to returning subscribers (fans previously subscribed before + this subscription) + """ + sort: Literal[ "revenue_net", "-revenue_net", @@ -37,3 +43,6 @@ class SmartLinkListFansParams(TypedDict, total=False): "-converted_at", ] """Optional sort field. Default `-revenue_net`""" + + subscribed_using_promo: bool + """Optional - Filter to fans who subscribed via a promotion/offer""" diff --git a/src/onlyfansapi/types/smart_link_list_fans_response.py b/src/onlyfansapi/types/smart_link_list_fans_response.py index 89d44bc6..43e52a6f 100644 --- a/src/onlyfansapi/types/smart_link_list_fans_response.py +++ b/src/onlyfansapi/types/smart_link_list_fans_response.py @@ -14,6 +14,8 @@ "Data", "DataFilters", "DataRow", + "DataRowSubscriptionInsights", + "DataRowSubscriptionInsightsCurrentSubscription", "DataSummary", ] @@ -51,8 +53,36 @@ class DataFilters(BaseModel): offset: Optional[int] = None + previously_subscribed: Optional[str] = None + sort: Optional[str] = None + subscribed_using_promo: Optional[str] = None + + +class DataRowSubscriptionInsightsCurrentSubscription(BaseModel): + action: Optional[str] = None + + is_free: Optional[bool] = None + + price: Optional[int] = None + + regular_price: Optional[int] = None + + type: Optional[str] = None + + +class DataRowSubscriptionInsights(BaseModel): + current_subscription: Optional[DataRowSubscriptionInsightsCurrentSubscription] = None + + current_subscription_from_smart_link: Optional[bool] = None + + has_subscription_data: Optional[bool] = None + + previously_subscribed: Optional[bool] = None + + subscribed_using_promo: Optional[bool] = None + class DataRow(BaseModel): avatar_url: Optional[str] = None @@ -75,6 +105,8 @@ class DataRow(BaseModel): revenue_net: Optional[int] = None + subscription_insights: Optional[DataRowSubscriptionInsights] = None + tips_net: Optional[int] = None username: Optional[str] = None diff --git a/src/onlyfansapi/types/smart_link_list_params.py b/src/onlyfansapi/types/smart_link_list_params.py index ca28e0e2..ed433edf 100644 --- a/src/onlyfansapi/types/smart_link_list_params.py +++ b/src/onlyfansapi/types/smart_link_list_params.py @@ -5,13 +5,17 @@ from typing import Optional from typing_extensions import TypedDict -__all__ = ["SmartLinkListParams"] +from .._types import SequenceNotStr + +__all__ = ["SmartLinkListParams", "Filter"] class SmartLinkListParams(TypedDict, total=False): account_ids: Optional[str] """Comma-separated account prefixed IDs to include.""" + filter: Filter + limit: int """The number of Smart Links to return. @@ -19,10 +23,18 @@ class SmartLinkListParams(TypedDict, total=False): """ meta_pixel_ids: Optional[str] - """Comma-separated Meta Pixel IDs to include.""" + """Deprecated alias for `pixel_ids`. Comma-separated Pixel IDs to include.""" name: Optional[str] """Filter Smart Links by name. Must not be greater than 255 characters.""" offset: int """The offset used for pagination. Default `0`. Must be at least 0.""" + + pixel_ids: Optional[str] + """Comma-separated ad platform Pixel IDs to include.""" + + +class Filter(TypedDict, total=False): + tags: SequenceNotStr[str] + """Must not be greater than 50 characters.""" diff --git a/src/onlyfansapi/types/smart_link_postback_create_params.py b/src/onlyfansapi/types/smart_link_postback_create_params.py index fb5f0e62..dde8295a 100644 --- a/src/onlyfansapi/types/smart_link_postback_create_params.py +++ b/src/onlyfansapi/types/smart_link_postback_create_params.py @@ -2,11 +2,12 @@ from __future__ import annotations +from typing import Iterable, Optional from typing_extensions import Literal, Required, TypedDict from .._types import SequenceNotStr -__all__ = ["SmartLinkPostbackCreateParams"] +__all__ = ["SmartLinkPostbackCreateParams", "Header"] class SmartLinkPostbackCreateParams(TypedDict, total=False): @@ -22,9 +23,33 @@ class SmartLinkPostbackCreateParams(TypedDict, total=False): url: Required[str] """The destination URL. - Variables such as `{click_id}`, `{fbclid}`, `{gclid}`, and `{ttclid}` are - replaced when the postback is dispatched. + Variables such as `{external_click_id}`, `{fbclid}`, `{gclid}`, and `{ttclid}` + are replaced when the postback is dispatched. """ + body: str + """Optional request body template for POST postbacks. + + Variables are replaced when the postback is dispatched. + """ + + headers: Iterable[Header] + """Optional request headers. Header values may include postback variables.""" + + http_method: Literal["GET", "POST"] + """HTTP method used for the postback request. Defaults to `GET` when omitted.""" + smart_link_ids: SequenceNotStr[str] """Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.""" + + +class Header(TypedDict, total=False): + name: Optional[str] + """This field is required when headers.\\**.value is present. + + Must match the regex /\\AA[A-Za-z0-9!#$%&'*+.^_`|~-]+\\zz/. Must not be greater than + 100 characters. + """ + + value: Optional[str] + """Must not be greater than 2000 characters.""" diff --git a/src/onlyfansapi/types/smart_link_postback_create_response.py b/src/onlyfansapi/types/smart_link_postback_create_response.py index b6681b19..206fd9ea 100644 --- a/src/onlyfansapi/types/smart_link_postback_create_response.py +++ b/src/onlyfansapi/types/smart_link_postback_create_response.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["SmartLinkPostbackCreateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data"] +__all__ = ["SmartLinkPostbackCreateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataHeader"] class _Meta_Cache(BaseModel): @@ -29,13 +29,25 @@ class _Meta(BaseModel): api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None) +class DataHeader(BaseModel): + name: Optional[str] = None + + value: Optional[str] = None + + class Data(BaseModel): id: Optional[int] = None + body: Optional[str] = None + conversion_types: Optional[List[str]] = None created_at: Optional[str] = None + headers: Optional[List[DataHeader]] = None + + http_method: Optional[str] = None + latest_response: Optional[str] = None smart_link_ids: Optional[List[object]] = None diff --git a/src/onlyfansapi/types/smart_link_postback_list_response.py b/src/onlyfansapi/types/smart_link_postback_list_response.py index 865adf2f..4148792e 100644 --- a/src/onlyfansapi/types/smart_link_postback_list_response.py +++ b/src/onlyfansapi/types/smart_link_postback_list_response.py @@ -12,6 +12,7 @@ "_Meta_Cache", "_Meta_Credits", "Data", + "DataHeader", "DataLatestResponse", "DataSmartLink", ] @@ -37,6 +38,12 @@ class _Meta(BaseModel): api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None) +class DataHeader(BaseModel): + name: Optional[str] = None + + value: Optional[str] = None + + class DataLatestResponse(BaseModel): id: Optional[int] = None @@ -68,10 +75,16 @@ class DataSmartLink(BaseModel): class Data(BaseModel): id: Optional[int] = None + body: Optional[str] = None + conversion_types: Optional[List[str]] = None created_at: Optional[str] = None + headers: Optional[List[DataHeader]] = None + + http_method: Optional[str] = None + latest_response: Optional[DataLatestResponse] = None smart_link_ids: Optional[List[str]] = None diff --git a/src/onlyfansapi/types/smart_link_postback_retrieve_response.py b/src/onlyfansapi/types/smart_link_postback_retrieve_response.py index 6eadd6af..33eed376 100644 --- a/src/onlyfansapi/types/smart_link_postback_retrieve_response.py +++ b/src/onlyfansapi/types/smart_link_postback_retrieve_response.py @@ -6,7 +6,15 @@ from .._models import BaseModel -__all__ = ["SmartLinkPostbackRetrieveResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataSmartLink"] +__all__ = [ + "SmartLinkPostbackRetrieveResponse", + "_Meta", + "_Meta_Cache", + "_Meta_Credits", + "Data", + "DataHeader", + "DataSmartLink", +] class _Meta_Cache(BaseModel): @@ -29,6 +37,12 @@ class _Meta(BaseModel): api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None) +class DataHeader(BaseModel): + name: Optional[str] = None + + value: Optional[str] = None + + class DataSmartLink(BaseModel): account_display_name: Optional[str] = None @@ -42,10 +56,16 @@ class DataSmartLink(BaseModel): class Data(BaseModel): id: Optional[int] = None + body: Optional[str] = None + conversion_types: Optional[List[str]] = None created_at: Optional[str] = None + headers: Optional[List[DataHeader]] = None + + http_method: Optional[str] = None + latest_response: Optional[str] = None smart_link_ids: Optional[List[str]] = None diff --git a/src/onlyfansapi/types/smart_link_postback_update_params.py b/src/onlyfansapi/types/smart_link_postback_update_params.py index 7863cc78..93a1e972 100644 --- a/src/onlyfansapi/types/smart_link_postback_update_params.py +++ b/src/onlyfansapi/types/smart_link_postback_update_params.py @@ -2,11 +2,12 @@ from __future__ import annotations +from typing import Iterable, Optional from typing_extensions import Literal, Required, TypedDict from .._types import SequenceNotStr -__all__ = ["SmartLinkPostbackUpdateParams"] +__all__ = ["SmartLinkPostbackUpdateParams", "Header"] class SmartLinkPostbackUpdateParams(TypedDict, total=False): @@ -19,5 +20,29 @@ class SmartLinkPostbackUpdateParams(TypedDict, total=False): url: Required[str] """The destination URL.""" + body: str + """Optional request body template for POST postbacks. + + Variables are replaced when the postback is dispatched. + """ + + headers: Iterable[Header] + """Optional request headers. Header values may include postback variables.""" + + http_method: Literal["GET", "POST"] + """HTTP method used for the postback request. Existing value is kept when omitted.""" + smart_link_ids: SequenceNotStr[str] """Smart Link ULIDs. Required when `smart_link_scope` is `campaign_specific`.""" + + +class Header(TypedDict, total=False): + name: Optional[str] + """This field is required when headers.\\**.value is present. + + Must match the regex /\\AA[A-Za-z0-9!#$%&'*+.^_`|~-]+\\zz/. Must not be greater than + 100 characters. + """ + + value: Optional[str] + """Must not be greater than 2000 characters.""" diff --git a/src/onlyfansapi/types/smart_link_postback_update_response.py b/src/onlyfansapi/types/smart_link_postback_update_response.py index fc416c17..018c9516 100644 --- a/src/onlyfansapi/types/smart_link_postback_update_response.py +++ b/src/onlyfansapi/types/smart_link_postback_update_response.py @@ -6,7 +6,15 @@ from .._models import BaseModel -__all__ = ["SmartLinkPostbackUpdateResponse", "_Meta", "_Meta_Cache", "_Meta_Credits", "Data", "DataSmartLink"] +__all__ = [ + "SmartLinkPostbackUpdateResponse", + "_Meta", + "_Meta_Cache", + "_Meta_Credits", + "Data", + "DataHeader", + "DataSmartLink", +] class _Meta_Cache(BaseModel): @@ -29,6 +37,12 @@ class _Meta(BaseModel): api_credits: Optional[_Meta_Credits] = FieldInfo(alias="_credits", default=None) +class DataHeader(BaseModel): + name: Optional[str] = None + + value: Optional[str] = None + + class DataSmartLink(BaseModel): account_display_name: Optional[str] = None @@ -42,10 +56,16 @@ class DataSmartLink(BaseModel): class Data(BaseModel): id: Optional[int] = None + body: Optional[str] = None + conversion_types: Optional[List[str]] = None created_at: Optional[str] = None + headers: Optional[List[DataHeader]] = None + + http_method: Optional[str] = None + latest_response: Optional[str] = None smart_link_ids: Optional[List[str]] = None diff --git a/tests/api_resources/engagement/test_messages.py b/tests/api_resources/engagement/test_messages.py index a4e86aa2..26284d72 100644 --- a/tests/api_resources/engagement/test_messages.py +++ b/tests/api_resources/engagement/test_messages.py @@ -24,7 +24,7 @@ class TestMessages: @parametrize def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None: message = client.engagement.messages.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"]) @@ -33,7 +33,7 @@ def test_method_get_message_buyers(self, client: OnlyFansAPI) -> None: @parametrize def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) -> None: message = client.engagement.messages.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", limit=10, marker=0, @@ -47,7 +47,7 @@ def test_method_get_message_buyers_with_all_params(self, client: OnlyFansAPI) -> @parametrize def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None: response = client.engagement.messages.with_raw_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) @@ -60,7 +60,7 @@ def test_raw_response_get_message_buyers(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> None: with client.engagement.messages.with_streaming_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -76,7 +76,7 @@ def test_streaming_response_get_message_buyers(self, client: OnlyFansAPI) -> Non def test_path_params_get_message_buyers(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.engagement.messages.with_raw_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="", ) @@ -148,7 +148,7 @@ class TestAsyncMessages: @parametrize async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None: message = await async_client.engagement.messages.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(MessageGetMessageBuyersResponse, message, path=["response"]) @@ -157,7 +157,7 @@ async def test_method_get_message_buyers(self, async_client: AsyncOnlyFansAPI) - @parametrize async def test_method_get_message_buyers_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: message = await async_client.engagement.messages.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", limit=10, marker=0, @@ -171,7 +171,7 @@ async def test_method_get_message_buyers_with_all_params(self, async_client: Asy @parametrize async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.engagement.messages.with_raw_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) @@ -184,7 +184,7 @@ async def test_raw_response_get_message_buyers(self, async_client: AsyncOnlyFans @parametrize async def test_streaming_response_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.engagement.messages.with_streaming_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -200,7 +200,7 @@ async def test_streaming_response_get_message_buyers(self, async_client: AsyncOn async def test_path_params_get_message_buyers(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.engagement.messages.with_raw_response.get_message_buyers( - message_id="voluptatem", + message_id="odio", account="", ) diff --git a/tests/api_resources/media/vault/lists/test_media.py b/tests/api_resources/media/vault/lists/test_media.py index de76d677..eb0d143b 100644 --- a/tests/api_resources/media/vault/lists/test_media.py +++ b/tests/api_resources/media/vault/lists/test_media.py @@ -24,7 +24,7 @@ class TestMedia: @parametrize def test_method_add(self, client: OnlyFansAPI) -> None: media = client.media.vault.lists.media.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -34,7 +34,7 @@ def test_method_add(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_add(self, client: OnlyFansAPI) -> None: response = client.media.vault.lists.media.with_raw_response.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -48,7 +48,7 @@ def test_raw_response_add(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_add(self, client: OnlyFansAPI) -> None: with client.media.vault.lists.media.with_streaming_response.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) as response: @@ -65,7 +65,7 @@ def test_streaming_response_add(self, client: OnlyFansAPI) -> None: def test_path_params_add(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.media.vault.lists.media.with_raw_response.add( - list_id="hic", + list_id="iure", account="", media_ids=["string"], ) @@ -81,7 +81,7 @@ def test_path_params_add(self, client: OnlyFansAPI) -> None: @parametrize def test_method_remove(self, client: OnlyFansAPI) -> None: media = client.media.vault.lists.media.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -91,7 +91,7 @@ def test_method_remove(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_remove(self, client: OnlyFansAPI) -> None: response = client.media.vault.lists.media.with_raw_response.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -105,7 +105,7 @@ def test_raw_response_remove(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_remove(self, client: OnlyFansAPI) -> None: with client.media.vault.lists.media.with_streaming_response.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) as response: @@ -122,7 +122,7 @@ def test_streaming_response_remove(self, client: OnlyFansAPI) -> None: def test_path_params_remove(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.media.vault.lists.media.with_raw_response.remove( - list_id="hic", + list_id="iure", account="", media_ids=["string"], ) @@ -144,7 +144,7 @@ class TestAsyncMedia: @parametrize async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None: media = await async_client.media.vault.lists.media.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -154,7 +154,7 @@ async def test_method_add(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.media.vault.lists.media.with_raw_response.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -168,7 +168,7 @@ async def test_raw_response_add(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.media.vault.lists.media.with_streaming_response.add( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) as response: @@ -185,7 +185,7 @@ async def test_streaming_response_add(self, async_client: AsyncOnlyFansAPI) -> N async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.media.vault.lists.media.with_raw_response.add( - list_id="hic", + list_id="iure", account="", media_ids=["string"], ) @@ -201,7 +201,7 @@ async def test_path_params_add(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None: media = await async_client.media.vault.lists.media.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -211,7 +211,7 @@ async def test_method_remove(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.media.vault.lists.media.with_raw_response.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) @@ -225,7 +225,7 @@ async def test_raw_response_remove(self, async_client: AsyncOnlyFansAPI) -> None @parametrize async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.media.vault.lists.media.with_streaming_response.remove( - list_id="hic", + list_id="iure", account="acct_XXXXXXXXXXXXXXX", media_ids=["string"], ) as response: @@ -242,7 +242,7 @@ async def test_streaming_response_remove(self, async_client: AsyncOnlyFansAPI) - async def test_path_params_remove(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.media.vault.lists.media.with_raw_response.remove( - list_id="hic", + list_id="iure", account="", media_ids=["string"], ) diff --git a/tests/api_resources/media/vault/test_lists.py b/tests/api_resources/media/vault/test_lists.py index 2602218c..a3fa3044 100644 --- a/tests/api_resources/media/vault/test_lists.py +++ b/tests/api_resources/media/vault/test_lists.py @@ -127,6 +127,7 @@ def test_method_update(self, client: OnlyFansAPI) -> None: list_ = client.media.vault.lists.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) assert_matches_type(ListUpdateResponse, list_, path=["response"]) @@ -136,6 +137,7 @@ def test_raw_response_update(self, client: OnlyFansAPI) -> None: response = client.media.vault.lists.with_raw_response.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) assert response.is_closed is True @@ -149,6 +151,7 @@ def test_streaming_response_update(self, client: OnlyFansAPI) -> None: with client.media.vault.lists.with_streaming_response.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -165,12 +168,14 @@ def test_path_params_update(self, client: OnlyFansAPI) -> None: client.media.vault.lists.with_raw_response.update( list_id="123", account="", + name="My renamed list", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): client.media.vault.lists.with_raw_response.update( list_id="", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) @pytest.mark.skip(reason="Mock server tests are disabled") @@ -388,6 +393,7 @@ async def test_method_update(self, async_client: AsyncOnlyFansAPI) -> None: list_ = await async_client.media.vault.lists.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) assert_matches_type(ListUpdateResponse, list_, path=["response"]) @@ -397,6 +403,7 @@ async def test_raw_response_update(self, async_client: AsyncOnlyFansAPI) -> None response = await async_client.media.vault.lists.with_raw_response.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) assert response.is_closed is True @@ -410,6 +417,7 @@ async def test_streaming_response_update(self, async_client: AsyncOnlyFansAPI) - async with async_client.media.vault.lists.with_streaming_response.update( list_id="123", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -426,12 +434,14 @@ async def test_path_params_update(self, async_client: AsyncOnlyFansAPI) -> None: await async_client.media.vault.lists.with_raw_response.update( list_id="123", account="", + name="My renamed list", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `list_id` but received ''"): await async_client.media.vault.lists.with_raw_response.update( list_id="", account="acct_XXXXXXXXXXXXXXX", + name="My renamed list", ) @pytest.mark.skip(reason="Mock server tests are disabled") diff --git a/tests/api_resources/posts/test_comments.py b/tests/api_resources/posts/test_comments.py index 297ac0a2..c7066f7e 100644 --- a/tests/api_resources/posts/test_comments.py +++ b/tests/api_resources/posts/test_comments.py @@ -29,7 +29,7 @@ class TestComments: @parametrize def test_method_create(self, client: OnlyFansAPI) -> None: comment = client.posts.comments.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) @@ -39,7 +39,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None: @parametrize def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None: comment = client.posts.comments.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", answer_to=123, @@ -51,7 +51,7 @@ def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_create(self, client: OnlyFansAPI) -> None: response = client.posts.comments.with_raw_response.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) @@ -65,7 +65,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_create(self, client: OnlyFansAPI) -> None: with client.posts.comments.with_streaming_response.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) as response: @@ -82,7 +82,7 @@ def test_streaming_response_create(self, client: OnlyFansAPI) -> None: def test_path_params_create(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.posts.comments.with_raw_response.create( - post_id="dicta", + post_id="illum", account="", text="This is a comment.", ) @@ -98,7 +98,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list(self, client: OnlyFansAPI) -> None: comment = client.posts.comments.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(CommentListResponse, comment, path=["response"]) @@ -107,7 +107,7 @@ def test_method_list(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None: comment = client.posts.comments.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -119,7 +119,7 @@ def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_list(self, client: OnlyFansAPI) -> None: response = client.posts.comments.with_raw_response.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) @@ -132,7 +132,7 @@ def test_raw_response_list(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list(self, client: OnlyFansAPI) -> None: with client.posts.comments.with_streaming_response.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -148,7 +148,7 @@ def test_streaming_response_list(self, client: OnlyFansAPI) -> None: def test_path_params_list(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.posts.comments.with_raw_response.list( - post_id="dicta", + post_id="illum", account="", ) @@ -418,7 +418,7 @@ class TestAsyncComments: @parametrize async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None: comment = await async_client.posts.comments.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) @@ -428,7 +428,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: comment = await async_client.posts.comments.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", answer_to=123, @@ -440,7 +440,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP @parametrize async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.posts.comments.with_raw_response.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) @@ -454,7 +454,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None @parametrize async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.posts.comments.with_streaming_response.create( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", text="This is a comment.", ) as response: @@ -471,7 +471,7 @@ async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) - async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.posts.comments.with_raw_response.create( - post_id="dicta", + post_id="illum", account="", text="This is a comment.", ) @@ -487,7 +487,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None: comment = await async_client.posts.comments.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(CommentListResponse, comment, path=["response"]) @@ -496,7 +496,7 @@ async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: comment = await async_client.posts.comments.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -508,7 +508,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_raw_response_list(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.posts.comments.with_raw_response.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) @@ -521,7 +521,7 @@ async def test_raw_response_list(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.posts.comments.with_streaming_response.list( - post_id="dicta", + post_id="illum", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -537,7 +537,7 @@ async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) -> async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.posts.comments.with_raw_response.list( - post_id="dicta", + post_id="illum", account="", ) diff --git a/tests/api_resources/saved_for_later/messages/test_settings.py b/tests/api_resources/saved_for_later/messages/test_settings.py index aa735c97..444937ba 100644 --- a/tests/api_resources/saved_for_later/messages/test_settings.py +++ b/tests/api_resources/saved_for_later/messages/test_settings.py @@ -110,7 +110,7 @@ def test_path_params_disable_automatic_messaging(self, client: OnlyFansAPI) -> N def test_method_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None: setting = client.saved_for_later.messages.settings.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) assert_matches_type(SettingEnableOrUpdateAutomaticMessagingResponse, setting, path=["response"]) @@ -119,7 +119,7 @@ def test_method_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) def test_raw_response_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None: response = client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) assert response.is_closed is True @@ -132,7 +132,7 @@ def test_raw_response_enable_or_update_automatic_messaging(self, client: OnlyFan def test_streaming_response_enable_or_update_automatic_messaging(self, client: OnlyFansAPI) -> None: with client.saved_for_later.messages.settings.with_streaming_response.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,7 +148,7 @@ def test_path_params_enable_or_update_automatic_messaging(self, client: OnlyFans with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging( account="", - period=48, + period=6, ) @@ -246,7 +246,7 @@ async def test_path_params_disable_automatic_messaging(self, async_client: Async async def test_method_enable_or_update_automatic_messaging(self, async_client: AsyncOnlyFansAPI) -> None: setting = await async_client.saved_for_later.messages.settings.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) assert_matches_type(SettingEnableOrUpdateAutomaticMessagingResponse, setting, path=["response"]) @@ -256,7 +256,7 @@ async def test_raw_response_enable_or_update_automatic_messaging(self, async_cli response = ( await async_client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) ) @@ -273,7 +273,7 @@ async def test_streaming_response_enable_or_update_automatic_messaging( async with ( async_client.saved_for_later.messages.settings.with_streaming_response.enable_or_update_automatic_messaging( account="acct_XXXXXXXXXXXXXXX", - period=48, + period=6, ) ) as response: assert not response.is_closed @@ -290,5 +290,5 @@ async def test_path_params_enable_or_update_automatic_messaging(self, async_clie with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.saved_for_later.messages.settings.with_raw_response.enable_or_update_automatic_messaging( account="", - period=48, + period=6, ) diff --git a/tests/api_resources/settings/test_welcome_message.py b/tests/api_resources/settings/test_welcome_message.py index 544df889..9664075f 100644 --- a/tests/api_resources/settings/test_welcome_message.py +++ b/tests/api_resources/settings/test_welcome_message.py @@ -76,7 +76,7 @@ def test_method_update(self, client: OnlyFansAPI) -> None: def test_method_update_with_all_params(self, client: OnlyFansAPI) -> None: welcome_message = client.settings.welcome_message.update( account="acct_XXXXXXXXXXXXXXX", - is_forward=True, + is_forward=False, locked_text=False, media_files=["ofapi_media_abc123", 1234567890], previews=["ofapi_media_abc123", 1234567890], @@ -229,7 +229,7 @@ async def test_method_update(self, async_client: AsyncOnlyFansAPI) -> None: async def test_method_update_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: welcome_message = await async_client.settings.welcome_message.update( account="acct_XXXXXXXXXXXXXXX", - is_forward=True, + is_forward=False, locked_text=False, media_files=["ofapi_media_abc123", 1234567890], previews=["ofapi_media_abc123", 1234567890], diff --git a/tests/api_resources/stories/test_highlights.py b/tests/api_resources/stories/test_highlights.py index 06d474b9..ddd9b439 100644 --- a/tests/api_resources/stories/test_highlights.py +++ b/tests/api_resources/stories/test_highlights.py @@ -285,7 +285,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_method_add_story(self, client: OnlyFansAPI) -> None: highlight = client.stories.highlights.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -296,7 +296,7 @@ def test_method_add_story(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_add_story(self, client: OnlyFansAPI) -> None: response = client.stories.highlights.with_raw_response.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -311,7 +311,7 @@ def test_raw_response_add_story(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_add_story(self, client: OnlyFansAPI) -> None: with client.stories.highlights.with_streaming_response.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -329,7 +329,7 @@ def test_streaming_response_add_story(self, client: OnlyFansAPI) -> None: def test_path_params_add_story(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.stories.highlights.with_raw_response.add_story( - path_story_id="autem", + path_story_id="eos", account="", highlight_id=1234567890, body_story_id=2345678901, @@ -347,7 +347,7 @@ def test_path_params_add_story(self, client: OnlyFansAPI) -> None: @parametrize def test_method_remove_story(self, client: OnlyFansAPI) -> None: highlight = client.stories.highlights.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) @@ -357,7 +357,7 @@ def test_method_remove_story(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_remove_story(self, client: OnlyFansAPI) -> None: response = client.stories.highlights.with_raw_response.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) @@ -371,7 +371,7 @@ def test_raw_response_remove_story(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_remove_story(self, client: OnlyFansAPI) -> None: with client.stories.highlights.with_streaming_response.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) as response: @@ -388,7 +388,7 @@ def test_streaming_response_remove_story(self, client: OnlyFansAPI) -> None: def test_path_params_remove_story(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.stories.highlights.with_raw_response.remove_story( - story_id="autem", + story_id="eos", account="", highlight_id=1234567890, ) @@ -666,7 +666,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_add_story(self, async_client: AsyncOnlyFansAPI) -> None: highlight = await async_client.stories.highlights.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -677,7 +677,7 @@ async def test_method_add_story(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_add_story(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.stories.highlights.with_raw_response.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -692,7 +692,7 @@ async def test_raw_response_add_story(self, async_client: AsyncOnlyFansAPI) -> N @parametrize async def test_streaming_response_add_story(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.stories.highlights.with_streaming_response.add_story( - path_story_id="autem", + path_story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, body_story_id=2345678901, @@ -710,7 +710,7 @@ async def test_streaming_response_add_story(self, async_client: AsyncOnlyFansAPI async def test_path_params_add_story(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.stories.highlights.with_raw_response.add_story( - path_story_id="autem", + path_story_id="eos", account="", highlight_id=1234567890, body_story_id=2345678901, @@ -728,7 +728,7 @@ async def test_path_params_add_story(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_method_remove_story(self, async_client: AsyncOnlyFansAPI) -> None: highlight = await async_client.stories.highlights.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) @@ -738,7 +738,7 @@ async def test_method_remove_story(self, async_client: AsyncOnlyFansAPI) -> None @parametrize async def test_raw_response_remove_story(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.stories.highlights.with_raw_response.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) @@ -752,7 +752,7 @@ async def test_raw_response_remove_story(self, async_client: AsyncOnlyFansAPI) - @parametrize async def test_streaming_response_remove_story(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.stories.highlights.with_streaming_response.remove_story( - story_id="autem", + story_id="eos", account="acct_XXXXXXXXXXXXXXX", highlight_id=1234567890, ) as response: @@ -769,7 +769,7 @@ async def test_streaming_response_remove_story(self, async_client: AsyncOnlyFans async def test_path_params_remove_story(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.stories.highlights.with_raw_response.remove_story( - story_id="autem", + story_id="eos", account="", highlight_id=1234567890, ) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 02cf31a0..12d72807 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -59,7 +59,7 @@ def test_streaming_response_list(self, client: OnlyFansAPI) -> None: @parametrize def test_method_disconnect(self, client: OnlyFansAPI) -> None: account = client.accounts.disconnect( - "sed", + "ratione", ) assert_matches_type(Optional[AccountDisconnectResponse], account, path=["response"]) @@ -67,7 +67,7 @@ def test_method_disconnect(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_disconnect(self, client: OnlyFansAPI) -> None: response = client.accounts.with_raw_response.disconnect( - "sed", + "ratione", ) assert response.is_closed is True @@ -79,7 +79,7 @@ def test_raw_response_disconnect(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_disconnect(self, client: OnlyFansAPI) -> None: with client.accounts.with_streaming_response.disconnect( - "sed", + "ratione", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -145,7 +145,7 @@ async def test_streaming_response_list(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_method_disconnect(self, async_client: AsyncOnlyFansAPI) -> None: account = await async_client.accounts.disconnect( - "sed", + "ratione", ) assert_matches_type(Optional[AccountDisconnectResponse], account, path=["response"]) @@ -153,7 +153,7 @@ async def test_method_disconnect(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_disconnect(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.accounts.with_raw_response.disconnect( - "sed", + "ratione", ) assert response.is_closed is True @@ -165,7 +165,7 @@ async def test_raw_response_disconnect(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_streaming_response_disconnect(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.accounts.with_streaming_response.disconnect( - "sed", + "ratione", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_authenticate.py b/tests/api_resources/test_authenticate.py index 6d4a3d4e..70f338a8 100644 --- a/tests/api_resources/test_authenticate.py +++ b/tests/api_resources/test_authenticate.py @@ -159,22 +159,22 @@ def test_method_start(self, client: OnlyFansAPI) -> None: @parametrize def test_method_start_with_all_params(self, client: OnlyFansAPI) -> None: authenticate = client.authenticate.start( - auth_id="aut", - auth_type="raw_data", - cookies="nihil", + auth_id="quis", + auth_type="mobile_app", + cookies="et", custom_proxy={ "host": "proxy.example.com", - "password": "]%<>fO None: @parametrize async def test_method_start_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: authenticate = await async_client.authenticate.start( - auth_id="aut", - auth_type="raw_data", - cookies="nihil", + auth_id="quis", + auth_type="mobile_app", + cookies="et", custom_proxy={ "host": "proxy.example.com", - "password": "]%<>fO None: client_session = client.client_sessions.create( display_name="STRLCxGLVC Agency / Model: Stella", client_reference_id="my_crm_model_12345", - proxy_country="uk", + proxy_country="gb", ) assert_matches_type(ClientSessionCreateResponse, client_session, path=["response"]) @@ -81,7 +81,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP client_session = await async_client.client_sessions.create( display_name="STRLCxGLVC Agency / Model: Stella", client_reference_id="my_crm_model_12345", - proxy_country="uk", + proxy_country="gb", ) assert_matches_type(ClientSessionCreateResponse, client_session, path=["response"]) diff --git a/tests/api_resources/test_media.py b/tests/api_resources/test_media.py index 3bba8196..75dab9ad 100644 --- a/tests/api_resources/test_media.py +++ b/tests/api_resources/test_media.py @@ -9,10 +9,7 @@ from onlyfansapi import OnlyFansAPI, AsyncOnlyFansAPI from tests.utils import assert_matches_type -from onlyfansapi.types import ( - MediaScrapeResponse, - MediaUploadResponse, -) +from onlyfansapi.types import MediaScrapeResponse, MediaUploadResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +24,7 @@ def test_method_download(self, client: OnlyFansAPI) -> None: cdn_url="cdnUrl", account="acct_XXXXXXXXXXXXXXX", ) - assert_matches_type(str, media, path=["response"]) + assert media is None @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -40,7 +37,7 @@ def test_raw_response_download(self, client: OnlyFansAPI) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" media = response.parse() - assert_matches_type(str, media, path=["response"]) + assert media is None @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -53,7 +50,7 @@ def test_streaming_response_download(self, client: OnlyFansAPI) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" media = response.parse() - assert_matches_type(str, media, path=["response"]) + assert media is None assert cast(Any, response.is_closed) is True @@ -194,7 +191,7 @@ async def test_method_download(self, async_client: AsyncOnlyFansAPI) -> None: cdn_url="cdnUrl", account="acct_XXXXXXXXXXXXXXX", ) - assert_matches_type(str, media, path=["response"]) + assert media is None @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -207,7 +204,7 @@ async def test_raw_response_download(self, async_client: AsyncOnlyFansAPI) -> No assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" media = await response.parse() - assert_matches_type(str, media, path=["response"]) + assert media is None @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -220,7 +217,7 @@ async def test_streaming_response_download(self, async_client: AsyncOnlyFansAPI) assert response.http_request.headers.get("X-Stainless-Lang") == "python" media = await response.parse() - assert_matches_type(str, media, path=["response"]) + assert media is None assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_messages.py b/tests/api_resources/test_messages.py deleted file mode 100644 index 206c5ef3..00000000 --- a/tests/api_resources/test_messages.py +++ /dev/null @@ -1,152 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from onlyfansapi import OnlyFansAPI, AsyncOnlyFansAPI -from tests.utils import assert_matches_type -from onlyfansapi.types import MessageAttachTagsResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestMessages: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_attach_tags(self, client: OnlyFansAPI) -> None: - message = client.messages.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_attach_tags_with_all_params(self, client: OnlyFansAPI) -> None: - message = client.messages.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - rf_guest="rfGuest", - rf_partner="rfPartner", - rf_tag="rfTag", - ) - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_raw_response_attach_tags(self, client: OnlyFansAPI) -> None: - response = client.messages.with_raw_response.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - message = response.parse() - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_streaming_response_attach_tags(self, client: OnlyFansAPI) -> None: - with client.messages.with_streaming_response.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - message = response.parse() - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_path_params_attach_tags(self, client: OnlyFansAPI) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): - client.messages.with_raw_response.attach_tags( - message_id="123456789", - account="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `message_id` but received ''"): - client.messages.with_raw_response.attach_tags( - message_id="", - account="acct_XXXXXXXXXXXXXXX", - ) - - -class TestAsyncMessages: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_attach_tags(self, async_client: AsyncOnlyFansAPI) -> None: - message = await async_client.messages.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_attach_tags_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: - message = await async_client.messages.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - rf_guest="rfGuest", - rf_partner="rfPartner", - rf_tag="rfTag", - ) - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_raw_response_attach_tags(self, async_client: AsyncOnlyFansAPI) -> None: - response = await async_client.messages.with_raw_response.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - message = await response.parse() - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_streaming_response_attach_tags(self, async_client: AsyncOnlyFansAPI) -> None: - async with async_client.messages.with_streaming_response.attach_tags( - message_id="123456789", - account="acct_XXXXXXXXXXXXXXX", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - message = await response.parse() - assert_matches_type(MessageAttachTagsResponse, message, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_path_params_attach_tags(self, async_client: AsyncOnlyFansAPI) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): - await async_client.messages.with_raw_response.attach_tags( - message_id="123456789", - account="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `message_id` but received ''"): - await async_client.messages.with_raw_response.attach_tags( - message_id="", - account="acct_XXXXXXXXXXXXXXX", - ) diff --git a/tests/api_resources/test_smart_link_postbacks.py b/tests/api_resources/test_smart_link_postbacks.py index 5a5ea6f9..29c028aa 100644 --- a/tests/api_resources/test_smart_link_postbacks.py +++ b/tests/api_resources/test_smart_link_postbacks.py @@ -29,7 +29,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None: smart_link_postback = client.smart_link_postbacks.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"]) @@ -39,7 +39,15 @@ def test_method_create_with_all_params(self, client: OnlyFansAPI) -> None: smart_link_postback = client.smart_link_postbacks.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", + body='{"click_id":"{click_id}","value":"{amount_gross}"}', + headers=[ + { + "name": "Authorization", + "value": "Bearer token", + } + ], + http_method="POST", smart_link_ids=["01JTESTLINK000000000000001"], ) assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"]) @@ -50,7 +58,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None: response = client.smart_link_postbacks.with_raw_response.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) assert response.is_closed is True @@ -64,7 +72,7 @@ def test_streaming_response_create(self, client: OnlyFansAPI) -> None: with client.smart_link_postbacks.with_streaming_response.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -115,7 +123,7 @@ def test_method_update(self, client: OnlyFansAPI) -> None: postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"]) @@ -126,7 +134,15 @@ def test_method_update_with_all_params(self, client: OnlyFansAPI) -> None: postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", + body='{"click_id":"{click_id}","value":"{amount_gross}"}', + headers=[ + { + "name": "Authorization", + "value": "Bearer token", + } + ], + http_method="POST", smart_link_ids=["01JTESTLINK000000000000001"], ) assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"]) @@ -138,7 +154,7 @@ def test_raw_response_update(self, client: OnlyFansAPI) -> None: postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) assert response.is_closed is True @@ -153,7 +169,7 @@ def test_streaming_response_update(self, client: OnlyFansAPI) -> None: postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,7 +253,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None: smart_link_postback = await async_client.smart_link_postbacks.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"]) @@ -247,7 +263,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncOnlyFansAP smart_link_postback = await async_client.smart_link_postbacks.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", + body='{"click_id":"{click_id}","value":"{amount_gross}"}', + headers=[ + { + "name": "Authorization", + "value": "Bearer token", + } + ], + http_method="POST", smart_link_ids=["01JTESTLINK000000000000001"], ) assert_matches_type(SmartLinkPostbackCreateResponse, smart_link_postback, path=["response"]) @@ -258,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None response = await async_client.smart_link_postbacks.with_raw_response.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) assert response.is_closed is True @@ -272,7 +296,7 @@ async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) - async with async_client.smart_link_postbacks.with_streaming_response.create( conversion_types=["new_subscriber", "new_transaction"], smart_link_scope="campaign_specific", - url="https://example.com/postback?click={click_id}&type={conversion_type}&gclid={gclid}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}&gclid={gclid}", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -323,7 +347,7 @@ async def test_method_update(self, async_client: AsyncOnlyFansAPI) -> None: postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"]) @@ -334,7 +358,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncOnlyFansAP postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", + body='{"click_id":"{click_id}","value":"{amount_gross}"}', + headers=[ + { + "name": "Authorization", + "value": "Bearer token", + } + ], + http_method="POST", smart_link_ids=["01JTESTLINK000000000000001"], ) assert_matches_type(SmartLinkPostbackUpdateResponse, smart_link_postback, path=["response"]) @@ -346,7 +378,7 @@ async def test_raw_response_update(self, async_client: AsyncOnlyFansAPI) -> None postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) assert response.is_closed is True @@ -361,7 +393,7 @@ async def test_streaming_response_update(self, async_client: AsyncOnlyFansAPI) - postback_id=123, conversion_types=["new_subscriber"], smart_link_scope="global", - url="https://example.com/postback?click={click_id}&type={conversion_type}", + url="https://example.com/postback?click={external_click_id}&type={conversion_type}", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_smart_links.py b/tests/api_resources/test_smart_links.py index 267abb61..af80317e 100644 --- a/tests/api_resources/test_smart_links.py +++ b/tests/api_resources/test_smart_links.py @@ -131,10 +131,12 @@ def test_method_list(self, client: OnlyFansAPI) -> None: def test_method_list_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list( account_ids="acct_abc123,acct_def456", + filter={"tags": ["dw"]}, limit=50, meta_pixel_ids="1,2", name="Instagram", offset=0, + pixel_ids="1,2", ) assert_matches_type(SmartLinkListResponse, smart_link, path=["response"]) @@ -206,7 +208,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_clicks(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) assert_matches_type(SmartLinkListClicksResponse, smart_link, path=["response"]) @@ -214,7 +216,7 @@ def test_method_list_clicks(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_clicks_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", date_end="2026-01-07T23:59:59Z", date_start="2026-01-01T00:00:00Z", include_bots=True, @@ -228,7 +230,7 @@ def test_method_list_clicks_with_all_params(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_list_clicks(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) assert response.is_closed is True @@ -240,7 +242,7 @@ def test_raw_response_list_clicks(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list_clicks(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -262,7 +264,7 @@ def test_path_params_list_clicks(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_conversions(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) assert_matches_type(SmartLinkListConversionsResponse, smart_link, path=["response"]) @@ -270,7 +272,7 @@ def test_method_list_conversions(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_conversions_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", conversion_type="new_transaction", date_end="2026-01-07T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -286,7 +288,7 @@ def test_method_list_conversions_with_all_params(self, client: OnlyFansAPI) -> N @parametrize def test_raw_response_list_conversions(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) assert response.is_closed is True @@ -298,7 +300,7 @@ def test_raw_response_list_conversions(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list_conversions(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -320,7 +322,7 @@ def test_path_params_list_conversions(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_fans(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"]) @@ -328,14 +330,16 @@ def test_method_list_fans(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_fans_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_fans( - smart_link_id="autem", + smart_link_id="earum", has_messages=True, limit=100, min_messages_sent_by_fan=3, min_revenue_net=25, min_tips_net=10, offset=0, + previously_subscribed=True, sort="-revenue_net", + subscribed_using_promo=True, ) assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"]) @@ -343,7 +347,7 @@ def test_method_list_fans_with_all_params(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_list_fans(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) assert response.is_closed is True @@ -355,7 +359,7 @@ def test_raw_response_list_fans(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list_fans(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -377,7 +381,7 @@ def test_path_params_list_fans(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_spenders(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) assert_matches_type(SmartLinkListSpendersResponse, smart_link, path=["response"]) @@ -385,7 +389,7 @@ def test_method_list_spenders(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_spenders_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", limit=50, min_spend=1, offset=0, @@ -396,7 +400,7 @@ def test_method_list_spenders_with_all_params(self, client: OnlyFansAPI) -> None @parametrize def test_raw_response_list_spenders(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) assert response.is_closed is True @@ -408,7 +412,7 @@ def test_raw_response_list_spenders(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list_spenders(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -430,7 +434,7 @@ def test_path_params_list_spenders(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) assert smart_link is None @@ -438,7 +442,7 @@ def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", revenue_basis="net", @@ -449,7 +453,7 @@ def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) @parametrize def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) assert response.is_closed is True @@ -461,7 +465,7 @@ def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -483,7 +487,7 @@ def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) assert_matches_type(SmartLinkRetrieveStatsResponse, smart_link, path=["response"]) @@ -491,7 +495,7 @@ def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> None: smart_link = client.smart_links.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", ) @@ -501,7 +505,7 @@ def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> Non @parametrize def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None: response = client.smart_links.with_raw_response.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) assert response.is_closed is True @@ -513,7 +517,7 @@ def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None: with client.smart_links.with_streaming_response.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -641,10 +645,12 @@ async def test_method_list(self, async_client: AsyncOnlyFansAPI) -> None: async def test_method_list_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list( account_ids="acct_abc123,acct_def456", + filter={"tags": ["dw"]}, limit=50, meta_pixel_ids="1,2", name="Instagram", offset=0, + pixel_ids="1,2", ) assert_matches_type(SmartLinkListResponse, smart_link, path=["response"]) @@ -716,7 +722,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) assert_matches_type(SmartLinkListClicksResponse, smart_link, path=["response"]) @@ -724,7 +730,7 @@ async def test_method_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_list_clicks_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", date_end="2026-01-07T23:59:59Z", date_start="2026-01-01T00:00:00Z", include_bots=True, @@ -738,7 +744,7 @@ async def test_method_list_clicks_with_all_params(self, async_client: AsyncOnlyF @parametrize async def test_raw_response_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) assert response.is_closed is True @@ -750,7 +756,7 @@ async def test_raw_response_list_clicks(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_streaming_response_list_clicks(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.list_clicks( - smart_link_id="illum", + smart_link_id="tenetur", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -772,7 +778,7 @@ async def test_path_params_list_clicks(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_method_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) assert_matches_type(SmartLinkListConversionsResponse, smart_link, path=["response"]) @@ -780,7 +786,7 @@ async def test_method_list_conversions(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_method_list_conversions_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", conversion_type="new_transaction", date_end="2026-01-07T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -796,7 +802,7 @@ async def test_method_list_conversions_with_all_params(self, async_client: Async @parametrize async def test_raw_response_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) assert response.is_closed is True @@ -808,7 +814,7 @@ async def test_raw_response_list_conversions(self, async_client: AsyncOnlyFansAP @parametrize async def test_streaming_response_list_conversions(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.list_conversions( - smart_link_id="fugiat", + smart_link_id="alias", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -830,7 +836,7 @@ async def test_path_params_list_conversions(self, async_client: AsyncOnlyFansAPI @parametrize async def test_method_list_fans(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"]) @@ -838,14 +844,16 @@ async def test_method_list_fans(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_list_fans_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_fans( - smart_link_id="autem", + smart_link_id="earum", has_messages=True, limit=100, min_messages_sent_by_fan=3, min_revenue_net=25, min_tips_net=10, offset=0, + previously_subscribed=True, sort="-revenue_net", + subscribed_using_promo=True, ) assert_matches_type(SmartLinkListFansResponse, smart_link, path=["response"]) @@ -853,7 +861,7 @@ async def test_method_list_fans_with_all_params(self, async_client: AsyncOnlyFan @parametrize async def test_raw_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) assert response.is_closed is True @@ -865,7 +873,7 @@ async def test_raw_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> N @parametrize async def test_streaming_response_list_fans(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.list_fans( - smart_link_id="autem", + smart_link_id="earum", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -887,7 +895,7 @@ async def test_path_params_list_fans(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_method_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) assert_matches_type(SmartLinkListSpendersResponse, smart_link, path=["response"]) @@ -895,7 +903,7 @@ async def test_method_list_spenders(self, async_client: AsyncOnlyFansAPI) -> Non @parametrize async def test_method_list_spenders_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", limit=50, min_spend=1, offset=0, @@ -906,7 +914,7 @@ async def test_method_list_spenders_with_all_params(self, async_client: AsyncOnl @parametrize async def test_raw_response_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) assert response.is_closed is True @@ -918,7 +926,7 @@ async def test_raw_response_list_spenders(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_streaming_response_list_spenders(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.list_spenders( - smart_link_id="cum", + smart_link_id="rerum", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -940,7 +948,7 @@ async def test_path_params_list_spenders(self, async_client: AsyncOnlyFansAPI) - @parametrize async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) assert smart_link is None @@ -948,7 +956,7 @@ async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", revenue_basis="net", @@ -959,7 +967,7 @@ async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: A @parametrize async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) assert response.is_closed is True @@ -971,7 +979,7 @@ async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFa @parametrize async def test_streaming_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.retrieve_cohort_arps( - smart_link_id="consequatur", + smart_link_id="voluptas", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -993,7 +1001,7 @@ async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFan @parametrize async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) assert_matches_type(SmartLinkRetrieveStatsResponse, smart_link, path=["response"]) @@ -1001,7 +1009,7 @@ async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: smart_link = await async_client.smart_links.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", ) @@ -1011,7 +1019,7 @@ async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOn @parametrize async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.smart_links.with_raw_response.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) assert response.is_closed is True @@ -1023,7 +1031,7 @@ async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.smart_links.with_streaming_response.retrieve_stats( - smart_link_id="et", + smart_link_id="ad", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_stored.py b/tests/api_resources/test_stored.py index 39aab6dd..3b0a2822 100644 --- a/tests/api_resources/test_stored.py +++ b/tests/api_resources/test_stored.py @@ -36,8 +36,8 @@ def test_method_list_shared_tracking_links_with_all_params(self, client: OnlyFan stored = client.stored.list_shared_tracking_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "search": "wawukmfhpsfhwlhgdjcyu", - "tags": ["iizfurnvqqubrcpiuiou"], + "search": "pbfojbqujwt", + "tags": ["njflnpevoi"], }, limit=10, offset=0, @@ -92,8 +92,8 @@ def test_method_list_shared_trial_links_with_all_params(self, client: OnlyFansAP stored = client.stored.list_shared_trial_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "search": "wqhvnrc", - "tags": ["uul"], + "search": "an", + "tags": ["adgultzysfwajyujyajvtgr"], }, limit=10, offset=0, @@ -148,9 +148,9 @@ def test_method_list_tracking_links_with_all_params(self, client: OnlyFansAPI) - stored = client.stored.list_tracking_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "include_smart_links": False, - "search": "pbtzgckzvatqptslffi", - "tags": ["retewknszoajldmmjdmbfwi"], + "include_smart_links": True, + "search": "hdawtfhcegirnvzcpmzipkk", + "tags": ["xrfgvkoztdwfztpnuwgiry"], }, limit=10, offset=0, @@ -205,9 +205,9 @@ def test_method_list_trial_links_with_all_params(self, client: OnlyFansAPI) -> N stored = client.stored.list_trial_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "include_smart_links": False, - "search": "aazxbzoyffqvxas", - "tags": ["mbztc"], + "include_smart_links": True, + "search": "fkcvfvpjxcsmpngjvszcn", + "tags": ["pjyfddvbu"], }, limit=10, offset=0, @@ -268,8 +268,8 @@ async def test_method_list_shared_tracking_links_with_all_params(self, async_cli stored = await async_client.stored.list_shared_tracking_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "search": "wawukmfhpsfhwlhgdjcyu", - "tags": ["iizfurnvqqubrcpiuiou"], + "search": "pbfojbqujwt", + "tags": ["njflnpevoi"], }, limit=10, offset=0, @@ -324,8 +324,8 @@ async def test_method_list_shared_trial_links_with_all_params(self, async_client stored = await async_client.stored.list_shared_trial_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "search": "wqhvnrc", - "tags": ["uul"], + "search": "an", + "tags": ["adgultzysfwajyujyajvtgr"], }, limit=10, offset=0, @@ -380,9 +380,9 @@ async def test_method_list_tracking_links_with_all_params(self, async_client: As stored = await async_client.stored.list_tracking_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "include_smart_links": False, - "search": "pbtzgckzvatqptslffi", - "tags": ["retewknszoajldmmjdmbfwi"], + "include_smart_links": True, + "search": "hdawtfhcegirnvzcpmzipkk", + "tags": ["xrfgvkoztdwfztpnuwgiry"], }, limit=10, offset=0, @@ -437,9 +437,9 @@ async def test_method_list_trial_links_with_all_params(self, async_client: Async stored = await async_client.stored.list_trial_links( account="acct_XXXXXXXXXXXXXXX", filter={ - "include_smart_links": False, - "search": "aazxbzoyffqvxas", - "tags": ["mbztc"], + "include_smart_links": True, + "search": "fkcvfvpjxcsmpngjvszcn", + "tags": ["pjyfddvbu"], }, limit=10, offset=0, diff --git a/tests/api_resources/test_tracking_links.py b/tests/api_resources/test_tracking_links.py index 41243f27..da38653b 100644 --- a/tests/api_resources/test_tracking_links.py +++ b/tests/api_resources/test_tracking_links.py @@ -85,7 +85,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkRetrieveResponse, tracking_link, path=["response"]) @@ -94,7 +94,7 @@ def test_method_retrieve(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None: response = client.tracking_links.with_raw_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) @@ -107,7 +107,7 @@ def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None: with client.tracking_links.with_streaming_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -123,7 +123,7 @@ def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None: def test_path_params_retrieve(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.tracking_links.with_raw_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="", ) @@ -195,7 +195,7 @@ def test_path_params_list(self, client: OnlyFansAPI) -> None: @parametrize def test_method_delete(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkDeleteResponse, tracking_link, path=["response"]) @@ -204,7 +204,7 @@ def test_method_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_delete(self, client: OnlyFansAPI) -> None: response = client.tracking_links.with_raw_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) @@ -217,7 +217,7 @@ def test_raw_response_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_delete(self, client: OnlyFansAPI) -> None: with client.tracking_links.with_streaming_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -233,7 +233,7 @@ def test_streaming_response_delete(self, client: OnlyFansAPI) -> None: def test_path_params_delete(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.tracking_links.with_raw_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="", ) @@ -247,7 +247,7 @@ def test_path_params_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_method_get_cohort_arps(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) assert tracking_link is None @@ -256,7 +256,7 @@ def test_method_get_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_get_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", @@ -268,7 +268,7 @@ def test_method_get_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> No @parametrize def test_raw_response_get_cohort_arps(self, client: OnlyFansAPI) -> None: response = client.tracking_links.with_raw_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) @@ -281,7 +281,7 @@ def test_raw_response_get_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_get_cohort_arps(self, client: OnlyFansAPI) -> None: with client.tracking_links.with_streaming_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -297,7 +297,7 @@ def test_streaming_response_get_cohort_arps(self, client: OnlyFansAPI) -> None: def test_path_params_get_cohort_arps(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.tracking_links.with_raw_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="", ) @@ -311,7 +311,7 @@ def test_path_params_get_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_get_stats(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkGetStatsResponse, tracking_link, path=["response"]) @@ -320,7 +320,7 @@ def test_method_get_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_method_get_stats_with_all_params(self, client: OnlyFansAPI) -> None: tracking_link = client.tracking_links.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -331,7 +331,7 @@ def test_method_get_stats_with_all_params(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_get_stats(self, client: OnlyFansAPI) -> None: response = client.tracking_links.with_raw_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) @@ -344,7 +344,7 @@ def test_raw_response_get_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_get_stats(self, client: OnlyFansAPI) -> None: with client.tracking_links.with_streaming_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -360,7 +360,7 @@ def test_streaming_response_get_stats(self, client: OnlyFansAPI) -> None: def test_path_params_get_stats(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.tracking_links.with_raw_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="", ) @@ -562,7 +562,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkRetrieveResponse, tracking_link, path=["response"]) @@ -571,7 +571,7 @@ async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.tracking_links.with_raw_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) @@ -584,7 +584,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.tracking_links.with_streaming_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -600,7 +600,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) async def test_path_params_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.tracking_links.with_raw_response.retrieve( - tracking_link_id="consectetur", + tracking_link_id="est", account="", ) @@ -672,7 +672,7 @@ async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkDeleteResponse, tracking_link, path=["response"]) @@ -681,7 +681,7 @@ async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.tracking_links.with_raw_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) @@ -694,7 +694,7 @@ async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None @parametrize async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.tracking_links.with_streaming_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -710,7 +710,7 @@ async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) - async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.tracking_links.with_raw_response.delete( - tracking_link_id="consectetur", + tracking_link_id="est", account="", ) @@ -724,7 +724,7 @@ async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) assert tracking_link is None @@ -733,7 +733,7 @@ async def test_method_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> N @parametrize async def test_method_get_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", @@ -745,7 +745,7 @@ async def test_method_get_cohort_arps_with_all_params(self, async_client: AsyncO @parametrize async def test_raw_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.tracking_links.with_raw_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) @@ -758,7 +758,7 @@ async def test_raw_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI @parametrize async def test_streaming_response_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.tracking_links.with_streaming_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -774,7 +774,7 @@ async def test_streaming_response_get_cohort_arps(self, async_client: AsyncOnlyF async def test_path_params_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.tracking_links.with_raw_response.get_cohort_arps( - tracking_link_id="ratione", + tracking_link_id="temporibus", account="", ) @@ -788,7 +788,7 @@ async def test_path_params_get_cohort_arps(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_method_get_stats(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrackingLinkGetStatsResponse, tracking_link, path=["response"]) @@ -797,7 +797,7 @@ async def test_method_get_stats(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_get_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: tracking_link = await async_client.tracking_links.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -808,7 +808,7 @@ async def test_method_get_stats_with_all_params(self, async_client: AsyncOnlyFan @parametrize async def test_raw_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.tracking_links.with_raw_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) @@ -821,7 +821,7 @@ async def test_raw_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> N @parametrize async def test_streaming_response_get_stats(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.tracking_links.with_streaming_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -837,7 +837,7 @@ async def test_streaming_response_get_stats(self, async_client: AsyncOnlyFansAPI async def test_path_params_get_stats(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.tracking_links.with_raw_response.get_stats( - tracking_link_id="reiciendis", + tracking_link_id="quidem", account="", ) diff --git a/tests/api_resources/test_trial_links.py b/tests/api_resources/test_trial_links.py index 2b6fc57c..abc79579 100644 --- a/tests/api_resources/test_trial_links.py +++ b/tests/api_resources/test_trial_links.py @@ -96,7 +96,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkRetrieveResponse, trial_link, path=["response"]) @@ -105,7 +105,7 @@ def test_method_retrieve(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None: response = client.trial_links.with_raw_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) @@ -118,7 +118,7 @@ def test_raw_response_retrieve(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None: with client.trial_links.with_streaming_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -134,7 +134,7 @@ def test_streaming_response_retrieve(self, client: OnlyFansAPI) -> None: def test_path_params_retrieve(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.trial_links.with_raw_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="", ) @@ -211,7 +211,7 @@ def test_path_params_list(self, client: OnlyFansAPI) -> None: @parametrize def test_method_delete(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkDeleteResponse, trial_link, path=["response"]) @@ -220,7 +220,7 @@ def test_method_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_delete(self, client: OnlyFansAPI) -> None: response = client.trial_links.with_raw_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) @@ -233,7 +233,7 @@ def test_raw_response_delete(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_delete(self, client: OnlyFansAPI) -> None: with client.trial_links.with_streaming_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -249,7 +249,7 @@ def test_streaming_response_delete(self, client: OnlyFansAPI) -> None: def test_path_params_delete(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.trial_links.with_raw_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="", ) @@ -327,7 +327,7 @@ def test_path_params_list_spenders(self, client: OnlyFansAPI) -> None: @parametrize def test_method_list_subscribers(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -338,7 +338,7 @@ def test_method_list_subscribers(self, client: OnlyFansAPI) -> None: @parametrize def test_raw_response_list_subscribers(self, client: OnlyFansAPI) -> None: response = client.trial_links.with_raw_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -353,7 +353,7 @@ def test_raw_response_list_subscribers(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_list_subscribers(self, client: OnlyFansAPI) -> None: with client.trial_links.with_streaming_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -371,7 +371,7 @@ def test_streaming_response_list_subscribers(self, client: OnlyFansAPI) -> None: def test_path_params_list_subscribers(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.trial_links.with_raw_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="", limit=10, offset=0, @@ -389,7 +389,7 @@ def test_path_params_list_subscribers(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) assert trial_link is None @@ -398,7 +398,7 @@ def test_method_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", @@ -410,7 +410,7 @@ def test_method_retrieve_cohort_arps_with_all_params(self, client: OnlyFansAPI) @parametrize def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: response = client.trial_links.with_raw_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) @@ -423,7 +423,7 @@ def test_raw_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: with client.trial_links.with_streaming_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -439,7 +439,7 @@ def test_streaming_response_retrieve_cohort_arps(self, client: OnlyFansAPI) -> N def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.trial_links.with_raw_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="", ) @@ -453,7 +453,7 @@ def test_path_params_retrieve_cohort_arps(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkRetrieveStatsResponse, trial_link, path=["response"]) @@ -462,7 +462,7 @@ def test_method_retrieve_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> None: trial_link = client.trial_links.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -473,7 +473,7 @@ def test_method_retrieve_stats_with_all_params(self, client: OnlyFansAPI) -> Non @parametrize def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None: response = client.trial_links.with_raw_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) @@ -486,7 +486,7 @@ def test_raw_response_retrieve_stats(self, client: OnlyFansAPI) -> None: @parametrize def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None: with client.trial_links.with_streaming_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -502,7 +502,7 @@ def test_streaming_response_retrieve_stats(self, client: OnlyFansAPI) -> None: def test_path_params_retrieve_stats(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.trial_links.with_raw_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="", ) @@ -589,7 +589,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkRetrieveResponse, trial_link, path=["response"]) @@ -598,7 +598,7 @@ async def test_method_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.trial_links.with_raw_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) @@ -611,7 +611,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.trial_links.with_streaming_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -627,7 +627,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncOnlyFansAPI) async def test_path_params_retrieve(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.trial_links.with_raw_response.retrieve( - trial_link_id="quisquam", + trial_link_id="qui", account="", ) @@ -704,7 +704,7 @@ async def test_path_params_list(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkDeleteResponse, trial_link, path=["response"]) @@ -713,7 +713,7 @@ async def test_method_delete(self, async_client: AsyncOnlyFansAPI) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.trial_links.with_raw_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) @@ -726,7 +726,7 @@ async def test_raw_response_delete(self, async_client: AsyncOnlyFansAPI) -> None @parametrize async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.trial_links.with_streaming_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -742,7 +742,7 @@ async def test_streaming_response_delete(self, async_client: AsyncOnlyFansAPI) - async def test_path_params_delete(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.trial_links.with_raw_response.delete( - trial_link_id="quisquam", + trial_link_id="qui", account="", ) @@ -820,7 +820,7 @@ async def test_path_params_list_spenders(self, async_client: AsyncOnlyFansAPI) - @parametrize async def test_method_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -831,7 +831,7 @@ async def test_method_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> @parametrize async def test_raw_response_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.trial_links.with_raw_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -846,7 +846,7 @@ async def test_raw_response_list_subscribers(self, async_client: AsyncOnlyFansAP @parametrize async def test_streaming_response_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.trial_links.with_streaming_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="acct_XXXXXXXXXXXXXXX", limit=10, offset=0, @@ -864,7 +864,7 @@ async def test_streaming_response_list_subscribers(self, async_client: AsyncOnly async def test_path_params_list_subscribers(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.trial_links.with_raw_response.list_subscribers( - trial_link_id="ut", + trial_link_id="nihil", account="", limit=10, offset=0, @@ -882,7 +882,7 @@ async def test_path_params_list_subscribers(self, async_client: AsyncOnlyFansAPI @parametrize async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) assert trial_link is None @@ -891,7 +891,7 @@ async def test_method_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", acquisition_end="2026-01-31T23:59:59Z", acquisition_start="2026-01-01T00:00:00Z", @@ -903,7 +903,7 @@ async def test_method_retrieve_cohort_arps_with_all_params(self, async_client: A @parametrize async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.trial_links.with_raw_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) @@ -916,7 +916,7 @@ async def test_raw_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFa @parametrize async def test_streaming_response_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.trial_links.with_streaming_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -932,7 +932,7 @@ async def test_streaming_response_retrieve_cohort_arps(self, async_client: Async async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.trial_links.with_raw_response.retrieve_cohort_arps( - trial_link_id="sapiente", + trial_link_id="atque", account="", ) @@ -946,7 +946,7 @@ async def test_path_params_retrieve_cohort_arps(self, async_client: AsyncOnlyFan @parametrize async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) assert_matches_type(TrialLinkRetrieveStatsResponse, trial_link, path=["response"]) @@ -955,7 +955,7 @@ async def test_method_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> No @parametrize async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOnlyFansAPI) -> None: trial_link = await async_client.trial_links.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", date_end="2026-01-31T23:59:59Z", date_start="2026-01-01T00:00:00Z", @@ -966,7 +966,7 @@ async def test_method_retrieve_stats_with_all_params(self, async_client: AsyncOn @parametrize async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.trial_links.with_raw_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) @@ -979,7 +979,7 @@ async def test_raw_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) @parametrize async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.trial_links.with_streaming_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="acct_XXXXXXXXXXXXXXX", ) as response: assert not response.is_closed @@ -995,7 +995,7 @@ async def test_streaming_response_retrieve_stats(self, async_client: AsyncOnlyFa async def test_path_params_retrieve_stats(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.trial_links.with_raw_response.retrieve_stats( - trial_link_id="esse", + trial_link_id="voluptatibus", account="", ) diff --git a/tests/api_resources/test_user_lists.py b/tests/api_resources/test_user_lists.py index 3675e366..6db0f741 100644 --- a/tests/api_resources/test_user_lists.py +++ b/tests/api_resources/test_user_lists.py @@ -28,7 +28,7 @@ class TestUserLists: def test_method_create(self, client: OnlyFansAPI) -> None: user_list = client.user_lists.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) assert_matches_type(UserListCreateResponse, user_list, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create(self, client: OnlyFansAPI) -> None: def test_raw_response_create(self, client: OnlyFansAPI) -> None: response = client.user_lists.with_raw_response.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: OnlyFansAPI) -> None: def test_streaming_response_create(self, client: OnlyFansAPI) -> None: with client.user_lists.with_streaming_response.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,7 +66,7 @@ def test_path_params_create(self, client: OnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): client.user_lists.with_raw_response.create( account="", - name="qrruxylgb", + name="masdmhkug", ) @pytest.mark.skip(reason="Mock server tests are disabled") @@ -304,7 +304,7 @@ class TestAsyncUserLists: async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None: user_list = await async_client.user_lists.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) assert_matches_type(UserListCreateResponse, user_list, path=["response"]) @@ -313,7 +313,7 @@ async def test_method_create(self, async_client: AsyncOnlyFansAPI) -> None: async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None: response = await async_client.user_lists.with_raw_response.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_create(self, async_client: AsyncOnlyFansAPI) -> None async def test_streaming_response_create(self, async_client: AsyncOnlyFansAPI) -> None: async with async_client.user_lists.with_streaming_response.create( account="acct_XXXXXXXXXXXXXXX", - name="qrruxylgb", + name="masdmhkug", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -342,7 +342,7 @@ async def test_path_params_create(self, async_client: AsyncOnlyFansAPI) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account` but received ''"): await async_client.user_lists.with_raw_response.create( account="", - name="qrruxylgb", + name="masdmhkug", ) @pytest.mark.skip(reason="Mock server tests are disabled")