Search code examples
twitter-bootstraptwittertwitter-rest-api

How to get Fields and Field types in twitter REST API


How to get a field list and their types of the result of the Twitter REST API? Forexample, Fields of the following twitter REST API is

https://api.twitter.com/1.1/users/show.json?screen_name=sachin_rt

Screen Name,Id,Location,followers count,friends count,created date etc... I was able to get entire fields with value,But my target is to get only field name and it's type(data type)


Solution

  • There is Twitter documentation for the entities it returns. In the example above, the users/show endpoint is here:

    https://dev.twitter.com/rest/reference/get/users/show

    and on that page, you'll find a link to the User entity, which is here:

    https://dev.twitter.com/overview/api/users