Giter Site home page Giter Site logo

Comments (4)

adamyeager avatar adamyeager commented on August 16, 2024

Good catch. Let me look into this and see what I can do.

from pushbulletsharp.

adamyeager avatar adamyeager commented on August 16, 2024

Sorry for the delay. It's been a while since I worked on this project and I had to bring myself back up to speed.

This feature is already supported if you provide an email address. Pushbullet's API will send the notification to all devices on the account that are active.

If you call the CurrentUsersInformation() method on the PushbulletSharp client, you'll get a response that has a string property called email which can be passed into the request. I wrote a C# unit test to demonstrate how you can do this with the PushbulletSharp client:

[TestMethod]
public void PushbulletPushNoteByEmailTest()
{
    try
    {
        var currentUserInformation = Client.CurrentUsersInformation();
        Assert.IsNotNull(currentUserInformation);

        PushNoteRequest reqeust = new PushNoteRequest()
        {
            email = currentUserInformation.email,
            title = "hello world",
            body = "This is a test from my C# wrapper."
        };

        var response = Client.PushNote(reqeust);
    }
    catch (Exception ex)
    {
        Assert.Fail(ex.Message);
    }
}

Does this make sense?

from pushbulletsharp.

adamyeager avatar adamyeager commented on August 16, 2024

I've also updated the Wiki on this site with this example.

https://github.com/adamyeager/PushbulletSharp/wiki/Push-Examples

from pushbulletsharp.

KoalaBear84 avatar KoalaBear84 commented on August 16, 2024

No problem! It does make sense and it's a good workaround :P

It would be nice if it possible without the extra call, but it is indeed possible :)

from pushbulletsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.