mirror of
https://github.com/danog/Telegram.git
synced 2024-12-04 02:17:51 +01:00
30 lines
679 B
Mathematica
30 lines
679 B
Mathematica
|
#import "TGInstagramDataContentProperty.h"
|
||
|
|
||
|
#import "PSKeyValueCoder.h"
|
||
|
|
||
|
@implementation TGInstagramDataContentProperty
|
||
|
|
||
|
- (instancetype)initWithImageUrl:(NSString *)imageUrl mediaId:(NSString *)mediaId
|
||
|
{
|
||
|
self = [super init];
|
||
|
if (self != nil)
|
||
|
{
|
||
|
_imageUrl = imageUrl;
|
||
|
_mediaId = mediaId;
|
||
|
}
|
||
|
return self;
|
||
|
}
|
||
|
|
||
|
- (instancetype)initWithKeyValueCoder:(PSKeyValueCoder *)coder
|
||
|
{
|
||
|
return [self initWithImageUrl:[coder decodeStringForCKey:"u"] mediaId:[coder decodeStringForCKey:"m"]];
|
||
|
}
|
||
|
|
||
|
- (void)encodeWithKeyValueCoder:(PSKeyValueCoder *)coder
|
||
|
{
|
||
|
[coder encodeString:_imageUrl forCKey:"u"];
|
||
|
[coder encodeString:_mediaId forCKey:"m"];
|
||
|
}
|
||
|
|
||
|
@end
|