Giter Site home page Giter Site logo

pushbulletsharp's People

Contributors

adamyeager avatar dependabot[bot] avatar driespeeters avatar frankhommers avatar kekonn avatar mitch528 avatar spewu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pushbulletsharp's Issues

PushList - HTTP400

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.

Add support send to all devices

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!

Add support for waffle maker

I would like this to make a waffle every time it pushes a notification please.

I'll take my answer off the air.

Nothing happen after Push File

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?

.Net Standard?

I was wondering whether you've considered adding .Net Standard support to your project?

the program stop receiving events

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

ArgumentNullException when converting push response

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()

Issue sending unecrypted Ephemeral Notification Request

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
{
///


/// To the json.
///

/// The data.
///
public static string ToJson(this object data)
{
var serializer = new DataContractJsonSerializer(data.GetType());

        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!

Modified date required

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

Support for Channels

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.

https://docs.pushbullet.com/#create-push

Please update the Wiki

It is difficult to extract from the unit tests how to use the ephemerals. Please update the wiki with examples.

email parameter for push request

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 :)

Proxy support

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

Add Happy Birthday Functionality?

╮╭╭╮┏╮┏╮╮╭┊┊┊┊┊┊┊
┣┫┣┫┣╯┣╯╰┫┊┊☆☆┊┊┊
╯╯╯╯╯┊╯┊╰╯╭━┻┻━╮┊
┏╮┊┏╮╭╮╮╭╭┻━━━━┻╮
┣┫★┃┃┣┫╰┫┣╮╭╮╭╮╭┫
┗╯┊┗╯╯╯╰╯┃╰╯╰╯╰╯┃
━━━━━━━━━╯╳╳╳╳╳╳╰

Event Stream

I see a Response model WebSocketResponse exists but not implemented. Any idea when Event Streams will be implemented?

Mono Issue

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

Add support for Buildtarget dotnetcore

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.

SerializationException during PushEphemeral

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.

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.