Reset, auto generated api looks shit
This commit is contained in:
parent
3522a8ce4a
commit
265ef7425e
64 changed files with 317 additions and 2967 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,2 @@
|
||||||
.idea
|
.idea
|
||||||
/target/
|
/target
|
||||||
**/*.rs.bk
|
|
||||||
Cargo.lock
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
# OpenAPI Generator Ignore
|
|
||||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
|
||||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
||||||
#ApiClient.cs
|
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
||||||
#foo/*/qux
|
|
||||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
||||||
#foo/**/qux
|
|
||||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
||||||
#docs/*.md
|
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
|
||||||
#!docs/README.md
|
|
|
@ -1,60 +0,0 @@
|
||||||
.gitignore
|
|
||||||
.openapi-generator-ignore
|
|
||||||
.travis.yml
|
|
||||||
Cargo.toml
|
|
||||||
README.md
|
|
||||||
docs/Body.md
|
|
||||||
docs/Comment.md
|
|
||||||
docs/Cookie.md
|
|
||||||
docs/Detail.md
|
|
||||||
docs/Error.md
|
|
||||||
docs/HttpValidationError.md
|
|
||||||
docs/Journal.md
|
|
||||||
docs/JournalPartial.md
|
|
||||||
docs/JournalStats.md
|
|
||||||
docs/JournalsApi.md
|
|
||||||
docs/JournalsFolder.md
|
|
||||||
docs/Next.md
|
|
||||||
docs/Submission.md
|
|
||||||
docs/SubmissionPartial.md
|
|
||||||
docs/SubmissionStats.md
|
|
||||||
docs/SubmissionUserFolder.md
|
|
||||||
docs/SubmissionsApi.md
|
|
||||||
docs/SubmissionsFolder.md
|
|
||||||
docs/User.md
|
|
||||||
docs/UserApi.md
|
|
||||||
docs/UserPartial.md
|
|
||||||
docs/UserStats.md
|
|
||||||
docs/ValidationError.md
|
|
||||||
docs/ValidationErrorLocInner.md
|
|
||||||
docs/Watchlist.md
|
|
||||||
git_push.sh
|
|
||||||
src/apis/configuration.rs
|
|
||||||
src/apis/journals_api.rs
|
|
||||||
src/apis/mod.rs
|
|
||||||
src/apis/submissions_api.rs
|
|
||||||
src/apis/user_api.rs
|
|
||||||
src/lib.rs
|
|
||||||
src/models/body.rs
|
|
||||||
src/models/comment.rs
|
|
||||||
src/models/cookie.rs
|
|
||||||
src/models/detail.rs
|
|
||||||
src/models/error.rs
|
|
||||||
src/models/http_validation_error.rs
|
|
||||||
src/models/journal.rs
|
|
||||||
src/models/journal_partial.rs
|
|
||||||
src/models/journal_stats.rs
|
|
||||||
src/models/journals_folder.rs
|
|
||||||
src/models/mod.rs
|
|
||||||
src/models/next.rs
|
|
||||||
src/models/submission.rs
|
|
||||||
src/models/submission_partial.rs
|
|
||||||
src/models/submission_stats.rs
|
|
||||||
src/models/submission_user_folder.rs
|
|
||||||
src/models/submissions_folder.rs
|
|
||||||
src/models/user.rs
|
|
||||||
src/models/user_partial.rs
|
|
||||||
src/models/user_stats.rs
|
|
||||||
src/models/validation_error.rs
|
|
||||||
src/models/validation_error_loc_inner.rs
|
|
||||||
src/models/watchlist.rs
|
|
|
@ -1 +0,0 @@
|
||||||
7.11.0
|
|
206
Cargo.lock
generated
206
Cargo.lock
generated
|
@ -17,6 +17,27 @@ version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "android-tzdata"
|
||||||
|
version = "0.1.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "android_system_properties"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "anyhow"
|
||||||
|
version = "1.0.95"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atomic-waker"
|
name = "atomic-waker"
|
||||||
version = "1.1.2"
|
version = "1.1.2"
|
||||||
|
@ -83,6 +104,21 @@ version = "1.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "chrono"
|
||||||
|
version = "0.4.39"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
|
||||||
|
dependencies = [
|
||||||
|
"android-tzdata",
|
||||||
|
"iana-time-zone",
|
||||||
|
"js-sys",
|
||||||
|
"num-traits",
|
||||||
|
"serde",
|
||||||
|
"wasm-bindgen",
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "core-foundation"
|
name = "core-foundation"
|
||||||
version = "0.9.4"
|
version = "0.9.4"
|
||||||
|
@ -364,6 +400,29 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "iana-time-zone"
|
||||||
|
version = "0.1.61"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
|
||||||
|
dependencies = [
|
||||||
|
"android_system_properties",
|
||||||
|
"core-foundation-sys",
|
||||||
|
"iana-time-zone-haiku",
|
||||||
|
"js-sys",
|
||||||
|
"wasm-bindgen",
|
||||||
|
"windows-core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "iana-time-zone-haiku"
|
||||||
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
||||||
|
dependencies = [
|
||||||
|
"cc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "icu_collections"
|
name = "icu_collections"
|
||||||
version = "1.5.0"
|
version = "1.5.0"
|
||||||
|
@ -553,6 +612,16 @@ version = "0.7.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
|
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lock_api"
|
||||||
|
version = "0.4.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"scopeguard",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.25"
|
version = "0.4.25"
|
||||||
|
@ -571,16 +640,6 @@ version = "0.3.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mime_guess"
|
|
||||||
version = "2.0.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e"
|
|
||||||
dependencies = [
|
|
||||||
"mime",
|
|
||||||
"unicase",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz_oxide"
|
name = "miniz_oxide"
|
||||||
version = "0.8.3"
|
version = "0.8.3"
|
||||||
|
@ -603,9 +662,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "native-tls"
|
name = "native-tls"
|
||||||
version = "0.2.13"
|
version = "0.2.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c"
|
checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
|
@ -618,6 +677,15 @@ dependencies = [
|
||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num-traits"
|
||||||
|
version = "0.2.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "object"
|
name = "object"
|
||||||
version = "0.36.7"
|
version = "0.36.7"
|
||||||
|
@ -635,9 +703,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openssl"
|
name = "openssl"
|
||||||
version = "0.10.69"
|
version = "0.10.68"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f5e534d133a060a3c19daec1eb3e98ec6f4685978834f2dbadfe2ec215bab64e"
|
checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
@ -677,6 +745,29 @@ dependencies = [
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
||||||
|
dependencies = [
|
||||||
|
"lock_api",
|
||||||
|
"parking_lot_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot_core"
|
||||||
|
version = "0.9.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"redox_syscall",
|
||||||
|
"smallvec",
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "percent-encoding"
|
name = "percent-encoding"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
@ -719,6 +810,15 @@ dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "redox_syscall"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.12.12"
|
version = "0.12.12"
|
||||||
|
@ -742,7 +842,6 @@ dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"mime",
|
"mime",
|
||||||
"mime_guess",
|
|
||||||
"native-tls",
|
"native-tls",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
|
@ -822,9 +921,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.11.0"
|
version = "1.10.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c"
|
checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
|
@ -845,14 +944,14 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustyfox"
|
name = "rustyfox"
|
||||||
version = "1.5.5"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"chrono",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_repr",
|
"tokio",
|
||||||
"url",
|
|
||||||
"uuid",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -870,6 +969,12 @@ dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scopeguard"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "security-framework"
|
name = "security-framework"
|
||||||
version = "2.11.1"
|
version = "2.11.1"
|
||||||
|
@ -925,17 +1030,6 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serde_repr"
|
|
||||||
version = "0.1.19"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
@ -954,6 +1048,15 @@ version = "1.3.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "signal-hook-registry"
|
||||||
|
version = "1.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slab"
|
name = "slab"
|
||||||
version = "0.4.9"
|
version = "0.4.9"
|
||||||
|
@ -1083,11 +1186,25 @@ dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"libc",
|
"libc",
|
||||||
"mio",
|
"mio",
|
||||||
|
"parking_lot",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
|
"signal-hook-registry",
|
||||||
"socket2",
|
"socket2",
|
||||||
|
"tokio-macros",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tokio-macros"
|
||||||
|
version = "2.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-native-tls"
|
name = "tokio-native-tls"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@ -1173,12 +1290,6 @@ version = "0.2.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "unicase"
|
|
||||||
version = "2.8.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.15"
|
version = "1.0.15"
|
||||||
|
@ -1214,16 +1325,6 @@ version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "uuid"
|
|
||||||
version = "1.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b"
|
|
||||||
dependencies = [
|
|
||||||
"getrandom",
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vcpkg"
|
name = "vcpkg"
|
||||||
version = "0.2.15"
|
version = "0.2.15"
|
||||||
|
@ -1326,6 +1427,15 @@ dependencies = [
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-core"
|
||||||
|
version = "0.52.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
||||||
|
dependencies = [
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-registry"
|
name = "windows-registry"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
|
|
17
Cargo.toml
17
Cargo.toml
|
@ -1,15 +1,12 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rustyfox"
|
name = "rustyfox"
|
||||||
version = "1.5.5"
|
version = "0.1.0"
|
||||||
authors = ["OpenAPI Generator team and contributors"]
|
|
||||||
description = "Autogenerated client bindings the furaffinity-api project"
|
|
||||||
license = ""
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "^1.0", features = ["derive"] }
|
anyhow = "1.0"
|
||||||
serde_json = "^1.0"
|
reqwest = { version = "0.12", features = ["json"] }
|
||||||
serde_repr = "^0.1"
|
tokio = { version = "1.43", features = ["full", "rt-multi-thread"]}
|
||||||
url = "^2.5"
|
serde = { version = "1.0", features = ["default", "derive"]}
|
||||||
uuid = { version = "^1.8", features = ["serde", "v4"] }
|
serde_json = { version = "1.0", features = ["default", "std", "alloc"]}
|
||||||
reqwest = { version = "^0.12", features = ["json", "multipart"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
94
README.md
94
README.md
|
@ -1,94 +0,0 @@
|
||||||
# Rust API client for openapi
|
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/FurryCoders/furaffinity-api)
|
|
||||||
[](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml)
|
|
||||||
[](https://pypi.org/project/faapi/3.11.6)
|
|
||||||
|
|
||||||
[](/robots.json)
|
|
||||||
[](/docs)
|
|
||||||
[](/redoc)
|
|
||||||
|
|
||||||
Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg)
|
|
||||||
|
|
||||||
_The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
|
|
||||||
|
|
||||||
- API version: 1.5.5
|
|
||||||
- Package version: 1.5.5
|
|
||||||
- Generator version: 7.11.0
|
|
||||||
- Build package: `org.openapitools.codegen.languages.RustClientCodegen`
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Put the package under your project folder in a directory named `openapi` and add the following to `Cargo.toml` under `[dependencies]`:
|
|
||||||
|
|
||||||
```
|
|
||||||
openapi = { path = "./openapi" }
|
|
||||||
```
|
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
|
||||||
|
|
||||||
All URIs are relative to *https://furaffinity-api.herokuapp.com*
|
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
*JournalsApi* | [**get_journal_journal_journal_id_post**](docs/JournalsApi.md#get_journal_journal_journal_id_post) | **POST** /journal/{journal_id}/ | Get Journal
|
|
||||||
*JournalsApi* | [**get_journals_user_username_journals_page_post**](docs/JournalsApi.md#get_journals_user_username_journals_page_post) | **POST** /user/{username}/journals/{page}/ | Get Journals
|
|
||||||
*SubmissionsApi* | [**get_favorites_user_username_favorites_page_post**](docs/SubmissionsApi.md#get_favorites_user_username_favorites_page_post) | **POST** /user/{username}/favorites/{page} | Get Favorites
|
|
||||||
*SubmissionsApi* | [**get_frontpage_frontpage_post**](docs/SubmissionsApi.md#get_frontpage_frontpage_post) | **POST** /frontpage/ | Get Frontpage
|
|
||||||
*SubmissionsApi* | [**get_gallery_user_username_gallery_page_post**](docs/SubmissionsApi.md#get_gallery_user_username_gallery_page_post) | **POST** /user/{username}/gallery/{page}/ | Get Gallery
|
|
||||||
*SubmissionsApi* | [**get_scraps_user_username_scraps_page_post**](docs/SubmissionsApi.md#get_scraps_user_username_scraps_page_post) | **POST** /user/{username}/scraps/{page}/ | Get Scraps
|
|
||||||
*SubmissionsApi* | [**get_submission_file_submission_submission_id_file_post**](docs/SubmissionsApi.md#get_submission_file_submission_submission_id_file_post) | **POST** /submission/{submission_id}/file/ | Get Submission File
|
|
||||||
*SubmissionsApi* | [**get_submission_submission_submission_id_post**](docs/SubmissionsApi.md#get_submission_submission_submission_id_post) | **POST** /submission/{submission_id}/ | Get Submission
|
|
||||||
*UserApi* | [**get_favorites_user_username_favorites_page_post**](docs/UserApi.md#get_favorites_user_username_favorites_page_post) | **POST** /user/{username}/favorites/{page} | Get Favorites
|
|
||||||
*UserApi* | [**get_gallery_user_username_gallery_page_post**](docs/UserApi.md#get_gallery_user_username_gallery_page_post) | **POST** /user/{username}/gallery/{page}/ | Get Gallery
|
|
||||||
*UserApi* | [**get_journals_user_username_journals_page_post**](docs/UserApi.md#get_journals_user_username_journals_page_post) | **POST** /user/{username}/journals/{page}/ | Get Journals
|
|
||||||
*UserApi* | [**get_login_user_me_post**](docs/UserApi.md#get_login_user_me_post) | **POST** /me/ | Get Login User
|
|
||||||
*UserApi* | [**get_scraps_user_username_scraps_page_post**](docs/UserApi.md#get_scraps_user_username_scraps_page_post) | **POST** /user/{username}/scraps/{page}/ | Get Scraps
|
|
||||||
*UserApi* | [**get_user_user_username_post**](docs/UserApi.md#get_user_user_username_post) | **POST** /user/{username}/ | Get User
|
|
||||||
*UserApi* | [**get_user_watchlist_by_user_username_watchlist_by_page_post**](docs/UserApi.md#get_user_watchlist_by_user_username_watchlist_by_page_post) | **POST** /user/{username}/watchlist/by/{page}/ | Get User Watchlist By
|
|
||||||
*UserApi* | [**get_user_watchlist_to_user_username_watchlist_to_page_post**](docs/UserApi.md#get_user_watchlist_to_user_username_watchlist_to_page_post) | **POST** /user/{username}/watchlist/to/{page}/ | Get User Watchlist To
|
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
|
||||||
|
|
||||||
- [Body](docs/Body.md)
|
|
||||||
- [Comment](docs/Comment.md)
|
|
||||||
- [Cookie](docs/Cookie.md)
|
|
||||||
- [Detail](docs/Detail.md)
|
|
||||||
- [Error](docs/Error.md)
|
|
||||||
- [HttpValidationError](docs/HttpValidationError.md)
|
|
||||||
- [Journal](docs/Journal.md)
|
|
||||||
- [JournalPartial](docs/JournalPartial.md)
|
|
||||||
- [JournalStats](docs/JournalStats.md)
|
|
||||||
- [JournalsFolder](docs/JournalsFolder.md)
|
|
||||||
- [Next](docs/Next.md)
|
|
||||||
- [Submission](docs/Submission.md)
|
|
||||||
- [SubmissionPartial](docs/SubmissionPartial.md)
|
|
||||||
- [SubmissionStats](docs/SubmissionStats.md)
|
|
||||||
- [SubmissionUserFolder](docs/SubmissionUserFolder.md)
|
|
||||||
- [SubmissionsFolder](docs/SubmissionsFolder.md)
|
|
||||||
- [User](docs/User.md)
|
|
||||||
- [UserPartial](docs/UserPartial.md)
|
|
||||||
- [UserStats](docs/UserStats.md)
|
|
||||||
- [ValidationError](docs/ValidationError.md)
|
|
||||||
- [ValidationErrorLocInner](docs/ValidationErrorLocInner.md)
|
|
||||||
- [Watchlist](docs/Watchlist.md)
|
|
||||||
|
|
||||||
|
|
||||||
To get access to the crate's generated documentation, use:
|
|
||||||
|
|
||||||
```
|
|
||||||
cargo doc --open
|
|
||||||
```
|
|
||||||
|
|
||||||
## Author
|
|
||||||
|
|
||||||
|
|
||||||
|
|
12
docs/Body.md
12
docs/Body.md
|
@ -1,12 +0,0 @@
|
||||||
# Body
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**cookies** | [**Vec<models::Cookie>**](Cookie.md) | A list of cookies to use to authenticate the request |
|
|
||||||
**bbcode** | Option<**bool**> | Set to true to return text fields in BBCode format | [optional][default to false]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Comment
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **i32** | Comment's ID |
|
|
||||||
**author** | [**models::UserPartial**](UserPartial.md) | |
|
|
||||||
**date** | **String** | Comment's post date |
|
|
||||||
**text** | **String** | Comment's content |
|
|
||||||
**replies** | [**Vec<models::Comment>**](Comment.md) | Replies to the comment |
|
|
||||||
**reply_to** | Option<**i32**> | |
|
|
||||||
**edited** | **bool** | Whether the comment was edited |
|
|
||||||
**hidden** | **bool** | Whether the comment is hidden |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Cookie
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | The name of the cookie (a, b, etc.) |
|
|
||||||
**value** | **String** | The value of the cookie (e.g. 5dabd975-436f-4af7-b949-f5d0f1e803a0) |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Detail
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Error
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**detail** | Option<[**models::Detail**](Detail.md)> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# HttpValidationError
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**detail** | Option<[**Vec<models::ValidationError>**](ValidationError.md)> | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
# Journal
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **i32** | Journal's ID |
|
|
||||||
**title** | **String** | Journal's title |
|
|
||||||
**author** | [**models::UserPartial**](UserPartial.md) | |
|
|
||||||
**stats** | [**models::JournalStats**](JournalStats.md) | |
|
|
||||||
**date** | **String** | Journal's upload date |
|
|
||||||
**header** | **String** | Journal's header |
|
|
||||||
**footer** | **String** | Journal's footer |
|
|
||||||
**content** | **String** | Journal's content |
|
|
||||||
**mentions** | **Vec<String>** | Journal's mentions (users mentioned with FA links in the content) |
|
|
||||||
**comments** | [**Vec<models::Comment>**](Comment.md) | Journal's comments |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
# JournalPartial
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **i32** | Journal's ID |
|
|
||||||
**title** | **String** | Journal's title |
|
|
||||||
**author** | [**models::UserPartial**](UserPartial.md) | |
|
|
||||||
**stats** | [**models::JournalStats**](JournalStats.md) | |
|
|
||||||
**date** | **String** | Journal's upload date |
|
|
||||||
**content** | **String** | Journal's content |
|
|
||||||
**mentions** | **Vec<String>** | Journal's mentions (users mentioned with FA links in the content) |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# JournalStats
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**comments** | **i32** | Number of comments |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,73 +0,0 @@
|
||||||
# \JournalsApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://furaffinity-api.herokuapp.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_journal_journal_journal_id_post**](JournalsApi.md#get_journal_journal_journal_id_post) | **POST** /journal/{journal_id}/ | Get Journal
|
|
||||||
[**get_journals_user_username_journals_page_post**](JournalsApi.md#get_journals_user_username_journals_page_post) | **POST** /user/{username}/journals/{page}/ | Get Journals
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## get_journal_journal_journal_id_post
|
|
||||||
|
|
||||||
> models::Journal get_journal_journal_journal_id_post(journal_id, body)
|
|
||||||
Get Journal
|
|
||||||
|
|
||||||
Get a journal
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**journal_id** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::Journal**](Journal.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_journals_user_username_journals_page_post
|
|
||||||
|
|
||||||
> models::JournalsFolder get_journals_user_username_journals_page_post(username, page, body)
|
|
||||||
Get Journals
|
|
||||||
|
|
||||||
Get a list of journals from the user's journals folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::JournalsFolder**](JournalsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# JournalsFolder
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**results** | [**Vec<models::JournalPartial>**](JournalPartial.md) | List of journals found in the page |
|
|
||||||
**next** | Option<**i32**> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
10
docs/Next.md
10
docs/Next.md
|
@ -1,10 +0,0 @@
|
||||||
# Next
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# Submission
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **i32** | Submission's ID |
|
|
||||||
**title** | **String** | Submission's title |
|
|
||||||
**author** | [**models::UserPartial**](UserPartial.md) | |
|
|
||||||
**date** | **String** | Submission's upload date |
|
|
||||||
**tags** | **Vec<String>** | Submission's tags |
|
|
||||||
**category** | **String** | Submission's category (e.g. Artwork) |
|
|
||||||
**species** | **String** | Submission's species |
|
|
||||||
**gender** | **String** | Submission's gender |
|
|
||||||
**rating** | **String** | Submission's rating (e.g. general, mature, etc.) |
|
|
||||||
**r#type** | **String** | Submission's type (i.e. image, text, music) |
|
|
||||||
**stats** | [**models::SubmissionStats**](SubmissionStats.md) | |
|
|
||||||
**description** | **String** | Submission's description |
|
|
||||||
**footer** | **String** | Submission's footer |
|
|
||||||
**mentions** | **Vec<String>** | Submission's mentions (users mentioned with FA links in the description) |
|
|
||||||
**folder** | **String** | Submission's folder (i.e. gallery or scraps) |
|
|
||||||
**user_folders** | [**Vec<models::SubmissionUserFolder>**](SubmissionUserFolder.md) | User-defined folder(s) |
|
|
||||||
**file_url** | **String** | URL to submission's file |
|
|
||||||
**thumbnail_url** | **String** | URL to submission's thumbnail |
|
|
||||||
**comments** | [**Vec<models::Comment>**](Comment.md) | Submission's comments |
|
|
||||||
**prev** | Option<**i32**> | |
|
|
||||||
**next** | Option<**i32**> | |
|
|
||||||
**favorite** | **bool** | Favorite status of the submission |
|
|
||||||
**favorite_toggle_link** | **String** | Link to toggle favorite status of the submission |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
# SubmissionPartial
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **i32** | Submission's ID |
|
|
||||||
**title** | **String** | Submission's title |
|
|
||||||
**author** | [**models::UserPartial**](UserPartial.md) | |
|
|
||||||
**rating** | **String** | Submission's rating (e.g. general, mature, etc.) |
|
|
||||||
**r#type** | **String** | Submission's type (i.e. image, text, music) |
|
|
||||||
**thumbnail_url** | **String** | URL to submission's thumbnail |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# SubmissionStats
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**views** | **i32** | Number of views |
|
|
||||||
**comments** | **i32** | Number of comments |
|
|
||||||
**favorites** | **i32** | Number of favorites |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# SubmissionUserFolder
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | Folder name |
|
|
||||||
**url** | **String** | URL to folder |
|
|
||||||
**group** | **String** | Folder group (if any) |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,202 +0,0 @@
|
||||||
# \SubmissionsApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://furaffinity-api.herokuapp.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_favorites_user_username_favorites_page_post**](SubmissionsApi.md#get_favorites_user_username_favorites_page_post) | **POST** /user/{username}/favorites/{page} | Get Favorites
|
|
||||||
[**get_frontpage_frontpage_post**](SubmissionsApi.md#get_frontpage_frontpage_post) | **POST** /frontpage/ | Get Frontpage
|
|
||||||
[**get_gallery_user_username_gallery_page_post**](SubmissionsApi.md#get_gallery_user_username_gallery_page_post) | **POST** /user/{username}/gallery/{page}/ | Get Gallery
|
|
||||||
[**get_scraps_user_username_scraps_page_post**](SubmissionsApi.md#get_scraps_user_username_scraps_page_post) | **POST** /user/{username}/scraps/{page}/ | Get Scraps
|
|
||||||
[**get_submission_file_submission_submission_id_file_post**](SubmissionsApi.md#get_submission_file_submission_submission_id_file_post) | **POST** /submission/{submission_id}/file/ | Get Submission File
|
|
||||||
[**get_submission_submission_submission_id_post**](SubmissionsApi.md#get_submission_submission_submission_id_post) | **POST** /submission/{submission_id}/ | Get Submission
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## get_favorites_user_username_favorites_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_favorites_user_username_favorites_page_post(username, page, body)
|
|
||||||
Get Favorites
|
|
||||||
|
|
||||||
Get a list of submissions from the user's favorites folder. Starting page should be 0 or '/'.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **String** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_frontpage_frontpage_post
|
|
||||||
|
|
||||||
> Vec<models::SubmissionPartial> get_frontpage_frontpage_post(body)
|
|
||||||
Get Frontpage
|
|
||||||
|
|
||||||
Get the most recent submissions.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**Vec<models::SubmissionPartial>**](SubmissionPartial.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_gallery_user_username_gallery_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_gallery_user_username_gallery_page_post(username, page, body)
|
|
||||||
Get Gallery
|
|
||||||
|
|
||||||
Get a list of submissions from the user's gallery folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_scraps_user_username_scraps_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_scraps_user_username_scraps_page_post(username, page, body)
|
|
||||||
Get Scraps
|
|
||||||
|
|
||||||
Get a list of submissions from the user's scraps folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_submission_file_submission_submission_id_file_post
|
|
||||||
|
|
||||||
> get_submission_file_submission_submission_id_file_post(submission_id, body)
|
|
||||||
Get Submission File
|
|
||||||
|
|
||||||
Redirect to a submission's file URL
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**submission_id** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
(empty response body)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_submission_submission_submission_id_post
|
|
||||||
|
|
||||||
> models::Submission get_submission_submission_submission_id_post(submission_id, body)
|
|
||||||
Get Submission
|
|
||||||
|
|
||||||
Get a submission
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**submission_id** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::Submission**](Submission.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# SubmissionsFolder
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**results** | [**Vec<models::SubmissionPartial>**](SubmissionPartial.md) | List of submissions found in the page |
|
|
||||||
**next** | Option<[**models::Next**](Next.md)> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
24
docs/User.md
24
docs/User.md
|
@ -1,24 +0,0 @@
|
||||||
# User
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | User's name (as it appears on their page) |
|
|
||||||
**status** | **String** | User's status (~, !, etc.) |
|
|
||||||
**title** | **String** | User's title |
|
|
||||||
**join_date** | Option<**String**> | |
|
|
||||||
**profile** | **String** | User's profile text in HTML format |
|
|
||||||
**stats** | [**models::UserStats**](UserStats.md) | User's statistics |
|
|
||||||
**info** | **std::collections::HashMap<String, String>** | User's info (e.g. Accepting Commissions, Favorite Music, etc.) |
|
|
||||||
**contacts** | **std::collections::HashMap<String, String>** | User's contacts (e.g. Twitter, Telegram, etc.) |
|
|
||||||
**avatar_url** | **String** | URL to user's icon |
|
|
||||||
**banner_url** | Option<**String**> | |
|
|
||||||
**watched** | **bool** | Watch status of the user |
|
|
||||||
**watched_toggle_link** | Option<**String**> | |
|
|
||||||
**blocked** | **bool** | Block status of the user |
|
|
||||||
**blocked_toggle_link** | Option<**String**> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
269
docs/UserApi.md
269
docs/UserApi.md
|
@ -1,269 +0,0 @@
|
||||||
# \UserApi
|
|
||||||
|
|
||||||
All URIs are relative to *https://furaffinity-api.herokuapp.com*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_favorites_user_username_favorites_page_post**](UserApi.md#get_favorites_user_username_favorites_page_post) | **POST** /user/{username}/favorites/{page} | Get Favorites
|
|
||||||
[**get_gallery_user_username_gallery_page_post**](UserApi.md#get_gallery_user_username_gallery_page_post) | **POST** /user/{username}/gallery/{page}/ | Get Gallery
|
|
||||||
[**get_journals_user_username_journals_page_post**](UserApi.md#get_journals_user_username_journals_page_post) | **POST** /user/{username}/journals/{page}/ | Get Journals
|
|
||||||
[**get_login_user_me_post**](UserApi.md#get_login_user_me_post) | **POST** /me/ | Get Login User
|
|
||||||
[**get_scraps_user_username_scraps_page_post**](UserApi.md#get_scraps_user_username_scraps_page_post) | **POST** /user/{username}/scraps/{page}/ | Get Scraps
|
|
||||||
[**get_user_user_username_post**](UserApi.md#get_user_user_username_post) | **POST** /user/{username}/ | Get User
|
|
||||||
[**get_user_watchlist_by_user_username_watchlist_by_page_post**](UserApi.md#get_user_watchlist_by_user_username_watchlist_by_page_post) | **POST** /user/{username}/watchlist/by/{page}/ | Get User Watchlist By
|
|
||||||
[**get_user_watchlist_to_user_username_watchlist_to_page_post**](UserApi.md#get_user_watchlist_to_user_username_watchlist_to_page_post) | **POST** /user/{username}/watchlist/to/{page}/ | Get User Watchlist To
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## get_favorites_user_username_favorites_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_favorites_user_username_favorites_page_post(username, page, body)
|
|
||||||
Get Favorites
|
|
||||||
|
|
||||||
Get a list of submissions from the user's favorites folder. Starting page should be 0 or '/'.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **String** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_gallery_user_username_gallery_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_gallery_user_username_gallery_page_post(username, page, body)
|
|
||||||
Get Gallery
|
|
||||||
|
|
||||||
Get a list of submissions from the user's gallery folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_journals_user_username_journals_page_post
|
|
||||||
|
|
||||||
> models::JournalsFolder get_journals_user_username_journals_page_post(username, page, body)
|
|
||||||
Get Journals
|
|
||||||
|
|
||||||
Get a list of journals from the user's journals folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::JournalsFolder**](JournalsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_login_user_me_post
|
|
||||||
|
|
||||||
> models::User get_login_user_me_post(body)
|
|
||||||
Get Login User
|
|
||||||
|
|
||||||
Get the logged-in user's details, profile text, etc. The username may contain underscore (_) characters
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::User**](User.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_scraps_user_username_scraps_page_post
|
|
||||||
|
|
||||||
> models::SubmissionsFolder get_scraps_user_username_scraps_page_post(username, page, body)
|
|
||||||
Get Scraps
|
|
||||||
|
|
||||||
Get a list of submissions from the user's scraps folder.
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::SubmissionsFolder**](SubmissionsFolder.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_user_user_username_post
|
|
||||||
|
|
||||||
> models::User get_user_user_username_post(username, body)
|
|
||||||
Get User
|
|
||||||
|
|
||||||
Get a user's details, profile text, etc. The username may contain underscore (_) characters
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::User**](User.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_user_watchlist_by_user_username_watchlist_by_page_post
|
|
||||||
|
|
||||||
> models::Watchlist get_user_watchlist_by_user_username_watchlist_by_page_post(username, page, body)
|
|
||||||
Get User Watchlist By
|
|
||||||
|
|
||||||
Get a list of users watched by {username}
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::Watchlist**](Watchlist.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
||||||
## get_user_watchlist_to_user_username_watchlist_to_page_post
|
|
||||||
|
|
||||||
> models::Watchlist get_user_watchlist_to_user_username_watchlist_to_page_post(username, page, body)
|
|
||||||
Get User Watchlist To
|
|
||||||
|
|
||||||
Get a list of users watching {username}
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Required | Notes
|
|
||||||
------------- | ------------- | ------------- | ------------- | -------------
|
|
||||||
**username** | **String** | | [required] |
|
|
||||||
**page** | **i32** | | [required] |
|
|
||||||
**body** | [**Body**](Body.md) | | [required] |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**models::Watchlist**](Watchlist.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# UserPartial
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **String** | User's name (as it appears on their page) |
|
|
||||||
**status** | Option<**String**> | |
|
|
||||||
**title** | **String** | User's title |
|
|
||||||
**avatar_url** | **String** | URL to user's icon |
|
|
||||||
**join_date** | Option<**String**> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
# UserStats
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**views** | **i32** | Number of views |
|
|
||||||
**submissions** | **i32** | Number of submissions |
|
|
||||||
**favorites** | **i32** | Number of favorites |
|
|
||||||
**comments_earned** | **i32** | Number of comments earned |
|
|
||||||
**comments_made** | **i32** | Number of comments made |
|
|
||||||
**journals** | **i32** | Number of journals |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# ValidationError
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**loc** | [**Vec<models::ValidationErrorLocInner>**](ValidationError_loc_inner.md) | |
|
|
||||||
**msg** | **String** | |
|
|
||||||
**r#type** | **String** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# ValidationErrorLocInner
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Watchlist
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**results** | [**Vec<models::UserPartial>**](UserPartial.md) | List of users found in the page |
|
|
||||||
**next** | Option<**i32**> | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub struct Configuration {
|
|
||||||
pub base_path: String,
|
|
||||||
pub user_agent: Option<String>,
|
|
||||||
pub client: reqwest::Client,
|
|
||||||
pub basic_auth: Option<BasicAuth>,
|
|
||||||
pub oauth_access_token: Option<String>,
|
|
||||||
pub bearer_access_token: Option<String>,
|
|
||||||
pub api_key: Option<ApiKey>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub type BasicAuth = (String, Option<String>);
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub struct ApiKey {
|
|
||||||
pub prefix: Option<String>,
|
|
||||||
pub key: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
impl Configuration {
|
|
||||||
pub fn new() -> Configuration {
|
|
||||||
Configuration::default()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for Configuration {
|
|
||||||
fn default() -> Self {
|
|
||||||
Configuration {
|
|
||||||
base_path: "https://furaffinity-api.herokuapp.com".to_owned(),
|
|
||||||
user_agent: Some("OpenAPI-Generator/1.5.5/rust".to_owned()),
|
|
||||||
client: reqwest::Client::new(),
|
|
||||||
basic_auth: None,
|
|
||||||
oauth_access_token: None,
|
|
||||||
bearer_access_token: None,
|
|
||||||
api_key: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,101 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
use reqwest;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use crate::{apis::ResponseContent, models};
|
|
||||||
use super::{Error, configuration};
|
|
||||||
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_journal_journal_journal_id_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetJournalJournalJournalIdPostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_journals_user_username_journals_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetJournalsUserUsernameJournalsPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Get a journal
|
|
||||||
pub async fn get_journal_journal_journal_id_post(configuration: &configuration::Configuration, journal_id: i32, body: models::Body) -> Result<models::Journal, Error<GetJournalJournalJournalIdPostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_journal_id = journal_id;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/journal/{journal_id}/", configuration.base_path, journal_id=p_journal_id);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetJournalJournalJournalIdPostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of journals from the user's journals folder.
|
|
||||||
pub async fn get_journals_user_username_journals_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::JournalsFolder, Error<GetJournalsUserUsernameJournalsPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/journals/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetJournalsUserUsernameJournalsPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
use std::error;
|
|
||||||
use std::fmt;
|
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
|
||||||
pub struct ResponseContent<T> {
|
|
||||||
pub status: reqwest::StatusCode,
|
|
||||||
pub content: String,
|
|
||||||
pub entity: Option<T>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
|
||||||
pub enum Error<T> {
|
|
||||||
Reqwest(reqwest::Error),
|
|
||||||
Serde(serde_json::Error),
|
|
||||||
Io(std::io::Error),
|
|
||||||
ResponseError(ResponseContent<T>),
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <T> fmt::Display for Error<T> {
|
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
||||||
let (module, e) = match self {
|
|
||||||
Error::Reqwest(e) => ("reqwest", e.to_string()),
|
|
||||||
Error::Serde(e) => ("serde", e.to_string()),
|
|
||||||
Error::Io(e) => ("IO", e.to_string()),
|
|
||||||
Error::ResponseError(e) => ("response", format!("status code {}", e.status)),
|
|
||||||
};
|
|
||||||
write!(f, "error in {}: {}", module, e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <T: fmt::Debug> error::Error for Error<T> {
|
|
||||||
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
|
|
||||||
Some(match self {
|
|
||||||
Error::Reqwest(e) => e,
|
|
||||||
Error::Serde(e) => e,
|
|
||||||
Error::Io(e) => e,
|
|
||||||
Error::ResponseError(_) => return None,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <T> From<reqwest::Error> for Error<T> {
|
|
||||||
fn from(e: reqwest::Error) -> Self {
|
|
||||||
Error::Reqwest(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <T> From<serde_json::Error> for Error<T> {
|
|
||||||
fn from(e: serde_json::Error) -> Self {
|
|
||||||
Error::Serde(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl <T> From<std::io::Error> for Error<T> {
|
|
||||||
fn from(e: std::io::Error) -> Self {
|
|
||||||
Error::Io(e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn urlencode<T: AsRef<str>>(s: T) -> String {
|
|
||||||
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> {
|
|
||||||
if let serde_json::Value::Object(object) = value {
|
|
||||||
let mut params = vec![];
|
|
||||||
|
|
||||||
for (key, value) in object {
|
|
||||||
match value {
|
|
||||||
serde_json::Value::Object(_) => params.append(&mut parse_deep_object(
|
|
||||||
&format!("{}[{}]", prefix, key),
|
|
||||||
value,
|
|
||||||
)),
|
|
||||||
serde_json::Value::Array(array) => {
|
|
||||||
for (i, value) in array.iter().enumerate() {
|
|
||||||
params.append(&mut parse_deep_object(
|
|
||||||
&format!("{}[{}][{}]", prefix, key, i),
|
|
||||||
value,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())),
|
|
||||||
_ => params.push((format!("{}[{}]", prefix, key), value.to_string())),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
|
|
||||||
unimplemented!("Only objects are supported with style=deepObject")
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod journals_api;
|
|
||||||
pub mod submissions_api;
|
|
||||||
pub mod user_api;
|
|
||||||
|
|
||||||
pub mod configuration;
|
|
|
@ -1,265 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
use reqwest;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use crate::{apis::ResponseContent, models};
|
|
||||||
use super::{Error, configuration};
|
|
||||||
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_favorites_user_username_favorites_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetFavoritesUserUsernameFavoritesPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_frontpage_frontpage_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetFrontpageFrontpagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_gallery_user_username_gallery_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetGalleryUserUsernameGalleryPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_scraps_user_username_scraps_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetScrapsUserUsernameScrapsPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_submission_file_submission_submission_id_file_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetSubmissionFileSubmissionSubmissionIdFilePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_submission_submission_submission_id_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetSubmissionSubmissionSubmissionIdPostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's favorites folder. Starting page should be 0 or '/'.
|
|
||||||
pub async fn get_favorites_user_username_favorites_page_post(configuration: &configuration::Configuration, username: &str, page: &str, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetFavoritesUserUsernameFavoritesPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/favorites/{page}", configuration.base_path, username=crate::apis::urlencode(p_username), page=crate::apis::urlencode(p_page));
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetFavoritesUserUsernameFavoritesPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the most recent submissions.
|
|
||||||
pub async fn get_frontpage_frontpage_post(configuration: &configuration::Configuration, body: models::Body) -> Result<Vec<models::SubmissionPartial>, Error<GetFrontpageFrontpagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/frontpage/", configuration.base_path);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetFrontpageFrontpagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's gallery folder.
|
|
||||||
pub async fn get_gallery_user_username_gallery_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetGalleryUserUsernameGalleryPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/gallery/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetGalleryUserUsernameGalleryPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's scraps folder.
|
|
||||||
pub async fn get_scraps_user_username_scraps_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetScrapsUserUsernameScrapsPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/scraps/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetScrapsUserUsernameScrapsPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Redirect to a submission's file URL
|
|
||||||
pub async fn get_submission_file_submission_submission_id_file_post(configuration: &configuration::Configuration, submission_id: i32, body: models::Body) -> Result<(), Error<GetSubmissionFileSubmissionSubmissionIdFilePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_submission_id = submission_id;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/submission/{submission_id}/file/", configuration.base_path, submission_id=p_submission_id);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
Ok(())
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetSubmissionFileSubmissionSubmissionIdFilePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a submission
|
|
||||||
pub async fn get_submission_submission_submission_id_post(configuration: &configuration::Configuration, submission_id: i32, body: models::Body) -> Result<models::Submission, Error<GetSubmissionSubmissionSubmissionIdPostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_submission_id = submission_id;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/submission/{submission_id}/", configuration.base_path, submission_id=p_submission_id);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetSubmissionSubmissionSubmissionIdPostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,351 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
use reqwest;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use crate::{apis::ResponseContent, models};
|
|
||||||
use super::{Error, configuration};
|
|
||||||
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_favorites_user_username_favorites_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetFavoritesUserUsernameFavoritesPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_gallery_user_username_gallery_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetGalleryUserUsernameGalleryPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_journals_user_username_journals_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetJournalsUserUsernameJournalsPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_login_user_me_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetLoginUserMePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_scraps_user_username_scraps_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetScrapsUserUsernameScrapsPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_user_user_username_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetUserUserUsernamePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_user_watchlist_by_user_username_watchlist_by_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetUserWatchlistByUserUsernameWatchlistByPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
/// struct for typed errors of method [`get_user_watchlist_to_user_username_watchlist_to_page_post`]
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[serde(untagged)]
|
|
||||||
pub enum GetUserWatchlistToUserUsernameWatchlistToPagePostError {
|
|
||||||
Status401(models::Error),
|
|
||||||
Status403(models::Error),
|
|
||||||
Status404(models::Error),
|
|
||||||
Status500(models::Error),
|
|
||||||
Status422(models::HttpValidationError),
|
|
||||||
UnknownValue(serde_json::Value),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's favorites folder. Starting page should be 0 or '/'.
|
|
||||||
pub async fn get_favorites_user_username_favorites_page_post(configuration: &configuration::Configuration, username: &str, page: &str, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetFavoritesUserUsernameFavoritesPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/favorites/{page}", configuration.base_path, username=crate::apis::urlencode(p_username), page=crate::apis::urlencode(p_page));
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetFavoritesUserUsernameFavoritesPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's gallery folder.
|
|
||||||
pub async fn get_gallery_user_username_gallery_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetGalleryUserUsernameGalleryPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/gallery/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetGalleryUserUsernameGalleryPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of journals from the user's journals folder.
|
|
||||||
pub async fn get_journals_user_username_journals_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::JournalsFolder, Error<GetJournalsUserUsernameJournalsPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/journals/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetJournalsUserUsernameJournalsPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the logged-in user's details, profile text, etc. The username may contain underscore (_) characters
|
|
||||||
pub async fn get_login_user_me_post(configuration: &configuration::Configuration, body: models::Body) -> Result<models::User, Error<GetLoginUserMePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/me/", configuration.base_path);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetLoginUserMePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of submissions from the user's scraps folder.
|
|
||||||
pub async fn get_scraps_user_username_scraps_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::SubmissionsFolder, Error<GetScrapsUserUsernameScrapsPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/scraps/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetScrapsUserUsernameScrapsPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a user's details, profile text, etc. The username may contain underscore (_) characters
|
|
||||||
pub async fn get_user_user_username_post(configuration: &configuration::Configuration, username: &str, body: models::Body) -> Result<models::User, Error<GetUserUserUsernamePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/", configuration.base_path, username=crate::apis::urlencode(p_username));
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetUserUserUsernamePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of users watched by {username}
|
|
||||||
pub async fn get_user_watchlist_by_user_username_watchlist_by_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::Watchlist, Error<GetUserWatchlistByUserUsernameWatchlistByPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/watchlist/by/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetUserWatchlistByUserUsernameWatchlistByPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get a list of users watching {username}
|
|
||||||
pub async fn get_user_watchlist_to_user_username_watchlist_to_page_post(configuration: &configuration::Configuration, username: &str, page: i32, body: models::Body) -> Result<models::Watchlist, Error<GetUserWatchlistToUserUsernameWatchlistToPagePostError>> {
|
|
||||||
// add a prefix to parameters to efficiently prevent name collisions
|
|
||||||
let p_username = username;
|
|
||||||
let p_page = page;
|
|
||||||
let p_body = body;
|
|
||||||
|
|
||||||
let uri_str = format!("{}/user/{username}/watchlist/to/{page}/", configuration.base_path, username=crate::apis::urlencode(p_username), page=p_page);
|
|
||||||
let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
|
|
||||||
|
|
||||||
if let Some(ref user_agent) = configuration.user_agent {
|
|
||||||
req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
|
|
||||||
}
|
|
||||||
req_builder = req_builder.json(&p_body);
|
|
||||||
|
|
||||||
let req = req_builder.build()?;
|
|
||||||
let resp = configuration.client.execute(req).await?;
|
|
||||||
|
|
||||||
let status = resp.status();
|
|
||||||
|
|
||||||
if !status.is_client_error() && !status.is_server_error() {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
serde_json::from_str(&content).map_err(Error::from)
|
|
||||||
} else {
|
|
||||||
let content = resp.text().await?;
|
|
||||||
let entity: Option<GetUserWatchlistToUserUsernameWatchlistToPagePostError> = serde_json::from_str(&content).ok();
|
|
||||||
Err(Error::ResponseError(ResponseContent { status, content, entity }))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
44
src/client.rs
Normal file
44
src/client.rs
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use reqwest::header::HeaderMap;
|
||||||
|
use crate::models::{CookieRequest, Submission, SubmissionRequest};
|
||||||
|
|
||||||
|
const FA_API_BASE_ORIGIN: &str = "https://furaffinity-api.herokuapp.com";
|
||||||
|
|
||||||
|
pub struct Client {
|
||||||
|
request_client: reqwest::Client,
|
||||||
|
cookies: HashMap<String, String>
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
pub fn new(cookies: HashMap<String, String>) -> anyhow::Result<Self> {
|
||||||
|
let headers = HeaderMap::from_iter(vec![
|
||||||
|
(reqwest::header::ACCEPT, "application/json".try_into()?),
|
||||||
|
(reqwest::header::CONTENT_TYPE, "application/json".try_into()?)
|
||||||
|
].into_iter());
|
||||||
|
let request_client = reqwest::ClientBuilder::new()
|
||||||
|
.default_headers(headers)
|
||||||
|
.build()?;
|
||||||
|
|
||||||
|
Ok(Self {
|
||||||
|
request_client,
|
||||||
|
cookies
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn get_submission<S>(&mut self, submission_id: S) -> anyhow::Result<Submission> where S: Into<String> {
|
||||||
|
let url = format!("{FA_API_BASE_ORIGIN}/submission/{}", submission_id.into());
|
||||||
|
let res = self.request_client
|
||||||
|
.post(url)
|
||||||
|
.json(&SubmissionRequest {
|
||||||
|
cookies: vec![
|
||||||
|
],
|
||||||
|
bbcode: false
|
||||||
|
})
|
||||||
|
.send().await?;
|
||||||
|
|
||||||
|
println!("{:?}", res.status());
|
||||||
|
//File::create("./out.json")?.write(res.text().await?.as_bytes())?;
|
||||||
|
let submission: Submission = res.json().await?;
|
||||||
|
Ok(submission)
|
||||||
|
}
|
||||||
|
}
|
11
src/lib.rs
11
src/lib.rs
|
@ -1,11 +1,2 @@
|
||||||
#![allow(unused_imports)]
|
pub mod client;
|
||||||
#![allow(clippy::too_many_arguments)]
|
|
||||||
|
|
||||||
extern crate serde_repr;
|
|
||||||
extern crate serde;
|
|
||||||
extern crate serde_json;
|
|
||||||
extern crate url;
|
|
||||||
extern crate reqwest;
|
|
||||||
|
|
||||||
pub mod apis;
|
|
||||||
pub mod models;
|
pub mod models;
|
9
src/main.rs
Normal file
9
src/main.rs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
use rustyfox::client::Client;
|
||||||
|
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() -> anyhow::Result<()> {
|
||||||
|
let mut client = Client::new()?;
|
||||||
|
let submission = client.get_submission("59630962").await?;
|
||||||
|
println!("Submission: {:?}", submission);
|
||||||
|
Ok(())
|
||||||
|
}
|
96
src/models.rs
Normal file
96
src/models.rs
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct CookieRequest {
|
||||||
|
pub name: String,
|
||||||
|
pub value: String
|
||||||
|
}
|
||||||
|
|
||||||
|
impl CookieRequest {
|
||||||
|
pub fn new<S>(name: S, value: S) -> Self where S: Into<String> {
|
||||||
|
Self { name: name.into(), value: value.into() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct SubmissionRequest {
|
||||||
|
pub cookies: Vec<CookieRequest>,
|
||||||
|
pub bbcode: bool
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct Author {
|
||||||
|
pub name: String,
|
||||||
|
pub status: String,
|
||||||
|
pub title: String,
|
||||||
|
pub avatar_url: String,
|
||||||
|
// pub join_date: DateTime<Utc>,
|
||||||
|
pub join_date: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct Stats {
|
||||||
|
pub views: i32,
|
||||||
|
pub comments: i32,
|
||||||
|
pub favorites: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct UserFolder {
|
||||||
|
pub name: String,
|
||||||
|
pub url: String,
|
||||||
|
pub group: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct Replies {
|
||||||
|
id: i32,
|
||||||
|
author: Author,
|
||||||
|
text: String,
|
||||||
|
replies: Vec<Replies>,
|
||||||
|
reply_to: i32,
|
||||||
|
edited: bool,
|
||||||
|
hidden: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct Comment {
|
||||||
|
pub id: i32,
|
||||||
|
pub author: Author,
|
||||||
|
// pub date: DateTime<Utc>,
|
||||||
|
pub date: String,
|
||||||
|
pub text: String,
|
||||||
|
pub replies: Vec<Replies>,
|
||||||
|
pub reply_to: Option<i32>,
|
||||||
|
pub edited: bool,
|
||||||
|
pub hidden: bool,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct Submission {
|
||||||
|
pub id: i32,
|
||||||
|
pub title: String,
|
||||||
|
pub author: Author,
|
||||||
|
// pub date: DateTime<Utc>,
|
||||||
|
pub date: String,
|
||||||
|
pub tags: Vec<String>,
|
||||||
|
pub category: String,
|
||||||
|
pub species: String,
|
||||||
|
pub gender: String,
|
||||||
|
pub rating: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
pub submission_type: String,
|
||||||
|
pub stats: Stats,
|
||||||
|
pub description: String,
|
||||||
|
pub footer: String,
|
||||||
|
pub mentions: Vec<String>,
|
||||||
|
pub folder: String,
|
||||||
|
pub user_folders: Vec<UserFolder>,
|
||||||
|
pub file_url: String,
|
||||||
|
pub thumbnail_url: String,
|
||||||
|
pub comments: Vec<Comment>,
|
||||||
|
pub prev: Option<i32>,
|
||||||
|
pub next: Option<i32>,
|
||||||
|
pub favorite: bool,
|
||||||
|
pub favorite_toggle_link: String,
|
||||||
|
}
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Body : Request body with authentication fields
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Body {
|
|
||||||
/// A list of cookies to use to authenticate the request
|
|
||||||
#[serde(rename = "cookies")]
|
|
||||||
pub cookies: Vec<models::Cookie>,
|
|
||||||
/// Set to true to return text fields in BBCode format
|
|
||||||
#[serde(rename = "bbcode", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub bbcode: Option<bool>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Body {
|
|
||||||
/// Request body with authentication fields
|
|
||||||
pub fn new(cookies: Vec<models::Cookie>) -> Body {
|
|
||||||
Body {
|
|
||||||
cookies,
|
|
||||||
bbcode: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,56 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Comment : Comment information and text
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Comment {
|
|
||||||
/// Comment's ID
|
|
||||||
#[serde(rename = "id")]
|
|
||||||
pub id: i32,
|
|
||||||
#[serde(rename = "author")]
|
|
||||||
pub author: Box<models::UserPartial>,
|
|
||||||
/// Comment's post date
|
|
||||||
#[serde(rename = "date")]
|
|
||||||
pub date: String,
|
|
||||||
/// Comment's content
|
|
||||||
#[serde(rename = "text")]
|
|
||||||
pub text: String,
|
|
||||||
/// Replies to the comment
|
|
||||||
#[serde(rename = "replies")]
|
|
||||||
pub replies: Vec<models::Comment>,
|
|
||||||
#[serde(rename = "reply_to", deserialize_with = "Option::deserialize")]
|
|
||||||
pub reply_to: Option<i32>,
|
|
||||||
/// Whether the comment was edited
|
|
||||||
#[serde(rename = "edited")]
|
|
||||||
pub edited: bool,
|
|
||||||
/// Whether the comment is hidden
|
|
||||||
#[serde(rename = "hidden")]
|
|
||||||
pub hidden: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Comment {
|
|
||||||
/// Comment information and text
|
|
||||||
pub fn new(id: i32, author: models::UserPartial, date: String, text: String, replies: Vec<models::Comment>, reply_to: Option<i32>, edited: bool, hidden: bool) -> Comment {
|
|
||||||
Comment {
|
|
||||||
id,
|
|
||||||
author: Box::new(author),
|
|
||||||
date,
|
|
||||||
text,
|
|
||||||
replies,
|
|
||||||
reply_to,
|
|
||||||
edited,
|
|
||||||
hidden,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Cookie : Container for the cookies used to connect to Fur Affinity
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Cookie {
|
|
||||||
/// The name of the cookie (a, b, etc.)
|
|
||||||
#[serde(rename = "name")]
|
|
||||||
pub name: String,
|
|
||||||
/// The value of the cookie (e.g. 5dabd975-436f-4af7-b949-f5d0f1e803a0)
|
|
||||||
#[serde(rename = "value")]
|
|
||||||
pub value: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Cookie {
|
|
||||||
/// Container for the cookies used to connect to Fur Affinity
|
|
||||||
pub fn new(name: String, value: String) -> Cookie {
|
|
||||||
Cookie {
|
|
||||||
name,
|
|
||||||
value,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Detail : details of the error
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Detail {
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Detail {
|
|
||||||
/// details of the error
|
|
||||||
pub fn new() -> Detail {
|
|
||||||
Detail {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Error : Error response
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Error {
|
|
||||||
#[serde(rename = "detail", deserialize_with = "Option::deserialize")]
|
|
||||||
pub detail: Option<Box<models::Detail>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Error {
|
|
||||||
/// Error response
|
|
||||||
pub fn new(detail: Option<models::Detail>) -> Error {
|
|
||||||
Error {
|
|
||||||
detail: if let Some(x) = detail {Some(Box::new(x))} else {None},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct HttpValidationError {
|
|
||||||
#[serde(rename = "detail", skip_serializing_if = "Option::is_none")]
|
|
||||||
pub detail: Option<Vec<models::ValidationError>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl HttpValidationError {
|
|
||||||
pub fn new() -> HttpValidationError {
|
|
||||||
HttpValidationError {
|
|
||||||
detail: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Journal : Journal information as it appears in the journal's page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Journal {
|
|
||||||
/// Journal's ID
|
|
||||||
#[serde(rename = "id")]
|
|
||||||
pub id: i32,
|
|
||||||
/// Journal's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
#[serde(rename = "author")]
|
|
||||||
pub author: Box<models::UserPartial>,
|
|
||||||
#[serde(rename = "stats")]
|
|
||||||
pub stats: Box<models::JournalStats>,
|
|
||||||
/// Journal's upload date
|
|
||||||
#[serde(rename = "date")]
|
|
||||||
pub date: String,
|
|
||||||
/// Journal's header
|
|
||||||
#[serde(rename = "header")]
|
|
||||||
pub header: String,
|
|
||||||
/// Journal's footer
|
|
||||||
#[serde(rename = "footer")]
|
|
||||||
pub footer: String,
|
|
||||||
/// Journal's content
|
|
||||||
#[serde(rename = "content")]
|
|
||||||
pub content: String,
|
|
||||||
/// Journal's mentions (users mentioned with FA links in the content)
|
|
||||||
#[serde(rename = "mentions")]
|
|
||||||
pub mentions: Vec<String>,
|
|
||||||
/// Journal's comments
|
|
||||||
#[serde(rename = "comments")]
|
|
||||||
pub comments: Vec<models::Comment>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Journal {
|
|
||||||
/// Journal information as it appears in the journal's page
|
|
||||||
pub fn new(id: i32, title: String, author: models::UserPartial, stats: models::JournalStats, date: String, header: String, footer: String, content: String, mentions: Vec<String>, comments: Vec<models::Comment>) -> Journal {
|
|
||||||
Journal {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
author: Box::new(author),
|
|
||||||
stats: Box::new(stats),
|
|
||||||
date,
|
|
||||||
header,
|
|
||||||
footer,
|
|
||||||
content,
|
|
||||||
mentions,
|
|
||||||
comments,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// JournalPartial : Journal information without comments as it appears in the journals' page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct JournalPartial {
|
|
||||||
/// Journal's ID
|
|
||||||
#[serde(rename = "id")]
|
|
||||||
pub id: i32,
|
|
||||||
/// Journal's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
#[serde(rename = "author")]
|
|
||||||
pub author: Box<models::UserPartial>,
|
|
||||||
#[serde(rename = "stats")]
|
|
||||||
pub stats: Box<models::JournalStats>,
|
|
||||||
/// Journal's upload date
|
|
||||||
#[serde(rename = "date")]
|
|
||||||
pub date: String,
|
|
||||||
/// Journal's content
|
|
||||||
#[serde(rename = "content")]
|
|
||||||
pub content: String,
|
|
||||||
/// Journal's mentions (users mentioned with FA links in the content)
|
|
||||||
#[serde(rename = "mentions")]
|
|
||||||
pub mentions: Vec<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl JournalPartial {
|
|
||||||
/// Journal information without comments as it appears in the journals' page
|
|
||||||
pub fn new(id: i32, title: String, author: models::UserPartial, stats: models::JournalStats, date: String, content: String, mentions: Vec<String>) -> JournalPartial {
|
|
||||||
JournalPartial {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
author: Box::new(author),
|
|
||||||
stats: Box::new(stats),
|
|
||||||
date,
|
|
||||||
content,
|
|
||||||
mentions,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// JournalStats : Journal statistics
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct JournalStats {
|
|
||||||
/// Number of comments
|
|
||||||
#[serde(rename = "comments")]
|
|
||||||
pub comments: i32,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl JournalStats {
|
|
||||||
/// Journal statistics
|
|
||||||
pub fn new(comments: i32) -> JournalStats {
|
|
||||||
JournalStats {
|
|
||||||
comments,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// JournalsFolder : Journals appearing in a journals page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct JournalsFolder {
|
|
||||||
/// List of journals found in the page
|
|
||||||
#[serde(rename = "results")]
|
|
||||||
pub results: Vec<models::JournalPartial>,
|
|
||||||
#[serde(rename = "next", deserialize_with = "Option::deserialize")]
|
|
||||||
pub next: Option<i32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl JournalsFolder {
|
|
||||||
/// Journals appearing in a journals page
|
|
||||||
pub fn new(results: Vec<models::JournalPartial>, next: Option<i32>) -> JournalsFolder {
|
|
||||||
JournalsFolder {
|
|
||||||
results,
|
|
||||||
next,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
pub mod body;
|
|
||||||
pub use self::body::Body;
|
|
||||||
pub mod comment;
|
|
||||||
pub use self::comment::Comment;
|
|
||||||
pub mod cookie;
|
|
||||||
pub use self::cookie::Cookie;
|
|
||||||
pub mod detail;
|
|
||||||
pub use self::detail::Detail;
|
|
||||||
pub mod error;
|
|
||||||
pub use self::error::Error;
|
|
||||||
pub mod http_validation_error;
|
|
||||||
pub use self::http_validation_error::HttpValidationError;
|
|
||||||
pub mod journal;
|
|
||||||
pub use self::journal::Journal;
|
|
||||||
pub mod journal_partial;
|
|
||||||
pub use self::journal_partial::JournalPartial;
|
|
||||||
pub mod journal_stats;
|
|
||||||
pub use self::journal_stats::JournalStats;
|
|
||||||
pub mod journals_folder;
|
|
||||||
pub use self::journals_folder::JournalsFolder;
|
|
||||||
pub mod next;
|
|
||||||
pub use self::next::Next;
|
|
||||||
pub mod submission;
|
|
||||||
pub use self::submission::Submission;
|
|
||||||
pub mod submission_partial;
|
|
||||||
pub use self::submission_partial::SubmissionPartial;
|
|
||||||
pub mod submission_stats;
|
|
||||||
pub use self::submission_stats::SubmissionStats;
|
|
||||||
pub mod submission_user_folder;
|
|
||||||
pub use self::submission_user_folder::SubmissionUserFolder;
|
|
||||||
pub mod submissions_folder;
|
|
||||||
pub use self::submissions_folder::SubmissionsFolder;
|
|
||||||
pub mod user;
|
|
||||||
pub use self::user::User;
|
|
||||||
pub mod user_partial;
|
|
||||||
pub use self::user_partial::UserPartial;
|
|
||||||
pub mod user_stats;
|
|
||||||
pub use self::user_stats::UserStats;
|
|
||||||
pub mod validation_error;
|
|
||||||
pub use self::validation_error::ValidationError;
|
|
||||||
pub mod validation_error_loc_inner;
|
|
||||||
pub use self::validation_error_loc_inner::ValidationErrorLocInner;
|
|
||||||
pub mod watchlist;
|
|
||||||
pub use self::watchlist::Watchlist;
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Next : Number of the next page, null if last page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Next {
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Next {
|
|
||||||
/// Number of the next page, null if last page
|
|
||||||
pub fn new() -> Next {
|
|
||||||
Next {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,114 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Submission : Submission information as it appears on the submission's page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Submission {
|
|
||||||
/// Submission's ID
|
|
||||||
#[serde(rename = "id")]
|
|
||||||
pub id: i32,
|
|
||||||
/// Submission's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
#[serde(rename = "author")]
|
|
||||||
pub author: Box<models::UserPartial>,
|
|
||||||
/// Submission's upload date
|
|
||||||
#[serde(rename = "date")]
|
|
||||||
pub date: String,
|
|
||||||
/// Submission's tags
|
|
||||||
#[serde(rename = "tags")]
|
|
||||||
pub tags: Vec<String>,
|
|
||||||
/// Submission's category (e.g. Artwork)
|
|
||||||
#[serde(rename = "category")]
|
|
||||||
pub category: String,
|
|
||||||
/// Submission's species
|
|
||||||
#[serde(rename = "species")]
|
|
||||||
pub species: String,
|
|
||||||
/// Submission's gender
|
|
||||||
#[serde(rename = "gender")]
|
|
||||||
pub gender: String,
|
|
||||||
/// Submission's rating (e.g. general, mature, etc.)
|
|
||||||
#[serde(rename = "rating")]
|
|
||||||
pub rating: String,
|
|
||||||
/// Submission's type (i.e. image, text, music)
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub r#type: String,
|
|
||||||
#[serde(rename = "stats")]
|
|
||||||
pub stats: Box<models::SubmissionStats>,
|
|
||||||
/// Submission's description
|
|
||||||
#[serde(rename = "description")]
|
|
||||||
pub description: String,
|
|
||||||
/// Submission's footer
|
|
||||||
#[serde(rename = "footer")]
|
|
||||||
pub footer: String,
|
|
||||||
/// Submission's mentions (users mentioned with FA links in the description)
|
|
||||||
#[serde(rename = "mentions")]
|
|
||||||
pub mentions: Vec<String>,
|
|
||||||
/// Submission's folder (i.e. gallery or scraps)
|
|
||||||
#[serde(rename = "folder")]
|
|
||||||
pub folder: String,
|
|
||||||
/// User-defined folder(s)
|
|
||||||
#[serde(rename = "user_folders")]
|
|
||||||
pub user_folders: Vec<models::SubmissionUserFolder>,
|
|
||||||
/// URL to submission's file
|
|
||||||
#[serde(rename = "file_url")]
|
|
||||||
pub file_url: String,
|
|
||||||
/// URL to submission's thumbnail
|
|
||||||
#[serde(rename = "thumbnail_url")]
|
|
||||||
pub thumbnail_url: String,
|
|
||||||
/// Submission's comments
|
|
||||||
#[serde(rename = "comments")]
|
|
||||||
pub comments: Vec<models::Comment>,
|
|
||||||
#[serde(rename = "prev", deserialize_with = "Option::deserialize")]
|
|
||||||
pub prev: Option<i32>,
|
|
||||||
#[serde(rename = "next", deserialize_with = "Option::deserialize")]
|
|
||||||
pub next: Option<i32>,
|
|
||||||
/// Favorite status of the submission
|
|
||||||
#[serde(rename = "favorite")]
|
|
||||||
pub favorite: bool,
|
|
||||||
/// Link to toggle favorite status of the submission
|
|
||||||
#[serde(rename = "favorite_toggle_link")]
|
|
||||||
pub favorite_toggle_link: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Submission {
|
|
||||||
/// Submission information as it appears on the submission's page
|
|
||||||
pub fn new(id: i32, title: String, author: models::UserPartial, date: String, tags: Vec<String>, category: String, species: String, gender: String, rating: String, r#type: String, stats: models::SubmissionStats, description: String, footer: String, mentions: Vec<String>, folder: String, user_folders: Vec<models::SubmissionUserFolder>, file_url: String, thumbnail_url: String, comments: Vec<models::Comment>, prev: Option<i32>, next: Option<i32>, favorite: bool, favorite_toggle_link: String) -> Submission {
|
|
||||||
Submission {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
author: Box::new(author),
|
|
||||||
date,
|
|
||||||
tags,
|
|
||||||
category,
|
|
||||||
species,
|
|
||||||
gender,
|
|
||||||
rating,
|
|
||||||
r#type,
|
|
||||||
stats: Box::new(stats),
|
|
||||||
description,
|
|
||||||
footer,
|
|
||||||
mentions,
|
|
||||||
folder,
|
|
||||||
user_folders,
|
|
||||||
file_url,
|
|
||||||
thumbnail_url,
|
|
||||||
comments,
|
|
||||||
prev,
|
|
||||||
next,
|
|
||||||
favorite,
|
|
||||||
favorite_toggle_link,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// SubmissionPartial : Simplified submission information
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct SubmissionPartial {
|
|
||||||
/// Submission's ID
|
|
||||||
#[serde(rename = "id")]
|
|
||||||
pub id: i32,
|
|
||||||
/// Submission's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
#[serde(rename = "author")]
|
|
||||||
pub author: Box<models::UserPartial>,
|
|
||||||
/// Submission's rating (e.g. general, mature, etc.)
|
|
||||||
#[serde(rename = "rating")]
|
|
||||||
pub rating: String,
|
|
||||||
/// Submission's type (i.e. image, text, music)
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub r#type: String,
|
|
||||||
/// URL to submission's thumbnail
|
|
||||||
#[serde(rename = "thumbnail_url")]
|
|
||||||
pub thumbnail_url: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SubmissionPartial {
|
|
||||||
/// Simplified submission information
|
|
||||||
pub fn new(id: i32, title: String, author: models::UserPartial, rating: String, r#type: String, thumbnail_url: String) -> SubmissionPartial {
|
|
||||||
SubmissionPartial {
|
|
||||||
id,
|
|
||||||
title,
|
|
||||||
author: Box::new(author),
|
|
||||||
rating,
|
|
||||||
r#type,
|
|
||||||
thumbnail_url,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// SubmissionStats : Submission statistics
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct SubmissionStats {
|
|
||||||
/// Number of views
|
|
||||||
#[serde(rename = "views")]
|
|
||||||
pub views: i32,
|
|
||||||
/// Number of comments
|
|
||||||
#[serde(rename = "comments")]
|
|
||||||
pub comments: i32,
|
|
||||||
/// Number of favorites
|
|
||||||
#[serde(rename = "favorites")]
|
|
||||||
pub favorites: i32,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SubmissionStats {
|
|
||||||
/// Submission statistics
|
|
||||||
pub fn new(views: i32, comments: i32, favorites: i32) -> SubmissionStats {
|
|
||||||
SubmissionStats {
|
|
||||||
views,
|
|
||||||
comments,
|
|
||||||
favorites,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct SubmissionUserFolder {
|
|
||||||
/// Folder name
|
|
||||||
#[serde(rename = "name")]
|
|
||||||
pub name: String,
|
|
||||||
/// URL to folder
|
|
||||||
#[serde(rename = "url")]
|
|
||||||
pub url: String,
|
|
||||||
/// Folder group (if any)
|
|
||||||
#[serde(rename = "group")]
|
|
||||||
pub group: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SubmissionUserFolder {
|
|
||||||
pub fn new(name: String, url: String, group: String) -> SubmissionUserFolder {
|
|
||||||
SubmissionUserFolder {
|
|
||||||
name,
|
|
||||||
url,
|
|
||||||
group,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// SubmissionsFolder : Submissions appearing in a submissions page (e.g. gallery page)
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct SubmissionsFolder {
|
|
||||||
/// List of submissions found in the page
|
|
||||||
#[serde(rename = "results")]
|
|
||||||
pub results: Vec<models::SubmissionPartial>,
|
|
||||||
#[serde(rename = "next", deserialize_with = "Option::deserialize")]
|
|
||||||
pub next: Option<Box<models::Next>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SubmissionsFolder {
|
|
||||||
/// Submissions appearing in a submissions page (e.g. gallery page)
|
|
||||||
pub fn new(results: Vec<models::SubmissionPartial>, next: Option<models::Next>) -> SubmissionsFolder {
|
|
||||||
SubmissionsFolder {
|
|
||||||
results,
|
|
||||||
next: if let Some(x) = next {Some(Box::new(x))} else {None},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// User : User information from their personal page
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct User {
|
|
||||||
/// User's name (as it appears on their page)
|
|
||||||
#[serde(rename = "name")]
|
|
||||||
pub name: String,
|
|
||||||
/// User's status (~, !, etc.)
|
|
||||||
#[serde(rename = "status")]
|
|
||||||
pub status: String,
|
|
||||||
/// User's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
#[serde(rename = "join_date", deserialize_with = "Option::deserialize")]
|
|
||||||
pub join_date: Option<String>,
|
|
||||||
/// User's profile text in HTML format
|
|
||||||
#[serde(rename = "profile")]
|
|
||||||
pub profile: String,
|
|
||||||
/// User's statistics
|
|
||||||
#[serde(rename = "stats")]
|
|
||||||
pub stats: Box<models::UserStats>,
|
|
||||||
/// User's info (e.g. Accepting Commissions, Favorite Music, etc.)
|
|
||||||
#[serde(rename = "info")]
|
|
||||||
pub info: std::collections::HashMap<String, String>,
|
|
||||||
/// User's contacts (e.g. Twitter, Telegram, etc.)
|
|
||||||
#[serde(rename = "contacts")]
|
|
||||||
pub contacts: std::collections::HashMap<String, String>,
|
|
||||||
/// URL to user's icon
|
|
||||||
#[serde(rename = "avatar_url")]
|
|
||||||
pub avatar_url: String,
|
|
||||||
#[serde(rename = "banner_url", deserialize_with = "Option::deserialize")]
|
|
||||||
pub banner_url: Option<String>,
|
|
||||||
/// Watch status of the user
|
|
||||||
#[serde(rename = "watched")]
|
|
||||||
pub watched: bool,
|
|
||||||
#[serde(rename = "watched_toggle_link", deserialize_with = "Option::deserialize")]
|
|
||||||
pub watched_toggle_link: Option<String>,
|
|
||||||
/// Block status of the user
|
|
||||||
#[serde(rename = "blocked")]
|
|
||||||
pub blocked: bool,
|
|
||||||
#[serde(rename = "blocked_toggle_link", deserialize_with = "Option::deserialize")]
|
|
||||||
pub blocked_toggle_link: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl User {
|
|
||||||
/// User information from their personal page
|
|
||||||
pub fn new(name: String, status: String, title: String, join_date: Option<String>, profile: String, stats: models::UserStats, info: std::collections::HashMap<String, String>, contacts: std::collections::HashMap<String, String>, avatar_url: String, banner_url: Option<String>, watched: bool, watched_toggle_link: Option<String>, blocked: bool, blocked_toggle_link: Option<String>) -> User {
|
|
||||||
User {
|
|
||||||
name,
|
|
||||||
status,
|
|
||||||
title,
|
|
||||||
join_date,
|
|
||||||
profile,
|
|
||||||
stats: Box::new(stats),
|
|
||||||
info,
|
|
||||||
contacts,
|
|
||||||
avatar_url,
|
|
||||||
banner_url,
|
|
||||||
watched,
|
|
||||||
watched_toggle_link,
|
|
||||||
blocked,
|
|
||||||
blocked_toggle_link,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// UserPartial : Simplified user information
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct UserPartial {
|
|
||||||
/// User's name (as it appears on their page)
|
|
||||||
#[serde(rename = "name")]
|
|
||||||
pub name: String,
|
|
||||||
#[serde(rename = "status", deserialize_with = "Option::deserialize")]
|
|
||||||
pub status: Option<String>,
|
|
||||||
/// User's title
|
|
||||||
#[serde(rename = "title")]
|
|
||||||
pub title: String,
|
|
||||||
/// URL to user's icon
|
|
||||||
#[serde(rename = "avatar_url")]
|
|
||||||
pub avatar_url: String,
|
|
||||||
#[serde(rename = "join_date", deserialize_with = "Option::deserialize")]
|
|
||||||
pub join_date: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl UserPartial {
|
|
||||||
/// Simplified user information
|
|
||||||
pub fn new(name: String, status: Option<String>, title: String, avatar_url: String, join_date: Option<String>) -> UserPartial {
|
|
||||||
UserPartial {
|
|
||||||
name,
|
|
||||||
status,
|
|
||||||
title,
|
|
||||||
avatar_url,
|
|
||||||
join_date,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// UserStats : User statistics
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct UserStats {
|
|
||||||
/// Number of views
|
|
||||||
#[serde(rename = "views")]
|
|
||||||
pub views: i32,
|
|
||||||
/// Number of submissions
|
|
||||||
#[serde(rename = "submissions")]
|
|
||||||
pub submissions: i32,
|
|
||||||
/// Number of favorites
|
|
||||||
#[serde(rename = "favorites")]
|
|
||||||
pub favorites: i32,
|
|
||||||
/// Number of comments earned
|
|
||||||
#[serde(rename = "comments_earned")]
|
|
||||||
pub comments_earned: i32,
|
|
||||||
/// Number of comments made
|
|
||||||
#[serde(rename = "comments_made")]
|
|
||||||
pub comments_made: i32,
|
|
||||||
/// Number of journals
|
|
||||||
#[serde(rename = "journals")]
|
|
||||||
pub journals: i32,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl UserStats {
|
|
||||||
/// User statistics
|
|
||||||
pub fn new(views: i32, submissions: i32, favorites: i32, comments_earned: i32, comments_made: i32, journals: i32) -> UserStats {
|
|
||||||
UserStats {
|
|
||||||
views,
|
|
||||||
submissions,
|
|
||||||
favorites,
|
|
||||||
comments_earned,
|
|
||||||
comments_made,
|
|
||||||
journals,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct ValidationError {
|
|
||||||
#[serde(rename = "loc")]
|
|
||||||
pub loc: Vec<models::ValidationErrorLocInner>,
|
|
||||||
#[serde(rename = "msg")]
|
|
||||||
pub msg: String,
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub r#type: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ValidationError {
|
|
||||||
pub fn new(loc: Vec<models::ValidationErrorLocInner>, msg: String, r#type: String) -> ValidationError {
|
|
||||||
ValidationError {
|
|
||||||
loc,
|
|
||||||
msg,
|
|
||||||
r#type,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct ValidationErrorLocInner {
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ValidationErrorLocInner {
|
|
||||||
pub fn new() -> ValidationErrorLocInner {
|
|
||||||
ValidationErrorLocInner {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
/*
|
|
||||||
* Fur Affinity API
|
|
||||||
*
|
|
||||||
* [](https://github.com/FurryCoders/furaffinity-api) [](https://github.com/FurryCoders/furaffinity-api/actions/workflows/test.yml) [](https://pypi.org/project/faapi/3.11.6) [](/robots.json) [](/docs) [](/redoc) Use the Fur Affinity API badge for your projects! [](https://furaffinity-api.herokuapp.com/badge/svg) _The badge is provided via [Shields.io](https://shields.io/)._
|
|
||||||
*
|
|
||||||
* The version of the OpenAPI document: 1.5.5
|
|
||||||
*
|
|
||||||
* Generated by: https://openapi-generator.tech
|
|
||||||
*/
|
|
||||||
|
|
||||||
use crate::models;
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
/// Watchlist : Users appearing in a user's watchlist
|
|
||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
|
||||||
pub struct Watchlist {
|
|
||||||
/// List of users found in the page
|
|
||||||
#[serde(rename = "results")]
|
|
||||||
pub results: Vec<models::UserPartial>,
|
|
||||||
#[serde(rename = "next", deserialize_with = "Option::deserialize")]
|
|
||||||
pub next: Option<i32>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Watchlist {
|
|
||||||
/// Users appearing in a user's watchlist
|
|
||||||
pub fn new(results: Vec<models::UserPartial>, next: Option<i32>) -> Watchlist {
|
|
||||||
Watchlist {
|
|
||||||
results,
|
|
||||||
next,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue