This repository has been archived by the owner on Mar 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
RDLinkedInEngine.h
77 lines (62 loc) · 2.81 KB
/
RDLinkedInEngine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// RDLinkedInEngine.h
// LinkedInClientLibrary
//
// Created by Sixten Otto on 12/30/09.
// Copyright 2010 Results Direct. All rights reserved.
//
// Significant inspiration and code from MGTwitterEngine by Matt Gemmell
// and the OAuth enhancements to same by Ben Gottlieb
// <http://mattgemmell.com/source#mgtwitterengine>
// <http://github.com/bengottlieb/Twitter-OAuth-iPhone>
//
#import <Foundation/Foundation.h>
#import "RDLinkedInTypes.h"
#import "RDLinkedInEngineDelegate.h"
@class OAConsumer;
@class OAToken;
extern NSString *const RDLinkedInEngineRequestTokenNotification;
extern NSString *const RDLinkedInEngineAccessTokenNotification;
extern NSString *const RDLinkedInEngineTokenInvalidationNotification;
extern NSString *const RDLinkedInEngineAuthFailureNotification;
extern NSString *const RDLinkedInEngineTokenKey;
extern const NSUInteger kRDLinkedInMaxStatusLength;
@interface RDLinkedInEngine : NSObject {
id<RDLinkedInEngineDelegate> rdDelegate;
OAConsumer* rdOAuthConsumer;
OAToken* rdOAuthRequestToken;
OAToken* rdOAuthAccessToken;
NSString* rdOAuthVerifier;
NSMutableDictionary* rdConnections;
}
@property (nonatomic, readonly) BOOL isAuthorized;
@property (nonatomic, readonly) BOOL hasRequestToken;
@property (nonatomic, retain) NSString* verifier;
+ (id)engineWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret delegate:(id<RDLinkedInEngineDelegate>)delegate;
- (id)initWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret delegate:(id<RDLinkedInEngineDelegate>)delegate;
// connection management
- (NSUInteger)numberOfConnections;
- (NSArray *)connectionIdentifiers;
- (void)closeConnectionWithID:(RDLinkedInConnectionID *)identifier;
- (void)closeAllConnections;
// authorization
- (void)requestRequestToken;
- (void)requestAccessToken;
- (void)requestTokenInvalidation;
- (NSURLRequest *)authorizationFormURLRequest;
// API methods
- (RDLinkedInConnectionID *)profileForCurrentUser;
- (RDLinkedInConnectionID *)profileForPersonWithID:(NSString *)memberID;
- (RDLinkedInConnectionID *)updateStatus:(NSString *)newStatus;
/**
* \fn - (RDLinkedInConnectionID *)shareUrl:(NSString *)submittedUrl imageUrl:(NSString *)submittedImageUrl title:(NSString*)title comment:(NSString*)comment
* \brief This method is able to share a content.
* \param NSString* submittedUrl The URL's content
* \param NSString* imageUrl An image that illustrates the content
* \param NSString* title A title that will be shown instead of the URL
* \param NSString* comment A comment which will be like a user status
* \return RDLinkedInConnectionID*
* \see http://developer.linkedin.com/docs/DOC-1212
*/
- (RDLinkedInConnectionID *)shareUrl:(NSString *)submittedUrl imageUrl:(NSString *)submittedImageUrl title:(NSString*)title comment:(NSString*)comment;
@end