Added profile stats to API
This commit is contained in:
parent
c57088c6c3
commit
ef8d5343e9
2 changed files with 8 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.7.1-dev
|
||||||
|
|
||||||
|
* Adding `messages_count`, `followers_count` and `following_count` to `profile_info` API endpoint (forgot to release).
|
||||||
|
|
||||||
## 0.7.0
|
## 0.7.0
|
||||||
|
|
||||||
* Biggest change: unpacking modules. The single `app.py` file has become an `app` package, with submodules `models.py`, `utils.py`, `filters.py`, `website.py` and `ajax.py`. There is also a new module `api.py`.
|
* Biggest change: unpacking modules. The single `app.py` file has become an `app` package, with submodules `models.py`, `utils.py`, `filters.py`, `website.py` and `ajax.py`. There is also a new module `api.py`.
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,10 @@ def profile_info(self, userid):
|
||||||
"generation": profile.year,
|
"generation": profile.year,
|
||||||
"instagram": profile.instagram,
|
"instagram": profile.instagram,
|
||||||
"facebook": profile.facebook,
|
"facebook": profile.facebook,
|
||||||
"relationships": get_relationship_info(self, user)
|
"relationships": get_relationship_info(self, user),
|
||||||
|
"messages_count": len(user.messages),
|
||||||
|
"followers_count": len(user.followers()),
|
||||||
|
"following_count": len(user.following())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue