Documentation: Added screen_name parameter to get_user method
authorGilead Baggio <gilsedition@gmail.com>
Sun, 3 Oct 2021 09:46:58 +0000 (15:16 +0530)
committerGitHub <noreply@github.com>
Sun, 3 Oct 2021 09:46:58 +0000 (15:16 +0530)
In Getting started section of the documentation, under Models sub-heading, its mentioned as:
user = api.get_user('twitter')
but it returns the error found below:
TypeError: get_user() takes 1 positional argument but 2 were given.

So it would be easier for dummies like me, if its mentioned as
user = api.get_user(screen_name='twitter')
instead.

docs/getting_started.rst

index 90214ce40ec4a526e2055b2cef5b654efffe2557..229f8a4fe4084e47d74e59aac7e6e64931ffc01f 100644 (file)
@@ -50,7 +50,7 @@ from Twitter which we can then use inside our application. For example
 the following code returns to us a User model::
 
    # Get the User object for twitter...
-   user = api.get_user('twitter')
+   user = api.get_user(screen_name='twitter')
 
 Models contain the data and some helper methods which we can then
 use::