Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add server side sdk guides

Kiran K5cbb315934a2
diff --git a/apps/web/integration-guides/golang.md b/apps/web/integration-guides/golang.md
new file mode 100644
index 0000000000..c85e5e9154
--- /dev/null
+++ b/apps/web/integration-guides/golang.md
@@ -0,0 +1,35 @@
+## Installation
+
+```bash
+go get github.com/dubinc/dub-go
+```
+
+## Basic Usage
+
+Here's how you can use the Dub Go SDK:
+
+```go
+package main
+
+import (
+ "context"
+ "fmt"
+ "log"
+ "os"
+
+ dub "github.com/dubinc/dub-go"
+)
+
+func main() {
+ // Initialize the Dub SDK with your API key
+ d := dub.New(
+ dub.WithSecurity(os.Getenv("DUB_API_KEY")), // optional, defaults to DUB_API_KEY
+ )
+}
+```
+
+Additional resources:
+
+1. [NPM Package](https://d.to/go/sdk)
+2. [SDK Reference](https://github.com/dubinc/dub-go/blob/main/README.md)
+3. [Examples](https://github.com/dubinc/examples/tree/main/go)
diff --git a/apps/web/integration-guides/php.md b/apps/web/integration-guides/php.md
new file mode 100644
index 0000000000..7b87c5fb06
--- /dev/null
+++ b/apps/web/integration-guides/php.md
@@ -0,0 +1,31 @@
+## Installation
+
+```bash
+composer require dub/dub-php
+```
+
+## Basic Usage
+
+Here's how you can use the Dub PHP SDK:
+
+```php
+<?php
+
+declare(strict_types=1);
+
+require 'vendor/autoload.php';
+
+use Dub\Dub;
+use Dub\Models\Operations;
+
+// Initialize the Dub SDK with your API key
+$dub = Dub::builder()
+ ->setSecurity(getenv('DUB_API_KEY')) // optional, defaults to DUB_API_KEY
+ ->build();
+```
+
+Additional resources:
+
+1. [NPM Package](https://d.to/php/sdk)
+2. [SDK Reference](https://github.com/dubinc/dub-php/blob/main/README.md)
+3. [Examples](https://github.com/dubinc/examples/tree/main/php)
diff --git a/apps/web/integration-guides/python.md b/apps/web/integration-guides/python.md
new file mode 100644
index 0000000000..2b2eb809de
--- /dev/null
+++ b/apps/web/integration-guides/python.md
@@ -0,0 +1,26 @@
+## Installation
+
+```bash
+pip install dub
+```
+
+## Basic Usage
+
+Here's how you can use the Dub Python SDK:
+
+```python
+import os
+import dub
+from dub.models import operations
+
+# Initialize the Dub SDK with your API key
+d = dub.Dub(
+ token=os.environ['DUB_API_KEY'], # optional, defaults to DUB_API_KEY
+)
+```
+
+Additional resources:
+
+1. [NPM Package](https://d.to/python/sdk)
+2. [SDK Reference](https://github.com/dubinc/dub-python/blob/main/README.md)
+3. [Examples](https://github.com/dubinc/examples/tree/main/python)
diff --git a/apps/web/integration-guides/ruby.md b/apps/web/integration-guides/ruby.md
new file mode 100644
index 0000000000..12df47f918
--- /dev/null
+++ b/apps/web/integration-guides/ruby.md
@@ -0,0 +1,27 @@
+## Installation
+
+```bash
+gem install dub
+```
+
+## Basic Usage
+
+Here's how you can use the Dub Ruby SDK:
+
+```ruby
+require 'dub'
+
+# Initialize the Dub SDK with your API key
+dub = ::OpenApiSDK::Dub.new
+dub.config_security(
+ ::OpenApiSDK::Shared::Security.new(
+ token: ENV['DUB_API_KEY'], # optional, defaults to DUB_API_KEY
+ )
+)
+```
+
+Additional resources:
+
+1. [NPM Package](https://d.to/ruby/sdk)
+2. [SDK Reference](https://github.com/dubinc/dub-ruby/blob/main/README.md)
+3. [Examples](https://github.com/dubinc/examples/tree/main/ruby)
diff --git a/apps/web/integration-guides/typescript.md b/apps/web/integration-guides/typescript.md
new file mode 100644
index 0000000000..16b3d2bfd5
--- /dev/null
+++ b/apps/web/integration-guides/typescript.md
@@ -0,0 +1,35 @@
+## Installation
+
+Install the Dub TypeScript SDK using your package manager of choice:
+
+```bash npm
+npm install dub
+```
+
+```bash pnpm
+pnpm add dub
+```
+
+```bash yarn
+# zod is a peer dependency
+yarn add dub zod
+```
+
+## Basic Usage
+
+Here's how you can use the Dub TypeScript SDK:
+
+```typescript
+import { Dub } from "dub";
+
+// Initialize the Dub SDK with your API key
+const dub = new Dub({
+ token: process.env.DUB_API_KEY, // optional, defaults to DUB_API_KEY
+});
+```
+
+Additional resources:
+
+1. [NPM Package](https://d.to/ts/sdk)
+2. [SDK Reference](https://github.com/dubinc/dub-ts/blob/main/README.md)
+3. [Examples](https://github.com/dubinc/examples/tree/main/typescript)
diff --git a/apps/web/ui/guides/guide.tsx b/apps/web/ui/guides/guide.tsx
index 75d100f943..e84e86643e 100644
--- a/apps/web/ui/guides/guide.tsx
+++ b/apps/web/ui/guides/guide.tsx
@@ -1,3 +1,5 @@
+"use client";
+
import { buttonVariants } from "@dub/ui";
import { cn } from "@dub/utils";
import Link from "next/link";
diff --git a/apps/web/ui/guides/integrations.ts b/apps/web/ui/guides/integrations.ts
index 4596b940e6..8c4c938f6c 100644
--- a/apps/web/ui/guides/integrations.ts
+++ b/apps/web/ui/guides/integrations.ts
@@ -103,12 +103,12 @@ export const guides: IntegrationGuide[] = [
title: "PHP",
icon: Php,
},
- {
- type: "server-sdk",
- key: "rest",
- title: "REST API",
- icon: SquareCode,
- },
+ // {
+ // type: "server-sdk",
+ // key: "rest-api",
+ // title: "REST API",
+ // icon: SquareCode,
+ // },
// Track Leads
{