atmosphere explorer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

switch to simpleFetchHandler

Juliet daeccf11 c141b1fb

+17 -17
+2 -2
src/auth/session-manager.ts
··· 1 - import { Client, CredentialManager } from "@atcute/client"; 1 + import { Client, simpleFetchHandler } from "@atcute/client"; 2 2 import { Did } from "@atcute/lexicons"; 3 3 import { 4 4 finalizeAuthorization, ··· 20 20 21 21 export const getAvatar = async (did: Did): Promise<string | undefined> => { 22 22 const rpc = new Client({ 23 - handler: new CredentialManager({ service: "https://public.api.bsky.app" }), 23 + handler: simpleFetchHandler({ service: "https://public.api.bsky.app" }), 24 24 }); 25 25 const res = await rpc.get("app.bsky.actor.getProfile", { params: { actor: did } }); 26 26 if (res.ok) {
+2 -2
src/components/search.tsx
··· 1 - import { Client, CredentialManager } from "@atcute/client"; 1 + import { Client, simpleFetchHandler } from "@atcute/client"; 2 2 import { Nsid } from "@atcute/lexicons"; 3 3 import { A, useLocation, useNavigate } from "@solidjs/router"; 4 4 import { createResource, createSignal, For, onCleanup, onMount, Show } from "solid-js"; ··· 67 67 const navigate = useNavigate(); 68 68 let searchInput!: HTMLInputElement; 69 69 const rpc = new Client({ 70 - handler: new CredentialManager({ service: "https://public.api.bsky.app" }), 70 + handler: simpleFetchHandler({ service: "https://public.api.bsky.app" }), 71 71 }); 72 72 73 73 onMount(() => {
+2 -2
src/views/blob.tsx
··· 1 - import { Client, CredentialManager } from "@atcute/client"; 1 + import { Client, simpleFetchHandler } from "@atcute/client"; 2 2 import { createResource, createSignal, For, Show } from "solid-js"; 3 3 import { Button } from "../components/button"; 4 4 ··· 9 9 let rpc: Client; 10 10 11 11 const fetchBlobs = async () => { 12 - if (!rpc) rpc = new Client({ handler: new CredentialManager({ service: props.pds }) }); 12 + if (!rpc) rpc = new Client({ handler: simpleFetchHandler({ service: props.pds }) }); 13 13 const res = await rpc.get("com.atproto.sync.listBlobs", { 14 14 params: { 15 15 did: props.repo as `did:${string}:${string}`,
+2 -2
src/views/collection.tsx
··· 1 1 import { ComAtprotoRepoApplyWrites, ComAtprotoRepoGetRecord } from "@atcute/atproto"; 2 - import { Client, CredentialManager } from "@atcute/client"; 2 + import { Client, simpleFetchHandler } from "@atcute/client"; 3 3 import { $type, ActorIdentifier, InferXRPCBodyOutput } from "@atcute/lexicons"; 4 4 import * as TID from "@atcute/tid"; 5 5 import { A, useParams } from "@solidjs/router"; ··· 89 89 90 90 const fetchRecords = async () => { 91 91 if (!pds) pds = await resolvePDS(did!); 92 - if (!rpc) rpc = new Client({ handler: new CredentialManager({ service: pds }) }); 92 + if (!rpc) rpc = new Client({ handler: simpleFetchHandler({ service: pds }) }); 93 93 const res = await rpc.get("com.atproto.repo.listRecords", { 94 94 params: { 95 95 repo: did as ActorIdentifier,
+2 -2
src/views/labels.tsx
··· 1 1 import { ComAtprotoLabelDefs } from "@atcute/atproto"; 2 - import { Client, CredentialManager } from "@atcute/client"; 2 + import { Client, simpleFetchHandler } from "@atcute/client"; 3 3 import { isAtprotoDid } from "@atcute/identity"; 4 4 import { Handle } from "@atcute/lexicons"; 5 5 import { A, useSearchParams } from "@solidjs/router"; ··· 158 158 await resolvePDS(did); 159 159 if (!labelerCache[did]) throw new Error("Repository is not a labeler"); 160 160 rpc = new Client({ 161 - handler: new CredentialManager({ service: labelerCache[did] }), 161 + handler: simpleFetchHandler({ service: labelerCache[did] }), 162 162 }); 163 163 164 164 setSearchParams({ did, uriPatterns });
+2 -2
src/views/pds.tsx
··· 1 1 import { ComAtprotoServerDescribeServer, ComAtprotoSyncListRepos } from "@atcute/atproto"; 2 - import { Client, CredentialManager } from "@atcute/client"; 2 + import { Client, simpleFetchHandler } from "@atcute/client"; 3 3 import { InferXRPCBodyOutput } from "@atcute/lexicons"; 4 4 import * as TID from "@atcute/tid"; 5 5 import { A, useLocation, useParams } from "@solidjs/router"; ··· 23 23 setPDS(params.pds); 24 24 const pds = 25 25 params.pds!.startsWith("localhost") ? `http://${params.pds}` : `https://${params.pds}`; 26 - const rpc = new Client({ handler: new CredentialManager({ service: pds }) }); 26 + const rpc = new Client({ handler: simpleFetchHandler({ service: pds }) }); 27 27 28 28 const getVersion = async () => { 29 29 // @ts-expect-error: undocumented endpoint
+3 -3
src/views/record.tsx
··· 1 - import { Client, CredentialManager } from "@atcute/client"; 1 + import { Client, simpleFetchHandler } from "@atcute/client"; 2 2 import { DidDocument, getPdsEndpoint } from "@atcute/identity"; 3 3 import { lexiconDoc } from "@atcute/lexicon-doc"; 4 4 import { RecordValidator } from "@atcute/lexicon-doc/validations"; ··· 68 68 }); 69 69 } 70 70 71 - const rpc = new Client({ handler: new CredentialManager({ service: pdsEndpoint }) }); 71 + const rpc = new Client({ handler: simpleFetchHandler({ service: pdsEndpoint }) }); 72 72 const response = await rpc.get("com.atproto.repo.getRecord", { 73 73 params: { 74 74 repo: authority, ··· 208 208 setValidSchema(undefined); 209 209 setLexiconUri(undefined); 210 210 const pds = await resolvePDS(did!); 211 - rpc = new Client({ handler: new CredentialManager({ service: pds }) }); 211 + rpc = new Client({ handler: simpleFetchHandler({ service: pds }) }); 212 212 const res = await rpc.get("com.atproto.repo.getRecord", { 213 213 params: { 214 214 repo: did as ActorIdentifier,
+2 -2
src/views/repo.tsx
··· 1 - import { Client, CredentialManager } from "@atcute/client"; 1 + import { Client, simpleFetchHandler } from "@atcute/client"; 2 2 import { DidDocument } from "@atcute/identity"; 3 3 import { ActorIdentifier, Did, Handle, Nsid } from "@atcute/lexicons"; 4 4 import { A, useLocation, useNavigate, useParams } from "@solidjs/router"; ··· 139 139 return {}; 140 140 } 141 141 142 - rpc = new Client({ handler: new CredentialManager({ service: pds }) }); 142 + rpc = new Client({ handler: simpleFetchHandler({ service: pds }) }); 143 143 try { 144 144 const res = await rpc.get("com.atproto.repo.describeRepo", { 145 145 params: { repo: did as ActorIdentifier },