public void PushNote(string title, string body, PushTargetType target = PushTargetType.Device, string targetArgument = null) { dynamic data = new ExpandoObject(); data.type = "note"; data.title = title; data.body = body; this.Push(data, target, targetArgument); }
public void PushLink(string title, string body, string url, PushTargetType target = PushTargetType.Device, string targetArgument = null) { dynamic data = new ExpandoObject(); data.type = "link"; data.title = title; data.body = body; data.url = url; this.Push(data, target, targetArgument); }
private void Push(dynamic data, PushTargetType target, string targetArgument = null) { switch (target) { case PushTargetType.Channel: data.channel_tag = targetArgument; break; case PushTargetType.Client: data.client_iden = targetArgument; break; case PushTargetType.Device: data.device_iden = targetArgument; break; case PushTargetType.Email: data.email = targetArgument; break; } this.DoRequest("/pushes", data); }
private void PushFile(string file_name, string file_type, string file_url, string body, PushTargetType target = PushTargetType.Device, string targetArgument = null) { dynamic data = new ExpandoObject(); data.type = "file"; data.file_name = file_name; data.file_type = file_type; data.file_url = file_url; data.body = body; this.Push(data, target, targetArgument); }
public void PushFile(string fileUri, string body, PushTargetType target = PushTargetType.Device, string targetArgument = null) { var upload = this.UploadFile(fileUri); this.PushFile(upload.Filename, upload.FileType, upload.FileURL, body, target, targetArgument); }
/// <summary> /// Upload and Push a file to a device or another person. /// </summary> /// <param name="fileUri">The URI of the file you want to send.</param> /// <param name="body">The text to copy to the clipboard.</param> /// <param name="target">The target type to send the push.</param> /// <param name="targetArgument">The target argument to send the push.</param> public void PushFile(System.String fileUri, System.String body, PushTargetType target, System.String targetArgument) { this.currentScope.GetProxy().PushFile(fileUri, body, target, targetArgument); }
/// <summary> /// Push a Link to a device or another person. /// </summary> /// <param name="title">The note's title.</param> /// <param name="body">The text to copy to the clipboard.</param> /// <param name="url">The url to open.</param> /// <param name="target">The target type to send the push.</param> /// <param name="targetArgument">The target argument to send the push.</param> public void PushLink(System.String title, System.String body, System.String url, PushTargetType target, System.String targetArgument) { this.currentScope.GetProxy().PushLink(title, body, url, target, targetArgument); }