Skip to content

Commit

Permalink
Add JSR registry import instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
codybrom committed Aug 2, 2024
1 parent 3dc9266 commit 648d02d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Denim: Threads API Wrapper for Deno
# @codybrom/denim: Threads API Wrapper for Deno

[![JSR](https://jsr.io/badges/@codybrom/denim)](https://jsr.io/@codybrom/denim>)


Denim is a Deno module that provides a simple interface for posting single Threads posts using text, images, or videos.

Expand All @@ -11,18 +14,22 @@ Denim is a Deno module that provides a simple interface for posting single Threa

## Installation

To use Denim in your Deno project, you can import it directly from the GitHub repository:
### Using with Deno

```typescript
import { createThreadsContainer, publishThreadsContainer, ThreadsPostRequest } from "https://raw.githubusercontent.com/codybrom/denim/main/mod.ts";
To add Denim to your Deno project, you can use the following command:

```bash
deno add @codybrom/denim
```

This will add the latest version of Denim to your project's dependencies.

## Usage

### Basic Usage

```typescript
import { createThreadsContainer, publishThreadsContainer, ThreadsPostRequest } from "https://raw.githubusercontent.com/codybrom/denim/main/mod.ts";
import { createThreadsContainer, publishThreadsContainer, ThreadsPostRequest } from "@codybrom/denim/";

const request: ThreadsPostRequest = {
userId: "YOUR_USER_ID",
Expand Down Expand Up @@ -126,6 +133,8 @@ curl -X POST <YOUR_FUNCTION_URI> \
}'
```

Note: Replace with your actual authorization headers if your edge function requires them (or remove them).

## Security Note

Ensure that your function is deployed with appropriate access controls and authentication mechanisms to protect sensitive data like access tokens.
Expand Down

0 comments on commit 648d02d

Please sign in to comment.