Top
@Kitty4D on the B-Chain
just my adventures with the blockchain, web3, cryptocurrencies, and NFTs
Developer, Content Creator, NFT Hodler, Degen, Former Camgirl
aka @Kitty4DHD, @kitty4Do, $kitty4d
kitty4d Profile Photo

Post by kitty4d

2022-02-04
• 7 months ago
IMAGE
so i'm fully all good now with everything i had to learn to work within this nodejs + 11ty framework. now i'm going to fully flesh out my interface to the backend API since it will probably be more useful to other people than if i only just cover the methods that i personally will need for my own website. so like on calls to getting the profiles of users who follow another user, i'm going ahead and sorting by DeSoLockedNanos (since at least from the code examples, it seems this is required to use the paging aspect of it). i'll prob take out the filter where username can't be an empty string since i guess if somehow an anon wallet were following a user, why not be able to show it. i figured out why the 11ty caching wasn't working for me, apparently it caches only based on the URL, which would work fine with GET requests, so now i'm just creating a pseudo GET parameter out of my POST parameters so that each unique API call can be cached as expected. but i'm keeping the call to the Cache function separated out, so if someone wanted to use this code and use their own caching mechanism, or simply not cache at all, there should just be only the one function to update. kept getting hung up on little things, like i couldn't figure out why i couldn't simply get PublicKeyToProfileEntry.length before DUH realizing the API isn't returning an array there. will have to see if this image file i'm attaching is actually readable after the site decides to resize it for me, i can upload individual images if it does that. ofc eventually i'll have a public github for it, right now it's private
Photo for Post
Likes:
2
Diamonds:
2
Reposts:
0
Quote Reposts:
0
{
   PostHashHex: "02901f183330f27a595dc6a0307dbc0b29b99aea20c1ae0b8f080c5024d41e54",
   PosterPublicKeyBase58Check: "BC1YLgbCAxYSSn97DArZtbwwhVUtHtjUfGZzKojLBKfxP8wbRHvb2Gz",
   ParentStakeID: "",
   Body: "so i'm fully all good now with everything i had to learn to work within this nodejs + 11ty framework.\n\nnow i'm going to fully flesh out my interface to the backend API since it will probably be more useful to other people than if i only just cover the methods that i personally will need for my own website.\n\nso like on calls to getting the profiles of users who follow another user, i'm going ahead and sorting by DeSoLockedNanos (since at least from the code examples, it seems this is required to use the paging aspect of it). i'll prob take out the filter where username can't be an empty string since i guess if somehow an anon wallet were following a user, why not be able to show it.\n\ni figured out why the 11ty caching wasn't working for me, apparently it caches only based on the URL, which would work fine with GET requests, so now i'm just creating a pseudo GET parameter out of my POST parameters so that each unique API call can be cached as expected.\n\nbut i'm keeping the call to the Cache function separated out, so if someone wanted to use this code and use their own caching mechanism, or simply not cache at all, there should just be only the one function to update.\n\nkept getting hung up on little things, like i couldn't figure out why i couldn't simply get PublicKeyToProfileEntry.length before DUH realizing the API isn't returning an array there.\n\nwill have to see if this image file i'm attaching is actually readable after the site decides to resize it for me, i can upload individual images if it does that.  \n\nofc eventually i'll have a public github for it, right now it's private",
   ImageURLs: [
      "https://images.deso.org/4729878cee1483ed9da7d5fb80d37f71b3e80c093b066960627f3a4e51182ebe.webp"
   ],
   VideoURLs: null,
   RepostedPostEntryResponse: null,
   CreatorBasisPoints: 1000,
   StakeMultipleBasisPoints: 12500,
   TimestampNanos: 1643959826584664300,
   IsHidden: false,
   ConfirmationBlockHeight: 101227,
   InMempool: false,
   ProfileEntryResponse: {
      Username: "kitty4d"
   },
   Comments: null,
   LikeCount: 2,
   DiamondCount: 2,
   PostEntryReaderState: null,
   InGlobalFeed: false,
   InHotFeed: false,
   IsPinned: false,
   PostExtraData: {
      Language: "en-US",
      Node: "11"
   },
   CommentCount: 0,
   RepostCount: 0,
   QuoteRepostCount: 0,
   ParentPosts: null,
   IsNFT: false,
   NumNFTCopies: 0,
   NumNFTCopiesForSale: 0,
   NumNFTCopiesBurned: 0,
   HasUnlockable: false,
   NFTRoyaltyToCreatorBasisPoints: 0,
   NFTRoyaltyToCoinBasisPoints: 0,
   AdditionalDESORoyaltiesMap: {},
   AdditionalCoinRoyaltiesMap: {},
   DiamondsFromSender: 0,
   HotnessScore: 0,
   PostMultiplier: 0,
   RecloutCount: 0,
   QuoteRecloutCount: 0,
   RecloutedPostEntryResponse: null
}
[]