From d54889ab596f5fd6f4ee4cb818220291a7cee037 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:35:16 +0200 Subject: [PATCH 1/5] Enhancement: Rename examples folder --- README.md | 16 ++++++++-------- .../CompleteNotificationExample.php | 0 .../EmergencyNotificationExample.php | 0 {Example => examples}/GlancesExample.php | 0 {Example => examples}/GroupsExample.php | 0 .../HtmlNotificationExample.php | 0 {Example => examples}/LicensingExample.php | 0 {Example => examples}/ReceiptExample.php | 0 {Example => examples}/ResponseExample.php | 0 .../SimpleNotificationExample.php | 0 {Example => examples}/SubscriptionExample.php | 0 .../UserGroupValidationExample.php | 0 12 files changed, 8 insertions(+), 8 deletions(-) rename {Example => examples}/CompleteNotificationExample.php (100%) rename {Example => examples}/EmergencyNotificationExample.php (100%) rename {Example => examples}/GlancesExample.php (100%) rename {Example => examples}/GroupsExample.php (100%) rename {Example => examples}/HtmlNotificationExample.php (100%) rename {Example => examples}/LicensingExample.php (100%) rename {Example => examples}/ReceiptExample.php (100%) rename {Example => examples}/ResponseExample.php (100%) rename {Example => examples}/SimpleNotificationExample.php (100%) rename {Example => examples}/SubscriptionExample.php (100%) rename {Example => examples}/UserGroupValidationExample.php (100%) diff --git a/README.md b/README.md index 4aac34f..36b1eeb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Light, simple and fast, yet comprehensive wrapper for the [Pushover](https://pushover.net/) API. ### Features -- Message API ([Example](Example/CompleteNotificationExample.php)) +- Message API ([Example](examples/CompleteNotificationExample.php)) - Image attachment - User's device name(s) - Message's title @@ -18,29 +18,29 @@ Light, simple and fast, yet comprehensive wrapper for the [Pushover](https://pus - Notification sound (including custom sound) - Message time - Time to live -- User/Group Validation API ([Example](Example/UserGroupValidationExample.php)) +- User/Group Validation API ([Example](examples/UserGroupValidationExample.php)) - Validation by user or group key - Validation by user and device -- Receipt API ([Example](Example/ReceiptExample.php)) +- Receipt API ([Example](examples/ReceiptExample.php)) - Query emergency priority receipt - Cancel emergency priority retry -- Groups API ([Example](Example/GroupsExample.php)) +- Groups API ([Example](examples/GroupsExample.php)) - Create a group - List groups - Retrieve information about the group - Add / Remove users - Enable / Disable users - Rename the group -- Glances API ([Example](Example/GlancesExample.php)) +- Glances API ([Example](examples/GlancesExample.php)) - Title - Text - Subtext - Count - Percent -- Licensing API ([Example](Example/LicensingExample.php)) +- Licensing API ([Example](examples/LicensingExample.php)) - Check remaining credits - Assign license (not tested) -- Subscription API ([Example](Example/SubscriptionExample.php)) +- Subscription API ([Example](examples/SubscriptionExample.php)) - User Key Migration ## Getting Started @@ -109,7 +109,7 @@ $response = $notification->push(); ## Working with response -*Note: For complete example refer to [ResponseExample.php](Example/ResponseExample.php)* +*Note: For complete example refer to [ResponseExample.php](examples/ResponseExample.php)* Client returns Response object. Checking if the message was accepted is easy: diff --git a/Example/CompleteNotificationExample.php b/examples/CompleteNotificationExample.php similarity index 100% rename from Example/CompleteNotificationExample.php rename to examples/CompleteNotificationExample.php diff --git a/Example/EmergencyNotificationExample.php b/examples/EmergencyNotificationExample.php similarity index 100% rename from Example/EmergencyNotificationExample.php rename to examples/EmergencyNotificationExample.php diff --git a/Example/GlancesExample.php b/examples/GlancesExample.php similarity index 100% rename from Example/GlancesExample.php rename to examples/GlancesExample.php diff --git a/Example/GroupsExample.php b/examples/GroupsExample.php similarity index 100% rename from Example/GroupsExample.php rename to examples/GroupsExample.php diff --git a/Example/HtmlNotificationExample.php b/examples/HtmlNotificationExample.php similarity index 100% rename from Example/HtmlNotificationExample.php rename to examples/HtmlNotificationExample.php diff --git a/Example/LicensingExample.php b/examples/LicensingExample.php similarity index 100% rename from Example/LicensingExample.php rename to examples/LicensingExample.php diff --git a/Example/ReceiptExample.php b/examples/ReceiptExample.php similarity index 100% rename from Example/ReceiptExample.php rename to examples/ReceiptExample.php diff --git a/Example/ResponseExample.php b/examples/ResponseExample.php similarity index 100% rename from Example/ResponseExample.php rename to examples/ResponseExample.php diff --git a/Example/SimpleNotificationExample.php b/examples/SimpleNotificationExample.php similarity index 100% rename from Example/SimpleNotificationExample.php rename to examples/SimpleNotificationExample.php diff --git a/Example/SubscriptionExample.php b/examples/SubscriptionExample.php similarity index 100% rename from Example/SubscriptionExample.php rename to examples/SubscriptionExample.php diff --git a/Example/UserGroupValidationExample.php b/examples/UserGroupValidationExample.php similarity index 100% rename from Example/UserGroupValidationExample.php rename to examples/UserGroupValidationExample.php From 4c018b3dbd9c7be04808323b093b7246b05dbadf Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:42:29 +0200 Subject: [PATCH 2/5] - --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 36b1eeb..e675b0c 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ plus its curl and json extensions. See below the `require` section of project's ## Pushing Messages -*Note: For more code examples, see [Example](Example) folder in the root of the project. You may also generate and see code documentation.* +*Note: For more code examples, see [Example](examples) folder in the root of the project. You may also generate and see code documentation.* Instantiate pushover application and recipient of the notification: From ef9966b7cc665f5689332a53e03cd9ba779c293e Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:44:17 +0200 Subject: [PATCH 3/5] - --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e675b0c..5a3a07e 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,8 @@ Instantiate pushover application and recipient of the notification: use Serhiy\Pushover\Application; use Serhiy\Pushover\Recipient; -$application = new Application("replace_with_pushover_application_api_token"); -$recipient = new Recipient("replace_with_pushover_user_key"); +$application = new Application('replace_with_pushover_application_api_token'); +$recipient = new Recipient('replace_with_pushover_user_key'); ``` Or use Dependency Injection to inject them into the services of your app. @@ -89,7 +89,7 @@ Compose a message: ```php use Serhiy\Pushover\Api\Message\Message; -$message = new Message("This is a test message", "This is a title of the message"); +$message = new Message('This is a test message', 'This is a title of the message'); ``` Create notification: From 9000296a1329e7422984dff095ea63b5497cd479 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:44:45 +0200 Subject: [PATCH 4/5] Update README.md Co-authored-by: Serhiy Lunak <8351121+slunak@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a3a07e..4afcee9 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ plus its curl and json extensions. See below the `require` section of project's ## Pushing Messages -*Note: For more code examples, see [Example](examples) folder in the root of the project. You may also generate and see code documentation.* +*Note: For more code examples, see [examples](examples) folder in the root of the project. You may also generate and see code documentation.* Instantiate pushover application and recipient of the notification: From 80eccf901191362d23efea55c8747532eb0d847b Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Wed, 28 Aug 2024 20:48:33 +0200 Subject: [PATCH 5/5] - --- .php-cs-fixer.dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 49d1c07..15c9579 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -93,7 +93,7 @@ ->append([ __DIR__.'/.php-cs-fixer.dist.php', ]) - ->in('Example') + ->in('examples') ->in('src') ->in('tests');