Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Example of getting the username of a FID #54

Open
deodad opened this issue Jul 5, 2023 · 0 comments
Open

Add an Example of getting the username of a FID #54

deodad opened this issue Jul 5, 2023 · 0 comments

Comments

@deodad
Copy link
Member

deodad commented Jul 5, 2023

There is an snippet in our examples but it's hard to find.

sds pushed a commit to farcasterxyz/hub-monorepo that referenced this issue Dec 12, 2024
## Why is this change needed?

Since changes were requested in docs
(farcasterxyz/docs#54), I have made a PR to
update Farcaster's docs (farcasterxyz/docs#356),
thus decided to update the readme file.

## Merge Checklist

_Choose all relevant options below by adding an `x` now or at any time
before submitting for review_

- [ ] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [ ] PR has a
[changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets)
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [ ] PR includes
[documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs)
if necessary.


<!-- start pr-codex -->

---

## PR-Codex overview
This PR adds a new function for retrieving a user's first name using
their FID from the `HubRpcClient`.

### Detailed summary
- Introduced a new function `getFnameFromFid`.
- The function takes `fid` (number) and `client` (`HubRpcClient`) as
parameters.
- It retrieves user data of type `UserDataType.FNAME`.
- Returns the user's first name or an empty string if not found.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant