lilypad — 9/10/2023, 5:47:29 PM

does the User object look easy to work with? (id is meow because there’s no database yet)

♥ 5 ↩ 1 💬 18 comments

comments

wynd:

good but a few things:

  1. less stuff on root, like group stats under stats, or profile with about

  2. no caps

  3. About is really confusing me, how is the data structured, because I thought it was an array but then again no

  4. what are rainbow and verified

  5. idk about this one as much, but doesn’t handle normally imply unique

otherwise i like the modulized about

9/10/2023, 9:46:45 PM
radi8:

About 2) I agree, programmers don't want to type caps.

9/10/2023, 10:21:27 PM
lily:
  1. what’s the point of that?

  2. that's just what serde does, i don't know if i can change it without literally modifying the crate

  3. it is an array, firefox just displays it as an object with number keys for some reason

  4. why you have lilypad rainbow (the subscription), or why/how you’re verified

  5. maybe? idk

9/11/2023, 7:07:06 AM
radi8:

https://users.rust-lang.org/t/lowercasing-all-keys-in-serde-json/96869/3

9/11/2023, 3:58:10 PM
lily:

?

9/11/2023, 5:02:03 PM
radi8:

Pretty self explanatory, lowercasing all keys in serde json

9/11/2023, 5:43:41 PM
lily:

this doesn’t have much to do with what i posted though

9/11/2023, 5:49:35 PM
radi8:

"that's just what serde does, I don't know if I can change it" THAT'S WHY I WAS SENDING YOU THE LINK

9/11/2023, 6:40:51 PM
lily:

do you know the difference between serialising and deserialising

9/12/2023, 3:04:34 PM
radi8:

honestly I don't really care

9/12/2023, 3:21:59 PM
lily:

it’s pretty important in this context i’m just saying

9/12/2023, 4:28:23 PM
radi8:

Personally I would rather have a list of users instead of a number of followers/following @lily

9/10/2023, 6:09:05 PM
lily:

that would be at the /followers endpoint (what if the person has 1 million followers? then that could be gigabytes of content to download)

same for the notes, you could have A LOT of those

and it would be pretty bad to make it recursive too

9/10/2023, 6:58:30 PM
radi8:

Not to put you down but I doubt you are getting millions of users any time soon.. (though something you could do is only send up to 20 results, and after that it would request each page.)

9/10/2023, 7:11:15 PM
lily:

i was really talking about scaling, i’m not sure if that wasn't clear from my message or something

yeah, the /followers endpoint would be paginated, it's just useless to add it to the normal /users/by_* endpoints since then you'd be downloading a lot of redundant data

9/11/2023, 6:33:07 AM
radi8:

I was saying it just send an array of 2 on the user endpoint, like ["1", "33483djdn", "gorkejusername"]

9/12/2023, 3:23:39 PM
lily:

i feel like the /followers idea is better since it can show the things like profile theme and stuff in the list of followers without having to do an additional download

9/12/2023, 4:30:09 PM
asfsdgdfd:

true. i think that’s a fair solution and i really like the user’s object overall! :)

9/10/2023, 7:14:21 PM