-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: flatten the module structure
traits and clients are now on the top level. Error and response structs are moved to their dedicated modules. Also, a bunch of doc comments are added so the docs.rs/frankenstein entry has somewhat better docs BREAKING CHANGE: old modules for them are gone and import is only possible from the top level. Responses moved from frankenstein::api_traits::MethodResponse to frankenstein::response::MethodResponse (and are also reexported on top level).
- Loading branch information
Showing
10 changed files
with
79 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
#[doc(hidden)] | ||
#[cfg(feature = "async-http-client")] | ||
#[cfg(feature = "reqwest")] | ||
pub use reqwest; | ||
#[cfg(feature = "ureq")] | ||
pub use ureq; | ||
|
||
#[doc(hidden)] | ||
pub use self::api_params::*; | ||
#[cfg(feature = "async-http-client")] | ||
pub use self::client_reqwest::*; | ||
#[cfg(feature = "http-client")] | ||
pub use ureq; | ||
pub use self::client_ureq::*; | ||
pub use self::error::Error; | ||
pub use self::objects::*; | ||
pub use self::parse_mode::ParseMode; | ||
pub use self::response::*; | ||
#[cfg(feature = "async-telegram-trait")] | ||
pub use self::trait_async::AsyncTelegramApi; | ||
#[cfg(feature = "telegram-trait")] | ||
pub use self::trait_sync::TelegramApi; | ||
|
||
pub mod api; | ||
pub mod api_params; | ||
pub mod api_traits; | ||
#[cfg(feature = "async-http-client")] | ||
mod client_reqwest; | ||
#[cfg(feature = "http-client")] | ||
mod client_ureq; | ||
mod error; | ||
#[cfg(feature = "serde_json")] | ||
mod json; | ||
pub mod objects; | ||
mod parse_mode; | ||
pub mod response; | ||
#[cfg(feature = "async-telegram-trait")] | ||
mod trait_async; | ||
#[cfg(feature = "telegram-trait")] | ||
mod trait_sync; | ||
|
||
pub use api::*; | ||
pub use api_params::*; | ||
pub use api_traits::*; | ||
pub use objects::*; | ||
pub use parse_mode::*; | ||
/// Default Bot API URL | ||
pub const BASE_API_URL: &str = "https://api.telegram.org/bot"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters