diff --git a/Cargo.lock b/Cargo.lock index bb0da8d..063aa42 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -756,12 +756,12 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libft-api" -version = "0.1.0" +version = "0.2.0" dependencies = [ "chrono", "futures", "lazy_static", - "libft-api-derive", + "libft-api-derive 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest", "rsb_derive", "rvstruct", @@ -777,7 +777,18 @@ dependencies = [ [[package]] name = "libft-api-derive" -version = "0.1.0" +version = "0.2.0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "libft-api-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02a70586a40382d1a45bb85677436875bcd2d091db138b2042ed51557c337171" dependencies = [ "proc-macro2", "quote", diff --git a/LICENSE b/LICENSE index 97ecfbf..89c964f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,4 @@ -MIT License - -Copyright (c) 2025 hdoo42 +Copyright 2025 yondoo (Gyeongsan Innovation Academy) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/libft-api-derive/Cargo.toml b/libft-api-derive/Cargo.toml index e5c7cac..2c831ca 100644 --- a/libft-api-derive/Cargo.toml +++ b/libft-api-derive/Cargo.toml @@ -1,7 +1,16 @@ [package] name = "libft-api-derive" -version = "0.1.0" +version = "0.2.0" edition = "2021" +description = "Procedural macros for the `libft-api` crate." +license-file = "LICENSE" +keywords = ["42", "http"] +categories = ["development-tools::procedural-macro-helpers"] +repository = "https://github.com/hdoo42/libft-api" + +[badges] +maintenance = { status = "actively-developed" } + [lib] proc-macro = true diff --git a/libft-api-derive/LICENSE b/libft-api-derive/LICENSE new file mode 100644 index 0000000..89c964f --- /dev/null +++ b/libft-api-derive/LICENSE @@ -0,0 +1,19 @@ +Copyright 2025 yondoo (Gyeongsan Innovation Academy) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libft-api/Cargo.toml b/libft-api/Cargo.toml index b89081f..6bbe0cf 100644 --- a/libft-api/Cargo.toml +++ b/libft-api/Cargo.toml @@ -1,11 +1,13 @@ [package] name = "libft-api" -version = "0.1.0" +version = "0.2.0" edition = "2021" -authors = ["hdoo42 "] -description="42api library for rust" -readme="READEME.md" +description="A Rust library for interacting with the 42 API." +readme="README.md" +license-file = "LICENSE" exclude = ["src/main.rs"] +repository = "https://github.com/hdoo42/libft-api" +categories = ["api-bindings"] [lib] path="src/lib.rs" @@ -36,4 +38,4 @@ futures = { version = "0.3.31", features = ["alloc"] } lazy_static = "1.5.0" tracing = "0.1.41" tracing-subscriber = "0.3.20" -libft-api-derive = {path = "../libft-api-derive"} +libft-api-derive = "0.2.0" diff --git a/libft-api/LICENSE b/libft-api/LICENSE new file mode 100644 index 0000000..89c964f --- /dev/null +++ b/libft-api/LICENSE @@ -0,0 +1,19 @@ +Copyright 2025 yondoo (Gyeongsan Innovation Academy) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/libft-api/README.md b/libft-api/README.md index be7faf3..79f45a7 100644 --- a/libft-api/README.md +++ b/libft-api/README.md @@ -39,7 +39,7 @@ tokio = { version = "1.0", features = ["full"] } Create a token -> Create a client -> Create a session -> Send API requests! ```rust -use libft_api::prelude::*; +use libft_api::prelude::{*, ft_campus_id::GYEONGSAN}; #[tokio::main] async fn main() -> Result<(), Box> { @@ -61,7 +61,7 @@ async fn main() -> Result<(), Box> { .await?; for location in response.location { - println!("{} @ {}", location.user.login, location.host); + println!("{:?} @ {}", location.user.login, location.host); } Ok(())