Skip to content

Instantly share code, notes, and snippets.

View infu's full-sized avatar
⚒️
nftanvil, icp, ftw!

infu

⚒️
nftanvil, icp, ftw!
View GitHub Profile
@infu
infu / gist:d112ca32ae65c5b948573fed72747238
Created September 8, 2023 18:42
Twitter get liked by
import { TwitterApi } from "twitter-api-v2";
import fs from "fs";
const twitterClient = new TwitterApi(
"AAAAAAAAAAAAAAAAAAAAANv2bgEAAAAAq30nD5JxDUp3453453453452Bt1zJI%3DsGucipWI0FndiEu6yj26vKoKTphSczovppMG1123123123123"
);
// Tell typescript it's a readonly app
const client = twitterClient.readOnly;
import Map "mo:motoko-hash-map/Map";
import Set "mo:motoko-hash-map/Set";
import Blob "mo:base/Blob";
import BTree "mo:stableheapbtreemap/BTree";
import Nat64 "mo:base/Nat64";
import Iter "mo:base/Iter";
import Text "mo:base/Text";
import E "mo:lexicographic-encoding/EncodeInt";
import Array "mo:base/Array";
import Debug "mo:base/Debug";
werwerwewerwer
test message!
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;
@infu
infu / oc_userindex.did
Created April 5, 2023 08:53
OC UserIndex
type AccessorId = principal;
type AccountIdentifier = blob;
type BlockIndex = nat64;
type CanisterId = principal;
type ChatId = CanisterId;
type Cycles = nat;
type EventIndex = nat32;
type FileId = nat;
type Hash = blob;
type ICP = Tokens;