// // NYTUser.h // Notifications for YouTube // // Created by Kim Wittenburg on 18.06.13. // Copyright (c) 2013 Kim Wittenburg. All rights reserved. // /* A NYTUser represents a user or a channel on YouTube. */ @interface NYTUser : NSObject #pragma mark *** Properties *** /* The display name of the user. Always use this property if you need to display a name to the user. This name is NOT unique. Use the userID or the channelID to uniquely identify a user or a channel respectively. */ @property (readonly) NSString *displayName; /* Uniquely identifies a user. Every user on youtube has a unique user id. */ @property (readonly) NSString *userID; /* Uniquely identifies a channel. Not every user has a channel. The channel id is always exactly the user id prefixed by @"UC". */ @property (readonly) NSString *channelID; /* The textual summary of the channel. This is sometimes referred to as the channel's description. You should display this in combination with the display name to the user to help him identify the channel he wants. */ @property (readonly) NSString *summary; /* The image URL is a network URL pointing to an image resource that is the user's image. */ @property (readonly) NSURL *imageURL; #pragma mark *** Initialization *** /* Parses a user from its profile page ("https://gdata.youtube.com/feeds/api/users/default"). Initializes displayName, userID, channelID and summary. */ - (id)initWithUserProfilePage:(NSXMLNode *)node; /* Parses a user from its subscription entry (e.g. "https://gdata.youtube.com/feeds/api/users/default/subscriptions"). Initializes displayNamem, userID, channelID and imageURL */ - (id)initWithSubscriptionEntry:(NSXMLNode *)entry; - (BOOL)isEqual:(id)object; - (BOOL)isEqualToUser:(NYTUser *)user; @end