[Bps-public-commit] app-wsgetmail branch update-install-instructions-documentation updated. 1e75a357ccd849e847ffc55e242d37305ec1ff02

BPS Git Server git at git.bestpractical.com
Wed Apr 20 14:43:17 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "app-wsgetmail".

The branch, update-install-instructions-documentation has been updated
       via  1e75a357ccd849e847ffc55e242d37305ec1ff02 (commit)
       via  9ca12903f58fbb1022770ac1f1a5746b7f3323e1 (commit)
      from  15cdf9cf72af2a606ecf078d2180d4d122bfe096 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e75a357ccd849e847ffc55e242d37305ec1ff02
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed Apr 20 09:42:56 2022 -0500

    Update README.md with pod from wsgetmail.pm

diff --git a/README.md b/README.md
index 844db3a..ceb6d8f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # NAME
 
-wsgetmail - get mail from cloud webservices
+App::wsgetmail - Fetch mail from the cloud using webservices
 
 # SYNOPSIS
 
@@ -22,6 +22,17 @@ where `wsgetmail.json` looks like:
     "action_on_fetched": "mark_as_read"
     }
 
+Using App::wsgetmail as a library looks like:
+
+    my $getmail = App::wsgetmail->new({config => {
+      # The config hashref takes all the same keys and values as the
+      # command line tool configuration JSON.
+    }});
+    while (my $message = $getmail->get_next_message()) {
+        $getmail->process_message($message)
+          or warn "could not process $message->id";
+    }
+
 # DESCRIPTION
 
 wsgetmail retrieves mail from a folder available through a web services API
@@ -39,37 +50,37 @@ on the local system.
 `wsgetmail` will be installed under `/usr/local/bin` if you're using the
 system Perl, or in the same directory as `perl` if you built your own.
 
-# ARGUMENTS
+# ATTRIBUTES
+
+## config
 
-- --config, --configuration, -c
+A hash ref that is passed to construct the `mda` and `client` (see below).
 
-    Path of the primary wsgetmail JSON configuration file to read. This argument
-    is required. The configuration file is documented in the next section.
+## mda
 
-- --options
+An instance of [App::wsgetmail::MDA](https://metacpan.org/pod/App::wsgetmail::MDA) created from our `config` object.
 
-    A string with a JSON object in the same format as the configuration
-    file. Configuration in this object will override the configuration file. You
-    can use this to extend a base configuration. For example, given the
-    configuration in the synopsis above, you can process a second folder the
-    same way by running:
+## client\_class
 
-        wsgetmail --config=wsgetmail.json --options='{"folder": "Other Folder"}'
+The name of the App::wsgetmail package used to construct the
+`client`. Default `MS365`.
 
-- --verbose, --debug, -v
+## client
 
-    Log additional information about each mail API request and any problems
-    delivering mail.
+An instance of the `client_class` created from our `config` object.
 
-- --dry-run
+# METHODS
 
-    Read mail and deliver it to the configured command, but don't run the
-    configured `action_on_fetched` like deleting messages or marking them as
-    read.
+## process\_message($message)
 
-- --help, -h
+Given a Message object, retrieves the full message content, delivers it
+using the `mda`, and then executes the configured post-fetch
+action. Returns a boolean indicating success.
 
-    Show this help documentation.
+## post\_fetch\_action($message)
+
+Given a Message object, executes the configured post-fetch action. Returns a
+boolean indicating success.
 
 # CONFIGURATION
 
@@ -119,9 +130,10 @@ and how to obtain it.
     After that is done, you need to grant wsgetmail permission to access the
     Microsoft Graph mail APIs. Microsoft documents how to do this in the
     ["Configure a client application to access a web API"
-    quickstart](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-permissions-to-access-microsoft-graph),
-    under the section "Add permissions to access Microsoft Graph." When prompted
-    to select permissions, select all of the following:
+    quickstart](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#application-permission-to-microsoft-graph),
+    under the section "Add permissions to access Microsoft Graph." When selecting
+    the type of permissions, select "Application permissions." When prompted to
+    select permissions, select all of the following:
 
     - Mail.Read
     - Mail.Read.Shared
@@ -257,6 +269,13 @@ documented in their [Microsoft Graph throttling guidance](https://docs.microsoft
 If you reach a limit, requests to the API will start failing for a period
 of time.
 
+# SEE ALSO
+
+- [wsgetmail](https://metacpan.org/pod/wsgetmail)
+- [App::wsgetmail::MDA](https://metacpan.org/pod/App::wsgetmail::MDA)
+- [App::wsgetmail::MS365](https://metacpan.org/pod/App::wsgetmail::MS365)
+- [App::wsgetmail::MS365::Message](https://metacpan.org/pod/App::wsgetmail::MS365::Message)
+
 # AUTHOR
 
 Best Practical Solutions, LLC <modules at bestpractical.com>

commit 9ca12903f58fbb1022770ac1f1a5746b7f3323e1
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Wed Apr 20 09:41:43 2022 -0500

    Remove version from pod

diff --git a/lib/App/wsgetmail.pm b/lib/App/wsgetmail.pm
index 7749836..fab5bdc 100644
--- a/lib/App/wsgetmail.pm
+++ b/lib/App/wsgetmail.pm
@@ -58,10 +58,6 @@ our $VERSION = '0.05';
 
 App::wsgetmail - Fetch mail from the cloud using webservices
 
-=head1 VERSION
-
-0.05
-
 =head1 SYNOPSIS
 
 Run:

-----------------------------------------------------------------------

Summary of changes:
 README.md            | 67 +++++++++++++++++++++++++++++++++-------------------
 lib/App/wsgetmail.pm |  4 ----
 2 files changed, 43 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
app-wsgetmail


More information about the Bps-public-commit mailing list