mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00

git-subtree-dir: submodules/LegacyComponents git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9 git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
43 lines
1.2 KiB
Objective-C
Executable File
43 lines
1.2 KiB
Objective-C
Executable File
//
|
|
// CBCoubAuthorVO.m
|
|
// Coub
|
|
//
|
|
// Created by Tikhonenko Pavel on 21/11/2013.
|
|
// Copyright (c) 2013 Coub. All rights reserved.
|
|
//
|
|
|
|
#import "CBCoubAuthorVO.h"
|
|
|
|
@implementation CBCoubAuthorVO
|
|
|
|
+ (CBCoubAuthorVO *)coubAuthorWithAttributes:(NSDictionary *)attributes
|
|
{
|
|
CBCoubAuthorVO *author = [CBCoubAuthorVO new];
|
|
author.avatarURL = attributes[@"avatar"];
|
|
author.largeAvatarURL = attributes[@"large_avatar"];
|
|
author.followersCount = [attributes[@"followers_count"] integerValue];
|
|
author.userId = [attributes[@"id"] stringValue];
|
|
author.name = attributes[@"name"];
|
|
author.permalink = attributes[@"permalink"];
|
|
author.viewsCount = [attributes[@"views_count"] integerValue];
|
|
//author.viewsCount;
|
|
return author;
|
|
}
|
|
|
|
//+ (CBCoubAuthorVO *)currentUser
|
|
//{
|
|
// CBUserNew *curUser = [CBUserNew currentUser];
|
|
//
|
|
// CBCoubAuthorVO *author = [CBCoubAuthorVO new];
|
|
// author.avatarURL = curUser.mediumAvatar;
|
|
// author.largeAvatarURL = curUser.largeAvatar;
|
|
// author.followersCount = curUser.followerCount;
|
|
// author.userId = curUser.coubID;
|
|
// author.name = curUser.fullName;
|
|
// author.permalink = curUser.permalink;
|
|
// author.viewsCount = curUser.viewsCount;
|
|
// return author;
|
|
//}
|
|
|
|
@end
|