Closed john-baringhaus closed 2 years ago
Hey, can you share with me the userId that you are using please ?
1533931140729516034
I think part of the problem is in how twitter response to a user with no followers.
Since the JSON from Twitter for this user is "{"meta":{"result_count":0}}" OBJECT_MAPPER leaves the ArrayList null.
Yes, maybe a solution to have this more clean is to have a empty Array by default in the field data
.
Like
private List<UserData> data = new ArrayList<>();
Then we will always have an empty list in both methods. What do you think ?
That's what I ended up doing. I also removed the initializer in the builder in getUsersRecursively since it became redundant.
I'm not sure if this is intended behavior, but when I use getFollowers("userId", AdditionalParameters.builder().recursiveCall(false).build() ) the UserList returned contains null for that data field.
If I exclude the AdditionalParameters the data field is an empty ArrayList.
The user I'm specifying doesn't have any followers.