Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Commit

Permalink
[docs] Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
junhoyeo committed Jul 8, 2023
1 parent 5c09df8 commit d6df094
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,6 @@ const main = async () => {
main();
```

</details>

### 🚀 Usage (Write)

```ts
import { ThreadsAPI } from 'threads-api';

const main = async () => {
const threadsAPI = new ThreadsAPI({
username: 'jamel.hammoud', // Your username
password: 'PASSWORD', // Your password
});

await threadsAPI.publish('Hello World');
};

main();
```

You can also provide custom `deviceID` (Default is `android-${(Math.random() * 1e24).toString(36)}`).

```ts
const deviceID = `android-${(Math.random() * 1e24).toString(36)}`;

const threadsAPI = new ThreadsAPI({
username: 'jamel.hammoud',
password: 'PASSWORD',
deviceID,
});
```

<details>
<summary>
<h3>📑 Outputs</h3>
Expand Down Expand Up @@ -596,6 +565,37 @@ Same as the output of `threadsAPI.getUserProfileThreads` but `thread_items.lengt

</details>

</details>

### 🚀 Usage (Write)

```ts
import { ThreadsAPI } from 'threads-api';

const main = async () => {
const threadsAPI = new ThreadsAPI({
username: 'jamel.hammoud', // Your username
password: 'PASSWORD', // Your password
});

await threadsAPI.publish('Hello World');
};

main();
```

You can also provide custom `deviceID` (Default is `android-${(Math.random() * 1e24).toString(36)}`).

```ts
const deviceID = `android-${(Math.random() * 1e24).toString(36)}`;

const threadsAPI = new ThreadsAPI({
username: 'jamel.hammoud',
password: 'PASSWORD',
deviceID,
});
```

## [<img src="./.github/emojis/package.png" width="30" height="30" />](https://github.com/junhoyeo) Installation

```bash
Expand Down

0 comments on commit d6df094

Please sign in to comment.