this repo has no description
0
fork

Configure Feed

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

link card!

alice 9a0fd5e4 07c0512a

+87 -9
+6
.prettierrc.json
··· 1 + { 2 + "semi": true, 3 + "singleQuote": true, 4 + "trailingComma": "all", 5 + "printWidth": 120 6 + }
+39 -8
index.ts
··· 1 - import pkg from "@atproto/api"; 1 + import pkg from '@atproto/api'; 2 2 const { BskyAgent } = pkg; 3 - import * as dotenv from "dotenv"; 4 - import process from "node:process"; 3 + import * as dotenv from 'dotenv'; 4 + import process from 'node:process'; 5 5 dotenv.config(); 6 6 7 7 const agent = new BskyAgent({ 8 - service: "https://bsky.social", 8 + service: 'https://bsky.social', 9 9 persistSession: (evt, sess) => { 10 10 // store the session-data for reuse 11 11 }, ··· 16 16 password: process.env.BSKY_PASSWORD!, 17 17 }); 18 18 19 - const bloot = "You can find the code for this bleet >>>here<<<"; 19 + // const bloot = "You can find the code for this bleet >>>here<<<"; 20 + // await agent.post({ 21 + // text: bloot, 22 + // entities: [ 23 + // { 24 + // index: { start: bloot.indexOf(">>>") + 3, end: bloot.indexOf("<<<") }, 25 + // type: "link", 26 + // value: "https://github.com/aliceisjustplaying/bluesky-experiments", 27 + // }, 28 + // ], 29 + // }); 30 + 31 + const bloot = 'You can find the code for this bleet >>>here<<<, now with a link card as well!'; 20 32 await agent.post({ 21 33 text: bloot, 22 34 entities: [ 23 35 { 24 - index: { start: bloot.indexOf(">>>") + 3, end: bloot.indexOf("<<<") }, 25 - type: "link", 26 - value: "https://github.com/aliceisjustplaying/bluesky-experiments", 36 + index: { start: bloot.indexOf('>>>') + 3, end: bloot.indexOf('<<<') }, 37 + type: 'link', 38 + value: 'https://github.com/aliceisjustplaying/bluesky-experiments', 27 39 }, 28 40 ], 41 + // facets: [ 42 + // { 43 + // index: { byteStart: bloot.indexOf('>>>') + 3, byteEnd: bloot.indexOf('<<<') }, 44 + // features: [ 45 + // { 46 + // $type: 'app.bsky.richtext.facet#link', 47 + // uri: 'https://github.com/aliceisjustplaying/bluesky-experiments', 48 + // }, 49 + // ], 50 + // }, 51 + // ], 52 + embed: { 53 + $type: 'app.bsky.embed.external', 54 + external: { 55 + uri: 'https://github.com/aliceisjustplaying/bluesky-experiments', 56 + title: '', 57 + description: '', 58 + }, 59 + }, 29 60 });
+1 -1
package.json
··· 4 4 "description": "", 5 5 "main": "index.js", 6 6 "scripts": { 7 - "run": "ts-node-esm index.ts" 7 + "start": "ts-node-esm index.ts" 8 8 }, 9 9 "keywords": [], 10 10 "author": "",
+41
payload-example.json
··· 1 + { 2 + "collection": "app.bsky.feed.post", 3 + "repo": "did:plc:by3jhwdqgbtrcc7q4tkkv3cf", 4 + "record": { 5 + "text": "from code https://github.com/aliceisjustplaying/bluesky-experiments/blob/07c0512af2da47ef80db41a814cb54e1d8fea021/index.ts#L20-L29", 6 + "facets": [ 7 + { 8 + "index": { 9 + "byteStart": 10, 10 + "byteEnd": 130 11 + }, 12 + "features": [ 13 + { 14 + "$type": "app.bsky.richtext.facet#link", 15 + "uri": "https://github.com/aliceisjustplaying/bluesky-experiments/blob/07c0512af2da47ef80db41a814cb54e1d8fea021/index.ts#L20-L29" 16 + } 17 + ] 18 + } 19 + ], 20 + "reply": { 21 + "root": { 22 + "cid": "bafyreieuqg74z5csukgwh4g4t47oocjbax6mkaobakftgalrpzvmsbmpde", 23 + "uri": "at://did:plc:by3jhwdqgbtrcc7q4tkkv3cf/app.bsky.feed.post/3jsz7uyc24s2k" 24 + }, 25 + "parent": { 26 + "uri": "at://did:plc:pff6xmwkhyl3hnatx6excmpi/app.bsky.feed.post/3jsza5ip6el2q", 27 + "cid": "bafyreih4k7hvumt53nzdnpnm6pvrhrykjd5v7c57t434pnnvih3cgak35e" 28 + } 29 + }, 30 + "embed": { 31 + "$type": "app.bsky.embed.external", 32 + "external": { 33 + "uri": "https://github.com/aliceisjustplaying/bluesky-experiments/blob/07c0512af2da47ef80db41a814cb54e1d8fea021/index.ts#L20-L29", 34 + "title": "", 35 + "description": "" 36 + } 37 + }, 38 + "createdAt": "2023-04-10T11:21:56.258Z", 39 + "$type": "app.bsky.feed.post" 40 + } 41 + }