Closed philipithomas closed 7 years ago
Github ID appears to be an integer from your API, but it is a string in the user struct
Oddly, the user twitter ID is an integer, and the company twitter ID is a string. That doesn't make sense @maccman :-P
@philipithomas nice catch. Agree those should def be consistent.
The integer representation of the unique identifier for this Tweet. This number is greater than 53 bits and some programming languages may have difficulty/silent defects in interpreting it. Using a signed 64 bit integer for storing this identifier is safe. Use id_str for fetching the identifier to stay on the safe side. See Twitter IDs, JSON and Snowflake .
Oops - should def be using strings for both.
For the future, the is the best way I've seen for turning JSON into Go structs:
Might be good to set up some basic integration testing on this library because Go is tricky with JSON integrations. Basically, have it query API and assert no error. It would be best to run this daily or so (which TravisCI could do)
following
and followers
for Twitter also incorrect type - fix incoming
Does Company
no longer return a URL?
Getting this error in production:
It's stopping this library from completing enrichment.