Bonjour à tous.
J'envoie des notifications sur mon portable à partir d'un microcontroleur ESP32 lors d'un évènement matériel.
Je fais cela avec PushBullet, d'après un exemple pompé sur le Net.
Mais, comme j'aime bien savoir ce qui se passe, j'ai tenté de comprendre comment était constitué le message envoyé vers api.pushbullet.com.
Mais je ne pige pas du tout comment fabriquer une syntaxe. Exemple pour envoyer un SMS:
Code texte : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Send text messages (SMS) to one phone number or group messages (MMS) to mulitple phone numbers. Also supports sending picture messages.
Text messages are queued and sent as soon as possible. If the sending device does not come online and sync within 1 hour, the message is canceled and will not send.
Users and developers are advised to ensure Pushbullet is able to reliably run in the background. Follow the "Solutions for Users" section based on your phone manufacturer on this page: https://dontkillmyapp.com/
For more information about this API, read our blog post.
To send a text message, use  create-text
Field	Type	Description
iden	string	Unique identifier for this object
Example: "ujpah72o0sjAoRtnM0jc"
active	bool	false if the item has been deleted
Example: true
created	float	Creation time in floating point seconds (unix timestamp)
Example: 1381092887.398433
modified	float	Last modified time in floating point seconds (unix timestamp)
Example: 1441054560.741007
data	object	Map of values specifying this text message
Example: {"addresses":["+13035551212"],"guid":"993aaa48567d91068e96c75a74644159","message":"Text message body.","status":"queued","target_device_iden":"ujpah72o0sjAoRtnM0jc"}
file_url	string	File download url for an image to send with the text message
Example: "https://dl.pushbulletusercontent.com/foGfub1jtC6yYcOMACk1AbHwTrTKvrDc/john.jpg"
skip_delete_file	bool	If set to false, delete the attached file when the Text is deleted.
Example: true
 create-text
Create a new text. The text will automatically be deleted after an hour whether it has been sent or not.
data - map of values specifying this text message
target_device_iden - The device_iden of the Device to send the message. This device must have SMS Android permissions granted.
addresses - A list of 1 more phone numbers to send this message to. Including than one number sends a group MMS message.
message - The text content of the text message.
guid - Unique identifier optionally set by the client, used to identify a text message to ensure it is not sent multiple times in the case create-text is called for it more than once.
status - The state of this message. One of "queued" / absent, "sent" or "failed".
file_type - The mime type of the file_url being sent with this message. Only required for messages sending a file.
 Call
POST https://api.pushbullet.com/v2/texts
 Request
Field	Type	Description
data	object	Map of values specifying this text message. See here for full specification
Example: {"addresses":["+13035551212"],"file_type":"image/jpeg","guid":"993aaa48567d91068e96c75a74644159","message":"Text message body.","target_device_iden":"ujpah72o0sjAoRtnM0jc"}
file_url	string	File download url for an image to send with the text message. Docs for how to upload files here here.
Example: "https://dl.pushbulletusercontent.com/foGfub1jtC6yYcOMACk1AbHwTrTKvrDc/john.jpg"
skip_delete_file	bool	If set to false, delete the attached file when the Text is deleted.
Example: true
 Response
Field	Type	Description
iden	string	Iden of the created text
Example: "ujpah72o0sjAoRtnM0jc"
Si quelqu'un peut éclairer ma lanterne: comment à partir de ces infos constituer un message valide à envoyer à pushbullet?
Merci