Skip to content

Commit e447dfb

Browse files
committed
Update org
1 parent 784a020 commit e447dfb

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exports": "./mod.ts",
3-
"name": "@foundatio/fetchclient",
3+
"name": "@foundatiofx/fetchclient",
44
"tasks": {
55
"build": "deno run -A scripts/build.ts",
66
"check": "deno check scripts/*.ts *.ts src/*.ts",

readme.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
![Foundatio](https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio-dark-bg.svg#gh-dark-mode-only "Foundatio")
22
![Foundatio](https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio.svg#gh-light-mode-only "Foundatio")
33

4-
[![NPM](https://img.shields.io/npm/v/%40foundatio%2Ffetchclient)](https://www.npmjs.com/package/@foundatio/fetchclient)
5-
[![JSR](https://jsr.io/badges/@foundatio/fetchclient)](https://jsr.io/@foundatio/fetchclient)
4+
[![NPM](https://img.shields.io/npm/v/%40foundatiofx%2Ffetchclient)](https://www.npmjs.com/package/@foundatiofx/fetchclient)
5+
[![JSR](https://jsr.io/badges/@foundatiofx/fetchclient)](https://jsr.io/@foundatiofx/fetchclient)
66
[![Build status](https://github.com/FoundatioFx/Foundatio/workflows/Build/badge.svg)](https://github.com/FoundatioFx/Foundatio/actions)
77
[![Discord](https://img.shields.io/discord/715744504891703319)](https://discord.gg/6HxgFCx)
88

@@ -32,19 +32,19 @@ APIs. It provides the following features:
3232
## Install
3333

3434
```shell
35-
npm install --save @foundatio/fetchclient
35+
npm install --save @foundatiofx/fetchclient
3636
```
3737

3838
## Docs
3939

40-
[API Documentation](https://jsr.io/@foundatio/fetchclient/doc)
40+
[API Documentation](https://jsr.io/@foundatiofx/fetchclient/doc)
4141

4242
## Usage
4343

4444
### Typed Response
4545

4646
```ts
47-
import { FetchClient } from "@foundatio/fetchclient";
47+
import { FetchClient } from "@foundatiofx/fetchclient";
4848

4949
type Products = {
5050
products: Array<{ id: number; name: string }>;
@@ -61,7 +61,7 @@ const products = response.data;
6161
### Functional
6262

6363
```ts
64-
import { getJSON, postJSON } from "@foundatio/fetchclient";
64+
import { getJSON, postJSON } from "@foundatiofx/fetchclient";
6565

6666
type Product = { id: number; title: string };
6767
type Products = { products: Product[] };
@@ -81,7 +81,7 @@ const product = await getJSON<Product>(
8181
### Model Validator
8282

8383
```ts
84-
import { FetchClient, setModelValidator } from "@foundatio/fetchclient";
84+
import { FetchClient, setModelValidator } from "@foundatiofx/fetchclient";
8585

8686
setModelValidator(async (data: object | null) => {
8787
// use zod or any other validator
@@ -115,7 +115,7 @@ if (!response.ok) {
115115
### Caching
116116

117117
```ts
118-
import { FetchClient } from "@foundatio/fetchclient";
118+
import { FetchClient } from "@foundatiofx/fetchclient";
119119

120120
type Todo = { userId: number; id: number; title: string; completed: boolean };
121121

@@ -135,7 +135,7 @@ client.cache.delete(["todos", "1"]);
135135
### Middleware
136136

137137
```ts
138-
import { FetchClient, useMiddleware } from "@foundatio/fetchclient";
138+
import { FetchClient, useMiddleware } from "@foundatiofx/fetchclient";
139139

140140
type Products = {
141141
products: Array<{ id: number; name: string }>;
@@ -156,7 +156,7 @@ const response = await client.getJSON<Products>(
156156
### Rate Limiting
157157

158158
```ts
159-
import { FetchClient, useRateLimit } from "@foundatio/fetchclient";
159+
import { FetchClient, useRateLimit } from "@foundatiofx/fetchclient";
160160

161161
// Enable rate limiting globally with 100 requests per minute
162162
useRateLimit({
@@ -173,7 +173,7 @@ const response = await client.getJSON(
173173
### Request Timeout
174174

175175
```ts
176-
import { FetchClient } from "@foundatio/fetchclient";
176+
import { FetchClient } from "@foundatiofx/fetchclient";
177177

178178
const client = new FetchClient();
179179

@@ -196,7 +196,7 @@ const response2 = await client.getJSON(
196196
### Error Handling
197197

198198
```ts
199-
import { FetchClient } from "@foundatio/fetchclient";
199+
import { FetchClient } from "@foundatiofx/fetchclient";
200200

201201
const client = new FetchClient();
202202

@@ -228,7 +228,7 @@ const response = await client.getJSON(
228228
### Authentication
229229

230230
```ts
231-
import { FetchClient, setAccessTokenFunc } from "@foundatio/fetchclient";
231+
import { FetchClient, setAccessTokenFunc } from "@foundatiofx/fetchclient";
232232

233233
// Set global access token function
234234
setAccessTokenFunc(() => localStorage.getItem("token"));
@@ -241,7 +241,7 @@ const response = await client.getJSON(`https://api.example.com/data`);
241241
### Base URL
242242

243243
```ts
244-
import { FetchClient, setBaseUrl } from "@foundatio/fetchclient";
244+
import { FetchClient, setBaseUrl } from "@foundatiofx/fetchclient";
245245

246246
// Set global base URL
247247
setBaseUrl("https://api.example.com");
@@ -254,7 +254,7 @@ const response = await client.getJSON(`/users/123`);
254254
### Loading State
255255

256256
```ts
257-
import { FetchClient } from "@foundatio/fetchclient";
257+
import { FetchClient } from "@foundatiofx/fetchclient";
258258

259259
const client = new FetchClient();
260260

0 commit comments

Comments
 (0)