mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
17 lines
538 B
JavaScript
17 lines
538 B
JavaScript
import { Agent, CredentialSession } from '@atproto/api';
|
|
import { CronJob } from 'cron';
|
|
import json from '../secrets/config.json' with { type: 'json' };
|
|
const { uname, upass } = json.bluesky;
|
|
|
|
// Create a Bluesky Agent
|
|
const session = new CredentialSession(new URL('https://bsky.social'));
|
|
|
|
const agent = new Agent(session);
|
|
|
|
async function main() {
|
|
await session.login({ identifier: uname, password: upass });
|
|
const { data: accountData } = await agent.getProfile({ actor: session.did });
|
|
console.log(accountData);
|
|
}
|
|
|
|
main(); |