Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
/ Pushe.co Public archive

Send push notification by pushe.co based on .NET Standard

Notifications You must be signed in to change notification settings

hamed-shirbandi/Pushe.co

Repository files navigation

What is this ?

Simple library to send push notification by pushe.co

Article in persian

Install via NuGet

To install Pushe.co, run the following command in the Package Manager Console

pm> Install-Package Pushe.co

You can also view the package page on NuGet.

How to use ?

1- install package from nuget

2- add required services Startup class as below :

               services.AddPushe(options=>
                {
                  options.AccessToken = "YOUR_PUSHE_ACCESS_TOKEN";
                  options.Applications = "APP_Name1,APP_Name2";
                  
                 });

3- send push notification by using IPusheService:

               var pusheService = serviceProvider.GetRequiredService<IPusheService>();

                var push = new PusheJsonModel
                {
                    Notification = new Notification
                    {
                        Title = "test by console app",
                        Content = "this is a test by console app",

                    },
                    Filter = new Filter
                    {
                        //by pushe id
                        Pushe_Id = new string[] { "pid_31b1-33d3-30" },
                    }
                };

                await pusheService.SendAsync(push);

See more example in source.

To Do

-Add MVC example

About

Send push notification by pushe.co based on .NET Standard

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages