Content
@
0 reply
0 recast
2 reactions
Chris
@chrisdom
today i've shipped fc-data.xyz heavily inspired by @pugson's ens and abidata, i've always needed a quick api for username by fid, avatar by username etc it's also heavily cached so don't rely on it for fresh data! Usage - /fid-or-username - /fid-or-username/avatar
6 replies
16 recasts
75 reactions
Greg
@greg
nice but fyi a username can be a number! should probably be different endpoints
2 replies
4 recasts
42 reactions
Chris
@chrisdom
ty, appreciate the feedback! don't know if you've tried one of those cases but it works, if the username isn't found it checks by fid, so it's gonna find it ππ cors is also setup so you can access it from clients
1 reply
0 recast
1 reaction
Greg
@greg
right but if im an app dev always sending fids, i can hit /3 expecting danβs account but really get a different account
1 reply
0 recast
1 reaction
Chris
@chrisdom
those pesky usernames, adding separate routes tmw
1 reply
0 recast
1 reaction
Kevin
@typedarray.eth
You could also consider returning a list instead of a nullable object. If the input matches a username and a FID, the response would include both.
0 reply
0 recast
0 reaction