-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b139ac
commit c4563ce
Showing
5 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
<p>To send email notifications in your code files, run:</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Email(emailAddress, subject, body);</pre> | ||
<pre class="python">self.notify.email(email_address, subject, body)</pre> | ||
<pre class="csharp">var body = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
Notify.Email(emailAddress: "[email protected]", subject: "Last Trade", body: body);</pre> | ||
<pre class="python">body = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
self.notify.email(email_address="[email protected]", subject="Last Trade", body=body)</pre> | ||
</div> | ||
|
||
<p>You can include an attachment and set its name.</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">var attachment = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
var headers = new Dictionary<string, string> { { "filename", "trades.csv" } }; | ||
Notify.Email(emailAddress, subject, body, attachment, headers);</pre> | ||
Notify.Email(emailAddress: "[email protected]", subject: "Last Trade", body: "See attachment", attachment: attachment, headers: headers);</pre> | ||
<pre class="python">attachment = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
headers = { "filename": "trades.csv" } | ||
self.notify.email(email_address, subject, body, attachment, headers)</pre> | ||
self.notify.email(email_address="[email protected]", subject="Last Trade", body="See attachment", attachment=attachment, headers=headers)</pre> | ||
</div> | ||
|
||
<p>If you don't provide headers, the attachment name is <span class='public-file-name'>attachment.txt</span>.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
<p>To send a file to your FTP server in your code files, run:</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Ftp(hostname, username, password, filePath, fileContent, port);</pre> | ||
<pre class="python">self.notify.ftp(hostname, username, password, file_path, file_content, port)</pre> | ||
<pre class="csharp">var fileContent = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
Notify.Ftp(hostname: "myftpserver.com", username: "admin", password: "12345", filePath: "trades.csv", fileContent: fileContent, port: 21);</pre> | ||
<pre class="python">file_content = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
self.notify.ftp(hostname: "myftpserver.com", username="admin", password="12345", file_path="trades.csv", file_content=file_content, port: 21)</pre> | ||
</div> | ||
|
||
<p>To send a file to your SFTP server in your code files, run:</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Sftp(hostname, username, password, filePath, fileContent, port);</pre> | ||
<pre class="python">self.notify.Sftp(hostname, username, password, file_path, file_content, port)</pre> | ||
<pre class="csharp">var fileContent = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
Notify.Sftp(hostname: "mysftpserver.com", username: "admin", password: "12345", filePath: "trades.csv", fileContent: fileContent, port: 21);</pre> | ||
<pre class="python">file_content = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
self.notify.sftp(hostname: "mysftpserver.com", username="admin", password="12345", file_path="trades.csv", file_content=file_content, port: 21)</pre> | ||
</div> | ||
|
||
<p>You can use password authentication over SFTP using SSH keys.</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Sftp(hostname, username, privateKey, privateKeyPassphrase, filePath, fileContent, port);</pre> | ||
<pre class="python">self.notify.Sftp(hostname, username, private_key, private_key_passphrase, file_path, file_content, port)</pre> | ||
<pre class="csharp">var fileContent = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
Notify.Sftp(hostname: "mysftpserver.com", username: "admin", privateKey: "12345", privateKeyPassphrase: "67890", filePath: "trades.csv", fileContent: fileContent, port: 21);</pre> | ||
<pre class="python">file_content = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
self.notify.sftp(hostname: "mysftpserver.com", username="admin", private_key= "12345", private_key_passphrase="67890", file_path="trades.csv", file_content=file_content, port: 21)</pre> | ||
</div> | ||
|
||
<p>The <code>port</code> parameter is optional.</p> | ||
<p>The <code class="csharp">filePath</code><code class="python">file_path</code> parameter is path to file on the FTP server. The <code>port</code> parameter is optional.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<p>To send SMS notifications in your code files, run:</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Sms(phoneNumber, message);</pre> | ||
<pre class="python">self.notify.sms(phone_number, message)</pre> | ||
<pre class="csharp">var message = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511"; | ||
Notify.Sms(phoneNumber: "+100503016366", message: message);</pre> | ||
<pre class="python">message = "2023-07-13T12:20:00.2033226Z,EURUSD,1.11853,89187,Market,Filled,99758.33511" | ||
self.notify.sms(phone_number: "+100503016366", message=message)</pre> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
<p>To send webhook notifications in your code files, run:</p> | ||
<div class="section-example-container"> | ||
<pre class="csharp">Notify.Web(url, data, headers);</pre> | ||
<pre class="python">self.notify.web(url, data, headers)</pre> | ||
<pre class="csharp">var data = ""; | ||
var headers = new Dictionary<string, string> { { "Authorization", "Basic XXXXXX" } }; | ||
Notify.Web(url: "http://api.myserver.com", data: data, headers: headers);</pre> | ||
<pre class="python">data = "" | ||
headers = { 'Authorization': 'Basic XXXXX' } | ||
self.notify.web(url="http://api.myserver.com", data=data, headers=headers)</pre> | ||
</div> |