change version to string

This commit is contained in:
Robin Appelman 2026-08-16 22:07:21 +02:00
commit 6e8e9f59a2
4 changed files with 85 additions and 83 deletions

View file

@ -100,7 +100,7 @@ impl PythonAsyncClient {
pub async fn update_tag_category(
&self,
name: String,
version: u32,
version: String,
new_name: Option<String>,
color: Option<String>,
order: Option<u32>,
@ -147,7 +147,7 @@ impl PythonAsyncClient {
/// Deletes a tag category (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_tag_category` for parameters and return type
pub async fn delete_tag_category(&self, name: String, version: u32) -> PyResult<()> {
pub async fn delete_tag_category(&self, name: String, version: String) -> PyResult<()> {
self.client
.request()
.delete_tag_category(name, version)
@ -241,7 +241,7 @@ impl PythonAsyncClient {
pub async fn update_tag(
&self,
name: String,
version: u32,
version: String,
names: Option<Py<PyAny>>,
category: Option<String>,
description: Option<String>,
@ -305,7 +305,7 @@ impl PythonAsyncClient {
/// Deletes an existing tag (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_tag` for parameters and return type
pub async fn delete_tag(&self, name: String, version: u32) -> PyResult<()> {
pub async fn delete_tag(&self, name: String, version: String) -> PyResult<()> {
self.client
.request()
.delete_tag(name, version)
@ -321,9 +321,9 @@ impl PythonAsyncClient {
pub async fn merge_tags(
&self,
remove_tag: String,
remove_tag_version: u32,
remove_tag_version: String,
merge_to_tag: String,
merge_to_version: u32,
merge_to_version: String,
fields: Option<Vec<String>>,
) -> PyResult<TagResource> {
let mtags = MergeTagsBuilder::default()
@ -458,7 +458,7 @@ impl PythonAsyncClient {
pub async fn update_post(
&self,
post_id: u32,
post_version: u32,
post_version: String,
url: Option<String>,
token: Option<String>,
file_path: Option<PathBuf>,
@ -636,7 +636,7 @@ impl PythonAsyncClient {
/// Deletes a post by its ID (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_post` for parameters and return type
pub async fn delete_post(&self, post_id: u32, version: u32) -> PyResult<()> {
pub async fn delete_post(&self, post_id: u32, version: String) -> PyResult<()> {
self.client
.request()
.delete_post(post_id, version)
@ -653,9 +653,9 @@ impl PythonAsyncClient {
pub async fn merge_post(
&self,
remove_post: u32,
remove_post_version: u32,
remove_post_version: String,
merge_to_post: u32,
merge_to_version: u32,
merge_to_version: String,
replace_post_content: bool,
fields: Option<Vec<String>>,
) -> PyResult<PostResource> {
@ -804,7 +804,7 @@ impl PythonAsyncClient {
pub async fn update_pool_category(
&self,
name: String,
version: u32,
version: String,
new_name: Option<String>,
color: Option<String>,
fields: Option<Vec<String>>,
@ -844,7 +844,7 @@ impl PythonAsyncClient {
/// Deletes existing pool category (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_pool_category` for parameters and return type
pub async fn delete_pool_category(&self, name: String, version: u32) -> PyResult<()> {
pub async fn delete_pool_category(&self, name: String, version: String) -> PyResult<()> {
self.client
.request()
.delete_pool_category(name, version)
@ -941,7 +941,7 @@ impl PythonAsyncClient {
pub async fn update_pool(
&self,
pool_id: u32,
version: u32,
version: String,
new_names: Option<Vec<String>>,
category: Option<String>,
description: Option<String>,
@ -990,7 +990,7 @@ impl PythonAsyncClient {
/// Deletes existing pool (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_pool` for parameters and return type
pub async fn delete_pool(&self, pool_id: u32, version: u32) -> PyResult<()> {
pub async fn delete_pool(&self, pool_id: u32, version: String) -> PyResult<()> {
self.client
.request()
.delete_pool(pool_id, version)
@ -1005,9 +1005,9 @@ impl PythonAsyncClient {
pub async fn merge_pools(
&self,
remove_pool: u32,
remove_pool_version: u32,
remove_pool_version: String,
merge_to_pool: u32,
merge_to_version: u32,
merge_to_version: String,
fields: Option<Vec<String>>,
) -> PyResult<PoolResource> {
let mpool = MergePoolBuilder::default()
@ -1073,7 +1073,7 @@ impl PythonAsyncClient {
pub async fn update_comment(
&self,
comment_id: u32,
version: u32,
version: String,
text: String,
fields: Option<Vec<String>>,
) -> PyResult<CommentResource> {
@ -1108,7 +1108,7 @@ impl PythonAsyncClient {
/// Deletes an existing comment (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_comment` for parameters and return type
pub async fn delete_comment(&self, comment_id: u32, version: u32) -> PyResult<()> {
pub async fn delete_comment(&self, comment_id: u32, version: String) -> PyResult<()> {
self.client
.request()
.delete_comment(comment_id, version)
@ -1200,7 +1200,7 @@ impl PythonAsyncClient {
pub async fn update_user(
&self,
name: String,
version: u32,
version: String,
new_name: Option<String>,
password: Option<String>,
rank: Option<UserRank>,
@ -1256,7 +1256,7 @@ impl PythonAsyncClient {
/// Deletes an existing user (async version)
///
/// :see: :func:`~szurubooru_client.SzurubooruSyncClient.delete_user` for parameters and return type
pub async fn delete_user(&self, user_name: String, version: u32) -> PyResult<()> {
pub async fn delete_user(&self, user_name: String, version: String) -> PyResult<()> {
self.client
.request()
.delete_user(user_name, version)
@ -1320,7 +1320,7 @@ impl PythonAsyncClient {
&self,
user_name: String,
token: String,
version: u32,
version: String,
enabled: Option<bool>,
note: Option<String>,
expiration_time: Option<DateTime<Utc>>,
@ -1352,7 +1352,7 @@ impl PythonAsyncClient {
&self,
user_name: String,
token: String,
version: u32,
version: String,
) -> PyResult<()> {
self.client
.request()