Norway


Pushbullet-app-icon send a message with #pushbullet using c# - pushbullet app icon - Send a message with #PushBullet using c#

is an iOS / and based , that is used for automated messaging. It’s pretty easy to use from within C#, here’s an example;

* curl –header ‘Access-Token: <your_access_token_here>’
–header ‘Content-Type: application/json’
-binary ‘{R;body”:”Space Elevator, Mars Hyperloop, Space Model S (Model Space?)”,”title”:”Space Travel Ideas”,”type”:”note”}’
–request POST
https://api.pushbullet.com/v2/pushes
*/

var = new
{
body = “Space Elevator, Mars Hyperloop, Space Model S (Model Space?)”,
title = “Space Travel Ideas”,
type = “note”
};
WebClient wc = new WebClient();
wc.Headers[“Access-Token”] = “o.xxxxxxxxxxxxxx”;
wc.Headers[“Content-Type”] = “application/json”;
var strPayload = JsonConvert.SerializeObject(message);
var strResponse = wc.UploadString(“https://api.pushbullet.com/v2/pushes&#8221;, strPayload);

/*
{
“active”: true,
“iden”: “xxxxxxx”,
“created”: 15656152.566,
“modified”: 1512656152.5928,
“type”: “note”,
“dismissed”: false,
“direction”: “self”,
“sender_iden”: “ujvhvGp18iy”,
“sender_email”: “xxxx@hotmail.com”,
“sender_email_normalized”: “xxxx@hotmail.com”,
“sender_name”: “xxxx xxxx”,
“receiver_iden”: “ujvhvGp18iy”,
“receiver_email”: “xxxx@hotmail.com”,
“receiver_email_normalized”: “xxx@hotmail.com”,
“title”: “Space Travel Ideas”,
“body”: “Space Elevator, Mars Hyperloop, Space Model S (Model Space?)”
}
*/

The above code requires the NUNIT package Install-Package Newtonsoft.Json, and you’ll need an access token from pushbullet under your account > Settings

 

send a message with #pushbullet using c# -  - Send a message with #PushBullet using c# send a message with #pushbullet using c# - b - Send a message with #PushBullet using c#



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here