Skip to content

Commit 64db12b

Browse files
committed
Update how to use
1 parent 08d3729 commit 64db12b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ You are done it this step. Let's move forward and check status codes and check u
4949
When you get the result, you can check codes and see what are them. Here is a quick review:
5050

5151
```python
52-
resultObject = result.json()
53-
statCode = result.status_code
52+
statCode = result.status
53+
data = result.data
5454

5555
if (statCode == 200):
5656
print('Authenticated.')
57-
user = resultObject['user']
57+
user = data['user']
5858
else:
59-
print(resultObject['message'])
59+
print(data['message'])
6060
```
6161

6262
Now if your code is 200, it means that you know have user. If it is else, it means your code is 401. For object that returns to you, chesk object below.
@@ -69,7 +69,6 @@ Here let's know about them in deep.
6969

7070
```json
7171
{
72-
"error": 800,
7372
"user": {
7473
"_id": "document id",
7574
"uid": "telegram user id",

0 commit comments

Comments
 (0)