Commit Graph
59 Commits
Author SHA1 Message Date
Jeremiah Russell 0a528b4196 ✨ feat(message_list): add message_ids to MessageList struct
- add message_ids field to store message IDs
- update run method to populate message_ids
- create messages_list method for API calls
- create log_message_subjects method to log message subjects
2025-10-06 07:14:46 +01:00
Jeremiah Russell 9247839ccc ♻️ refactor(message): rename Message to MessageList
- rename Message struct to MessageList for clarity
- reflect the change in the instantiation
2025-10-05 09:49:56 +01:00
Jeremiah Russell 0b52987a7d ♻️ refactor(core): rename message module to message_list
- rename message module to message_list to better reflect its functionality
2025-10-05 09:49:56 +01:00
Jeremiah Russell 188a311175 ♻️ refactor(message): rename message to message_list
- rename `message.rs` to `message_list.rs` to improve clarity
- update struct name from `Message` to `MessageList`
2025-10-05 09:49:56 +01:00
Jeremiah Russell 7e779a218d ♻️ refactor(labels): remove unused code
- Remove commented-out code block for displaying labels.
2025-10-04 09:57:20 +01:00
Jeremiah Russell 7cd4b8987b ♻️ refactor(labels): improve label listing and mapping
- refactor label listing to use `else` for option handling
- enhance label listing with id display and conditional logging
- create label map for efficient label id lookup
2025-10-04 09:57:20 +01:00
Jeremiah Russell cbe61ab2f3 ♻️ refactor(message): improve subject logging with early returns
- use early returns and `else` blocks for better readability and reduced nesting
- add a log message to indicate emails with no subject
2025-10-04 09:10:35 +01:00
Jeremiah Russell 57ddb8da90 ♻️ refactor(cli): rename list subcommand to message
- rename list_cli module to message_cli
- rename ListCli struct to MessageCli
- update the command name from list to message
2025-10-04 07:09:58 +01:00
Jeremiah Russell 3c94da389f ♻️ refactor(cli): rename list_cli to message_cli
- rename `ListCli` struct to `MessageCli`
- rename `List` struct to `Message`
- reflect changes in file names and imports
2025-10-04 07:09:58 +01:00
Jeremiah Russell 24318768c8 ✨ feat(message): implement message listing functionality
- create `Message` struct to encapsulate Gmail API interaction
- add methods for setting max results, labels, and query parameters
- implement `run` method to retrieve and log message subjects
- use `google_gmail1` crate for Gmail API interaction
- add error handling for API calls
2025-10-04 07:09:58 +01:00
Jeremiah Russell 227d7b2111 🔥 refactor(core): remove list module
- Remove the `list.rs` file and its associated functionality
- This change is part of a larger refactoring effort to streamline the core functionality.
2025-10-04 07:09:58 +01:00
Jeremiah Russell 1eff43dad0 ♻️ refactor(core): rename list module to message
- rename list module to message for better clarity
- update associated exports and references
2025-10-04 07:09:58 +01:00
Jeremiah Russell 0fa5a21434 ✨ feat(cli): add label listing subcommand
- implement new `label` subcommand to list available Gmail labels
- create `label_cli` module to handle label listing logic
- integrate label listing into the main CLI application
2025-10-03 17:42:00 +01:00
Jeremiah Russell 3f50a74756 🐛 fix(list): fix label creation logic
- prevent panic when creating labels
2025-10-03 17:42:00 +01:00
Jeremiah Russell bdf6f56f50 ✨ feat(labels): add show option to display labels
- add option to show labels when creating a new label
- only display labels if show is true
2025-10-03 17:42:00 +01:00
Jeremiah Russell 8518242302 ✨ feat(cli): add label command-line interface
- implement `LabelCli` struct with `run` method for fetching Gmail labels
- integrate `clap` for command-line argument parsing
2025-10-03 17:42:00 +01:00
Jeremiah Russell 9c9744e911 ✨ feat(cli): add query option to list command
- implement query option to filter messages by a search query
2025-10-03 17:17:43 +01:00
Jeremiah Russell 5533bff054 ✨ feat(list): add query support to list messages
- allow users to filter messages using a query string
  - implement set_query method to set the query
  - add query parameter to the Gmail API call
