jpopesculian / twitter-v2-rs

Rust bindings for Twitter API v2
https://docs.rs/twitter-v2/latest
102 stars 28 forks source link

Use primitives instead of NumericId and StringId newtypes #17

Open allan2 opened 1 year ago

allan2 commented 1 year ago

In public data structures, could we use primitive types for identifiers instead of NumericId and StringId?

NumericId isn't semantic anyway like TweetId or UserId. I did see TweetId/UserId structs being generated by macros for use in request bodies, so maybe NumericId and StringId is useful behind the scenes. For the public API though, they make the IDs in common data types like Tweet and User less ergonomic to consume.