Farcaster Directory

API docs for interacting with the directory.

Endpoint url:

directory.yashkarthik.xyz/api/read-user/:fid

Where FID is the user's fid

Response shape:

Response for valid input:

{
  id: number;
  fid: number;
  fname: string;
  twitter_username: string;
  custody_address: string;
  connected_address: string[];
  cast_timestamp: string|null;
  tweet_timestamp: Date;
  cast_content: string|null;
  tweet_content: string|null;
  cast_link: string|null;
  tweet_link: string|null;
}[]

Possible responses when error:

{
  message: 'User FID not registered.'
}
{
  message: 'Internal server error'
}
{
  "issues": [
  {
   "code": "invalid_type",
   "expected": "number",
   "received": "nan",
   "path": [],
   "message": "Expected number, received nan"
  }
  ],
  "name": "ZodError"
}

- Either the cast params (timestamp, content, link) or the tweet params may be null, but not both.

- The `id` has no meaning with repect to the protocol, it"s just the database primary key.

- Unique properties? None of the props are unique to a single row. The same FID may be "owned" by different twitter users, and vice versa. Hence the array response.

- Create an issue if you need other endpoints.