Skip to content

Commit

Permalink
docs: update for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrqr committed Sep 9, 2021
1 parent 58fffc9 commit d960510
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@

> GitHub REST API for Deno projects.
:construction: Under active development.
:construction: Under active development. **DO NOT** use in production.

## Installation

```typescript
import { request } from "https://deno.land/x/octono@v0.0.1/mod.ts";
import { Octono } from "https://deno.land/x/octono@v0.0.1/mod.ts";
```

## Usage

```typescript
import { request } from "https://deno.land/x/octono@v0.0.1/mod.ts";
import { request } from "https://deno.land/x/octono@v0.0.3/mod.ts";

const { data: repos } = await request("GET /orgs/{org}/repos", {
org: "octocat"
const resp = await Octono.request("GET /users/{username}/repos", {
username: "octocat"
})

const repos = await resp.json();

for (const repo of repos) {
console.log(`Found repo: ${repo.full_name}`)
console.log(`Found repo: ${repo.full_name} (${repo.stargazers_count} stars)`);
}
```

Expand Down

0 comments on commit d960510

Please sign in to comment.