Add snippets

This commit is contained in:
Roei Erez
2023-12-14 09:46:58 +02:00
parent 31483fb54e
commit 05f18fe1df
10 changed files with 259 additions and 2 deletions

View File

@@ -20,6 +20,63 @@ Next, register this URL with the Breez SDK. This step involves calling a specifi
{{#include ../../snippets/rust/src/webhook.rs:register-webook}}
```
</section>
<div slot="title">Swift</div>
<section>
```swift,ignore
{{#include ../../snippets/swift/BreezSDKExamples/Sources/Webhook.swift:register-webook}}
```
</section>
<div slot="title">Kotlin</div>
<section>
```kotlin,ignore
{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/Webhook.kt:register-webook}}
```
</section>
<div slot="title">React Native</div>
<section>
```typescript
{{#include ../../snippets/react-native/webhook.ts:register-webook}}
```
</section>
<div slot="title">Dart</div>
<section>
```dart,ignore
{{#include ../../snippets/dart_snippets/lib/webhook.dart:register-webook}}
```
</section>
<div slot="title">Python</div>
<section>
```python,ignore
{{#include ../../snippets/python/src/webhook.py:register-webook}}
```
</section>
<div slot="title">Go</div>
<section>
```go,ignore
{{#include ../../snippets/go/webhook.go:register-webook}}
```
</section>
<div slot="title">C#</div>
<section>
```cs,ignore
{{#include ../../snippets/csharp/Webhook.cs:register-webook}}
```
</section>
</custom-tabs>
## Handling Incoming Notifications
@@ -71,6 +128,63 @@ Register the constructed URL with the Breez SDK By calling an SDK function.
{{#include ../../snippets/rust/src/webhook.rs:register-payment-webook}}
```
</section>
<div slot="title">Swift</div>
<section>
```swift,ignore
{{#include ../../snippets/swift/BreezSDKExamples/Sources/Webhook.swift:register-payment-webook}}
```
</section>
<div slot="title">Kotlin</div>
<section>
```kotlin,ignore
{{#include ../../snippets/kotlin_mpp_lib/shared/src/commonMain/kotlin/com/example/kotlinmpplib/Webhook.kt:register-payment-webook}}
```
</section>
<div slot="title">React Native</div>
<section>
```typescript
{{#include ../../snippets/react-native/webhook.ts:register-payment-webook}}
```
</section>
<div slot="title">Dart</div>
<section>
```dart,ignore
{{#include ../../snippets/dart_snippets/lib/webhook.dart:register-payment-webook}}
```
</section>
<div slot="title">Python</div>
<section>
```python,ignore
{{#include ../../snippets/python/src/webhook.py:register-payment-webook}}
```
</section>
<div slot="title">Go</div>
<section>
```go,ignore
{{#include ../../snippets/go/webhook.go:register-payment-webook}}
```
</section>
<div slot="title">C#</div>
<section>
```cs,ignore
{{#include ../../snippets/csharp/Webhook.cs:register-payment-webook}}
```
</section>
</custom-tabs>
## Step 4: Handling Notifications When the App is Not Running