The User.prototype.get function is broken for queries with particular usernames.
For example, if try to get the user "abcd" and there are multiple usernames which begin with "abcd", the function will return 'false'.
Also, the data returned from this query is not the same as querying for a user with a supplied id.
After supplying an id, you get more data, such as the media and follower counts, which does not happen if you search for a user with a given name/string.
The function, as it is now, will go through the results and look for an exact match between the supplied username and the users in the result set and then query the API again with the user's id, after finding a match.
The User.prototype.get function is broken for queries with particular usernames. For example, if try to get the user "abcd" and there are multiple usernames which begin with "abcd", the function will return 'false'.
Also, the data returned from this query is not the same as querying for a user with a supplied id. After supplying an id, you get more data, such as the media and follower counts, which does not happen if you search for a user with a given name/string.
The function, as it is now, will go through the results and look for an exact match between the supplied username and the users in the result set and then query the API again with the user's id, after finding a match.