adamyeager / pushbulletsharp Goto Github PK
View Code? Open in Web Editor NEWThis is a simple pushbullet wrapper written in C#.
License: MIT License
This is a simple pushbullet wrapper written in C#.
License: MIT License
At first - thanks for the nice library. Unfortunately the PushList-example doesn't work any longer. It gets an HTTP400 error, asking for missing parameters.
In a Javascript implementation I always leave device etc empty because I just want to push it to everything. This is not possible. First I though ignoreEmptyFields was for this, but same error.
"The email property for the request is empty. This is only a problem because the device iden was empty, too."
Now I've tried with this (also tried ; as a seperator):
string deviceIdens = PushbulletClient.CurrentUsersDevices().Devices.Select(dev => dev.iden).Aggregate((current, next) => current + "," + next);
But then I get:
An exception of type 'System.ArgumentException' occurred in PushbulletSharp.dll but was not handled in user code
Additional information: Invalid JSON primitive: The.
And create multiple pushing is not really an option, it would clutter, they won't be completely synced for all devices. So you have to dismiss it seperately on all devices. Also it would open every push in Chrome when pushing to a Chrome 'device'.
See the following, search for 'multiple'.
https://github.com/ivkos/PushBullet-for-PHP
Thanks in advance!
Good day,
I am trying to use PushbulletSharp for VB.Net
Following line gives me an error although I did import PushbulletSharp into my VB Project.
Dim devices = Client.CurrentUsersActiveDevices()
Error: CurrentUsersActiveDevices is no member of PushbulletClient
Hi,
is possibile send SMS using the API https://api.pushbullet.com/v2/ephemerals?
I would like this to make a waffle every time it pushes a notification please.
I'll take my answer off the air.
When preview the URL in browser, HTTP error 403 is displayed.
Everything looks OK when stepping through.
The code I written on VB:
Private Sub PushFile()
Dim Client As New PushbulletClient(ApiKey)
Dim request As New PushFileRequest() With { _
.device_iden = "xxxxxxxxxxx", _
.file_type = "image/png", _
.file_name = "image.png", _
.file_path = Application.StartupPath & "" & "image.png"
}
Dim response = Client.PushFile(request)
MsgBox("pushed")
End Sub
Am I misssing anything?
I was wondering whether you've considered adding .Net Standard support to your project?
Hey,
Your library does not work with applications thad have set Strong Name.
To solve this problem you must compile libra library as follow
https://docs.microsoft.com/en-us/dotnet/framework/app-domains/how-to-sign-an-assembly-with-a-strong-name
Bullet no longer supports contact but changed to chat. Are there any plans to update this to support the new features?
after ~20 minutes .. an hour (the time is not constant) the application stop receiving events
looking at the "https://www.pushbullet.com/#following" I can see the events (the text used )
the same is happening on the example you publish
the only difference is i add to use
" ws.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;"
in here
using (var ws = new WebSocket(string.Concat("wss://stream.pushbullet.com/websocket/", key)))
{ ws.SslConfiguration.EnabledSslProtocolsSystem.Security.Authentication.SslProtocols.Tls12;
ws.OnMessage += (sender, e) =>
{
or i get an SSL error
I upgraded to 2.2.0 but I am getting an error when I try to use the new ChannelTag.
Sample code:
var accessKey = "abcd";
var client = new PushbulletClient(accessKey);
var request = new PushNoteRequest
{
Title = "test post",
Body = "no body",
ChannelTag = "my-channel"
};
client.PushNote(request);
Error message (this happens after the push is successfully posted to the channel):
ArgumentNullException4
Value cannot be null.Parameter name: value
at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
at PushbulletSharp.PushbulletSharpExtensions.UnixTimeToDateTime(String unixTime) in D:\_workarea\PushbulletSharp\PushbulletSharp\Extensions\PushbulletSharpExtensions.cs:line 53
at PushbulletSharp.PushbulletClient.ConvertBasicPushResponse(BasicPushResponse basicResponse) in D:\_workarea\PushbulletSharp\PushbulletSharp\PushbulletClient.cs:line 1085
at PushbulletSharp.PushbulletClient.PushNote(PushNoteRequest request, Boolean ignoreEmptyFields) in D:\_workarea\PushbulletSharp\PushbulletSharp\PushbulletClient.cs:line 515
at UserQuery
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Hi, Adam, and thank you for the excellent wrapper!
I wanted to share what I think is a bug in the new Ephemeral Push code. The below statement works great:
Dim Result As String = client.PushEphemeral(NotificationRequest, True)
However, this:
Dim Result As String = client.PushEphemeral(NotificationRequest, False)
results in the following error:
Type 'PushbulletSharp.Models.Requests.Ephemerals.NotificationEphemeral' with data contract name 'NotificationEphemeral:http://schemas.datacontract.org/2004/07/PushbulletSharp.Models.Requests.Ephemerals' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.
And I believe it's happening here:
public static class PushbulletSharpExtensions
{
///
using (MemoryStream stream = new MemoryStream())
{
serializer.WriteObject(stream, data); // **** OFFENDING CODE ******
return Encoding.UTF8.GetString(stream.ToArray(), 0, (int)stream.Length);
}
}
Hopefully that's useful information. If you'd like any more info, just let me know, and thanks for all of your work!
Why is the modified_date a required parameter? Pushbullet API specifies it as optional.
Which posts are returned when the parameter is not specified? The most recent ones? Because that would be more useful than specifying a modified_date
Pushbullet has added support for "channels", a way for people to subscribe to a category of pushes. It would be nice, at the very least, to be able to include a channel tag in a push so that others listening to the channel will see the updates.
It is difficult to extract from the unit tests how to use the ephemerals. Please update the wiki with examples.
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 :)
Hi!
First of all, thank for this super project, very useful! :)
My only problem is that I can not use behind a corporate proxy.
Is there any chance, that you could add ntlm proxy support?
Best regards,
József
╮╭╭╮┏╮┏╮╮╭┊┊┊┊┊┊┊
┣┫┣┫┣╯┣╯╰┫┊┊☆☆┊┊┊
╯╯╯╯╯┊╯┊╰╯╭━┻┻━╮┊
┏╮┊┏╮╭╮╮╭╭┻━━━━┻╮
┣┫★┃┃┣┫╰┫┣╮╭╮╭╮╭┫
┗╯┊┗╯╯╯╰╯┃╰╯╰╯╰╯┃
━━━━━━━━━╯╳╳╳╳╳╳╰
I see a Response model WebSocketResponse exists but not implemented. Any idea when Event Streams will be implemented?
The client currently does not support OAuth. The documentation for implementing it can be found at: https://docs.pushbullet.com/oauth2/
The client currently does not support subscribing to the real time event stream. Documentation for implementing it can be found at: https://docs.pushbullet.com/stream/
When I try to get the client info using your library under mono I get the following error.
Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
System.ArgumentException: Kind property of dateTime is Utc but the sourceTimeZone does not equal TimeZoneInfo.Utc
at System.TimeZoneInfo.ConvertTime (DateTime dateTime, System.TimeZoneInfo sourceTimeZone, System.TimeZoneInfo destinationTimeZone) [0x00000] in :0
at System.TimeZoneInfo.ConvertTime (DateTime dateTime, System.TimeZoneInfo destinationTimeZone) [0x00000] in :0
at PushbulletSharp.PushbulletClient.ConvertFromBasicSubscription (PushbulletSharp.Models.Responses.BasicSubscription basicSubscription) [0x00000] in :0
at PushbulletSharp.PushbulletClient.CurrentUsersSubscriptions (Boolean showActiveOnly) [0x00000] in :0
error: Package PushBulletSharp 3.0.1 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package PushBulletSharp 3.0.1 supports: portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
error: One or more packages are incompatible with .NETCoreApp,Version=v1.0.
Greetings,
I'm getting a SerializationException while trying to use PushEphemeral.
Using the code in the test project,
v3.1.0
Type 'PushbulletSharp.Models.Requests.Ephemerals.NotificationEphemeral' with data contract name 'NotificationEphemeral:http://schemas.datacontract.org/2004/07/PushbulletSharp.Models.Requests.Ephemerals' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.Serialization.SerializationException: Type 'PushbulletSharp.Models.Requests.Ephemerals.NotificationEphemeral' with data contract name 'NotificationEphemeral:http://schemas.datacontract.org/2004/07/PushbulletSharp.Models.Requests.Ephemerals' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.