adamyeager / PushbulletSharp

This is a simple pushbullet wrapper written in C#.
MIT License
52 stars 61 forks source link

email parameter for push request #9

Closed damianon closed 9 years ago

damianon commented 9 years ago

Hi, According to the pushbullet devs it's possible to add email as parameter to the /pushes/ request. Also possible to combine it with a cursor. Would be nice if you could implement it as well. Not urgent though. Thanks for the great work :)

adamyeager commented 9 years ago

You should be able to push by email already. If you look at the tests project on github there are examples of using the client to do what you're talking about.

https://github.com/adamyeager/PushbulletSharp/blob/2.1.0/PushbulletSharp.Tests/PushTests.cs#L104

Is this what you're talking about?

damianon commented 9 years ago

No, its not. I'm talking about push requests. GetPushes()

adamyeager commented 9 years ago

Oh I see. Yeah I've updated the PushResponseFilter with an email property and updated the GetPushes to work with that. Where did you see that documented? When I go to pushbullet's api site the only optional params are modified_after, active, and cursor. Email definitely works for filtering by senderemail.

damianon commented 9 years ago

I got in contact with one of the Pushbullet devs. This was his message:

It can be done per contact, however. Just submit an https get request with an url encoded email, like this: https://api.pushbullet.com/v2/pushes?email=fakeemail%40gmail.com

This also works with cursors on a per-stream basis, just add &cursor= to the end of the previous query. Am 31.08.2015 10:01 vorm. schrieb "Adam Yeager" notifications@github.com:

Oh I see. Yeah I've updated the PushResponseFilter with an email property and updated the GetPushes to work with that. Where did you see that documented? When I go to pushbullet's api site the only optional params are modified_after, active, and cursor. Email definitely works for filtering by senderemail.

— Reply to this email directly or view it on GitHub https://github.com/adamyeager/PushbulletSharp/issues/9#issuecomment-136226333 .

adamyeager commented 9 years ago

I've updated it on nuget and on github. Download the newest version and let me know if you have any issues.