2025-10-03 17:17:43 +01:00
Jeremiah Russell b450db0bfa ♻️ refactor(labels): simplify labels struct initialization
- remove get_labels method and integrate its logic into new
- remove log_label_names method and move logging to new
- initialize label_list and label_map directly in new
2025-10-03 16:42:47 +01:00
Jeremiah Russell cef9831dd7 ♻️ refactor(labels): simplify and optimize label retrieval
- rename function name `add_label` to `add_labels`
- add the function of adding multiple labels at once
- optimize code for streamlined operation
2025-10-03 16:42:47 +01:00
Jeremiah Russell 58de6397ce ✨ feat(list): add label filtering to list command
- allow users to filter tasks by label when listing tasks
- refactor label handling to support multiple labels
2025-10-03 16:42:47 +01:00
Jeremiah Russell f425c16422 ✨ feat(list): add label filtering to list command
- allow filtering messages by labels
- add labels argument to list subcommand
- update list command to use labels argument
2025-10-03 14:40:05 +01:00
Jeremiah Russell f1ae06bf74 ✨ feat(list): add label filtering capability
- allow users to filter messages by label
- implement add_label method to add label IDs to the filter
- integrate label filtering into the messages_list call
2025-10-03 14:40:05 +01:00
Jeremiah Russell 2af35e7588 ✨ feat(core): add Labels struct
- introduce `Labels` struct for managing labels
- implement methods for adding, removing, and retrieving labels
2025-10-03 14:40:05 +01:00
Jeremiah Russell af1c95e5c3 ✨ feat(labels): create labels module to manage Gmail labels
- Implemented `Labels` struct for managing Gmail labels.
- Added functions to retrieve and map labels.
- Added logging for label names.
2025-10-03 14:40:05 +01:00
Jeremiah Russell c58d8ca339 ✨ feat(list): add pagination to list command
- add pages option to limit the number of pages to retrieve
- set default pages to 1
- modify list.run to accept the pages parameter
2025-10-03 11:03:17 +01:00
Jeremiah Russell 0799086010 ✨ feat(list): add pagination support for listing messages
- add support for listing messages across multiple pages
- introduce `pages` argument to control the number of pages to retrieve
- implement `get_messages` to fetch a page of messages using `next_page_token`
- create `log_message_subjects` to log the subject of each message on a page
- log the estimated number of messages found
2025-10-03 11:03:17 +01:00
Jeremiah Russell c5f3ce4c47 📝 docs(logging): add future improvement note
- add a to-do comment to improve the logging filter functionality
2025-10-03 11:03:17 +01:00
Jeremiah Russell 465a590a09 ✨ feat(error): add error type for invalid paging mode
- add `InvalidPagingMode` error to handle invalid paging options
2025-10-03 11:03:17 +01:00
Jeremiah Russell cffa44d4d4 🐛 fix(main): exit process with error code on failure
- exit the process with a non-zero error code when the `run` function returns an error
- this ensures that the program signals failure to the operating system
- only log messages from `cull_gmail`
2025-10-02 16:46:51 +01:00
Jeremiah Russell 9ac9e9ff00 ✨ feat(list): add max results option to list command
- allow users to specify the maximum number of results to return
- add `max_results` argument to the `ListCli` struct
- set the max results on the `List` struct
2025-10-02 16:46:51 +01:00
Jeremiah Russell e27f44c982 ✨ feat(list): export DEFAULT_MAX_RESULTS constant
- expose DEFAULT_MAX_RESULTS for external configuration
2025-10-02 16:46:51 +01:00
Jeremiah Russell b4a782409f ♻️ refactor(list): improve max results handling
- change DEFAULT_MAX_RESULTS to const &str for flexibility
- add setter and getter for max_results field
2025-10-02 16:46:51 +01:00
Jeremiah Russell 24c928f282 ♻️ refactor(gmail): remove unused client file
- remove client.rs due to project restructuring
- no longer needed after integrating gmail functionality elsewhere
2025-10-02 16:10:26 +01:00
Jeremiah Russell 4127de086e ♻️ refactor(lib): restructure module exports and visibility
- remove client module public exports
- make utils module private
2025-10-02 16:10:26 +01:00
Jeremiah Russell 2e6cdf5a82 🐛 fix(list): remove debug print statement
- remove unnecessary print statement from list module
2025-10-02 15:47:26 +01:00
Jeremiah Russell 5d9bee1197 ✨ feat(error): enhance error handling for configuration issues
- add specific error variants for unset directory, home expansion failure, and directory creation failure
- improve error reporting by providing more context in error messages
2025-10-02 15:33:00 +01:00
Jeremiah Russell 2a62c6c1ba ♻️ refactor(list): improve error handling and config loading
- replace google_clis_common with crate::utils for config directory handling
- use map_err to propagate errors from API calls
2025-10-02 15:33:00 +01:00
Jeremiah Russell 475917b27d ✨ feat(core): add utils module
- introduce a new utils module for housing utility functions
- improve code organization and reusability
2025-10-02 15:33:00 +01:00
Jeremiah Russell f53ffe7d8a ✨ feat(utils): create assure_config_dir_exists function
- add utility function to create config directory if it doesn't exist
- handle home directory expansion and error conditions
2025-10-02 15:33:00 +01:00
Jeremiah Russell af929a7acb ✨ feat(gmail): implement list functionality for Gmail API
- Add list functionality to retrieve and display email subjects from Gmail.
- Integrate with google_gmail1 crate for Gmail API interactions.
- Implement authentication using InstalledFlowAuthenticator.
- Retrieve and display email subjects using the Gmail API.
- Configure max results to limit displayed subjects.
2025-10-02 15:33:00 +01:00
Jeremiah Russell 44c9220eb1 ♻️ refactor(list): refactor list command to accept credential file
- update list command to accept credential file path
- create gmail hub in list command
2025-10-02 15:33:00 +01:00
Jeremiah Russell dc1a52e39b ✨ feat(lib): add error module and export it
- introduce a new error module for standardized error handling
- export the Error type for external use
2025-10-02 15:33:00 +01:00
Jeremiah Russell cd149b0d53 ✨ feat(error): introduce custom error enum for cull-gmail
- define `Error` enum to encapsulate errors from google_gmail1 and google_clis_common
- use `thiserror` crate for simplified error handling
2025-10-02 15:33:00 +01:00
Jeremiah Russell 7640485297 🐛 fix(credential): fix the config directory
- fix the config directory to `.cull-gmail` instead of `.config`
2025-10-02 15:33:00 +01:00
Jeremiah Russell c30ee21411 ♻️ refactor(main): improve error handling and logging
- replace panics with proper error handling using `Result`
- enhance logging with error source information and initial log message
- adjust default log level to Info
2025-10-02 15:33:00 +01:00
Jeremiah Russell 5178cb6747 ✨ feat(list): implement list api to retrieve gmail messages
- add list struct to encapsulate gmail api connection
- implement run function to execute the api call and handle potential errors
2025-10-01 14:55:57 +01:00
Jeremiah Russell 3426d3e60b ✨ feat(list): integrate List struct for message listing
- integrate List struct for message listing
- move message listing logic to List struct
2025-10-01 14:55:57 +01:00
Jeremiah Russell 6f9801d5e7 ✨ feat(list): export List struct in lib.rs
- expose List struct for external use
2025-10-01 14:55:57 +01:00
Jeremiah Russell 420ca81f51 ✨ feat(cli): add list subcommand
- Implement list subcommand to display Gmail messages
- Use google_gmail1 crate to interact with Gmail API
2025-10-01 14:18:35 +01:00