@@ -307,6 +307,41 @@ pub mod ledgers;
307
307
///
308
308
pub mod effects;
309
309
310
+ /// Provides `Request` and `Response` structs for retrieving operations.
311
+ ///
312
+ /// The `operations` module in the Stellar Horizon SDK includes structures and methods that facilitate
313
+ /// querying operation data from the Horizon server.
314
+ ///
315
+ /// # Usage
316
+ ///
317
+ /// This module is used to construct requests for operation-related data and to parse the responses
318
+ /// received from the Horizon server. It includes request and response structures for both
319
+ /// individual operation queries and queries for a collection of operations.
320
+ ///
321
+ /// # Example
322
+ ///
323
+ /// To use this module, you can create an instance of a request struct, such as `SingleOperationRequest`
324
+ /// or `AllOperationsRequest`, set any desired query parameters, and pass the request to the
325
+ /// `HorizonClient`. The client will then execute the request and return the corresponding
326
+ /// response struct, like `SingleOperationResponse` or `AllOperationsResponse`.
327
+ ///
328
+ /// ```rust
329
+ /// use stellar_rs::horizon_client::HorizonClient;
330
+ /// use stellar_rs::operations::prelude::*;
331
+ /// use stellar_rs::models::Request;
332
+ ///
333
+ /// # async fn example() -> Result<(), Box<dyn std::error::Error>> {
334
+ /// let horizon_client = HorizonClient::new("https://horizon-testnet.stellar.org".to_string())?;
335
+ ///
336
+ /// // Example: Fetching all operations
337
+ /// let all_operations_request = AllOperationsRequest::new().set_limit(10)?;
338
+ /// let operations_response = horizon_client.get_all_operations(&all_operations_request).await?;
339
+ ///
340
+ /// // Process the responses...
341
+ /// # Ok(())
342
+ /// # }
343
+ /// ```
344
+ ///
310
345
pub mod operations;
311
346
312
347
/// Provides `Request` and `Response` structs for retrieving fee stats.
@@ -345,8 +380,6 @@ pub mod operations;
345
380
///
346
381
pub mod fee_stats;
347
382
348
- pub mod operations;
349
-
350
383
/// Contains core data structures and traits.
351
384
///
352
385
/// This module is used by the Stellar Rust SDK to interact with the Horizon API.
0 commit comments