about summary refs log tree commit diff stats
path: root/src/user.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-08-06 16:06:12 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-08-06 16:06:12 -0400
commitbc893794c5e7ec1a968c00a8538241278e8c8d34 (patch)
tree0dbf0f46880c7c0ae093707ef7ec8a7b04ebd016 /src/user.cpp
parentb7bb942cadfe3d657895af1557b78acc2559947e (diff)
downloadlibtwittercpp-bc893794c5e7ec1a968c00a8538241278e8c8d34.tar.gz
libtwittercpp-bc893794c5e7ec1a968c00a8538241278e8c8d34.tar.bz2
libtwittercpp-bc893794c5e7ec1a968c00a8538241278e8c8d34.zip
User objects now contain whether the user is protected
Diffstat (limited to 'src/user.cpp')
-rw-r--r--src/user.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/user.cpp b/src/user.cpp index f9b02a1..d2fa592 100644 --- a/src/user.cpp +++ b/src/user.cpp
@@ -4,7 +4,7 @@
4#include "client.h" 4#include "client.h"
5 5
6namespace twitter { 6namespace twitter {
7 7
8 user::user(std::string data) try 8 user::user(std::string data) try
9 : _valid(true) 9 : _valid(true)
10 { 10 {
@@ -12,6 +12,7 @@ namespace twitter {
12 _id = json["id"].get<user_id>(); 12 _id = json["id"].get<user_id>();
13 _screen_name = json["screen_name"].get<std::string>(); 13 _screen_name = json["screen_name"].get<std::string>();
14 _name = json["name"].get<std::string>(); 14 _name = json["name"].get<std::string>();
15 _protected = json["protected"].get<bool>();
15 } catch (const std::invalid_argument& error) 16 } catch (const std::invalid_argument& error)
16 { 17 {
17 std::throw_with_nested(malformed_object("user", data)); 18 std::throw_with_nested(malformed_object("user", data));