MRFriend Class Reference
| Inherits from | NSObject | 
|---|---|
| Conforms to | MRAnnotation | 
| Declared in | MRFriend.h | 
+ getFriendWithKey:session:completion:
	User’s key
+ (NSOperation *)getFriendWithKey:(MREditorKey *)key session:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( MRFriend *_Nullable friend_ , NSError *_Nullable error ))completionParameters
key | 
						User’s key  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with an MRFriend or an error  | 
					
Declared In
MRFriend.h
+ getAllFriendsWithSession:completion:
	Session to authenticate with
+ (NSOperation *)getAllFriendsWithSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( NSArray<MRFriend*> *_Nullable friends , NSError *_Nullable error ))completionParameters
session | 
						Session to authenticate with  | 
					
|---|---|
completion | 
						Block to be called upon completion with an array of MRFriend or an error  | 
					
Declared In
MRFriend.h
+ removeFriendWithKey:session:completion:
	The key of the user to unfriend
+ (NSOperation *)removeFriendWithKey:(MREditorKey *)friend_ session:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionParameters
friend_ | 
						The key of the user to unfriend  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with an array of MRFriend or an error  | 
					
Declared In
MRFriend.h
– updateName:withSession:completion:
	Name to set on object
- (NSOperation *)updateName:(NSString *)name withSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( MRFriend *_Nullable friend_ , NSError *_Nullable error ))completionParameters
name | 
						Name to set on object  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with an updated MRFriend or an error  | 
					
Declared In
MRFriend.h
– updateLocationAndFriends:withSession:completion:
	Location to set on object
- (NSOperation *)updateLocationAndFriends:(nullable MRLocation *)location withSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( NSError *_Nullable error ))completionParameters
location | 
						Location to set on object  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion or an error  | 
					
Declared In
MRFriend.h
– updateLocation:withSession:completion:
	Location to set on object
- (NSOperation *)updateLocation:(MRLocation *)location withSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( MRFriend *_Nullable friend_ , NSError *_Nullable error ))completionParameters
location | 
						Location to set on object  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with an updated MRFriend or an error  | 
					
Declared In
MRFriend.h
– updateLocation:mapOffset:withSession:completion:
	Identifier of the Meridian map containing this location
- (NSOperation *)updateLocation:(MREditorKey *)mapKey mapOffset:(CGPoint)offset withSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( MRFriend *_Nullable friend_ , NSError *_Nullable error ))completionParameters
mapKey | 
						Identifier of the Meridian map containing this location  | 
					
|---|---|
offset | 
						coordinate offset of this location, as related to the Meridian map represented by the   | 
					
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with an updated MRFriend or an error  | 
					
Declared In
MRFriend.h
– disableSharingWithSession:completion:
	Session to authenticate with
- (NSOperation *)disableSharingWithSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( MRFriend *_Nullable friend_ , NSError *_Nullable error ))completionParameters
session | 
						Session to authenticate with  | 
					
|---|---|
completion | 
						Block to be called upon completion with an updated MRFriend or an error  | 
					
Declared In
MRFriend.h
– uploadImage:withSession:completion:
	Profile image to set on object
- (NSOperation *)uploadImage:(UIImage *)image withSession:(MRSharingSession *)session completion:(void ( ^ _Nullable ) ( NSURL *_Nullable imageURL , NSError *_Nullable error ))completionParameters
image | 
						Profile image to set on object  | 
					
|---|---|
session | 
						Session to authenticate with  | 
					
completion | 
						Block to be called upon completion with a profile image URL or an error  | 
					
Declared In
MRFriend.h
  key
	The friend’s identifier.
@property (nonatomic, strong, nullable) MREditorKey *keyDeclared In
MRFriend.h
  imageURL
	URL to the friend’s profile image.
@property (nonatomic, strong, nullable) NSURL *imageURLDeclared In
MRFriend.h
  location
	The friend’s last known location.
@property (nonatomic, strong, nullable) MRLocation *locationDeclared In
MRFriend.h
  travelTime
	Travel time from the authenticated user to friend in seconds. Value is nil if no friend location or no user location.
@property (nonatomic, strong, nullable) NSNumber *travelTimeDeclared In
MRFriend.h
  travelDistance
	Travel time from the authenticated user to friend in meters. Value is nil if no friend location or no user location.
@property (nonatomic, strong, nullable) NSNumber *travelDistanceDeclared In
MRFriend.h
  sharing
	Whether the user is sharing their location.
@property (nonatomic, assign) BOOL sharingDeclared In
MRFriend.h