This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
/
iFixitAPI.h
48 lines (38 loc) · 2.02 KB
/
iFixitAPI.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
//
// iFixitAPI.h
// iFixit
//
// Created by David Patierno on 8/6/10.
// Copyright 2010 iFixit. All rights reserved.
//
@class User;
@interface iFixitAPI : NSObject
@property (nonatomic, retain) User *user;
@property (nonatomic, retain) NSString *appId;
@property (nonatomic, retain) NSString *userAgent;
+ (iFixitAPI *)sharedInstance;
// Anonymous
- (void)getSitesWithLimit:(NSUInteger)limit andOffset:(NSUInteger)offset forObject:(id)object withSelector:(SEL)selector;
- (void)getCollectionsWithLimit:(NSUInteger)limit andOffset:(NSUInteger)offset forObject:(id)object withSelector:(SEL)selector;
- (void)getGuide:(NSNumber *)iGuideid forObject:(id)object withSelector:(SEL)selector;
- (void)getCategoriesForObject:(id)object withSelector:(SEL)selector;
- (void)getGuides:(NSString *)type forObject:(id)object withSelector:(SEL)selector;
- (void)getGuidesByIds:(NSArray *)guideids forObject:(id)object withSelector:(SEL)selector;
- (void)getSearchResults:(NSString *)search withFilter:(NSString *)filter forObject:(id)object withSelector:(SEL)selector;
- (void)getCategory:(NSString *)category forObject:(id)object withSelector:(SEL)selector;
- (void)getSiteInfoForObject:(id)object withSelector:(SEL)selector;
// Session management
- (void)loginWithSessionId:(NSString *)sessionId forObject:(id)object withSelector:(SEL)selector;
- (void)loginWithLogin:(NSString *)login andPassword:(NSString *)password forObject:(id)object withSelector:(SEL)selector;
- (void)registerWithLogin:(NSString *)login andPassword:(NSString *)password andName:(NSString *)name forObject:(id)object withSelector:(SEL)selector;
- (void)logout;
// Authenticated
- (void)getUserFavoritesForObject:(id)object withSelector:(SEL)selector;
- (void)like:(NSNumber *)iGuideid forObject:(id)object withSelector:(SEL)selector;
- (void)unlike:(NSNumber *)iGuideid forObject:(id)object withSelector:(SEL)selector;
- (void)loadSession;
// Error handling
+ (void)displayConnectionErrorAlert;
// Authentication Handeling
+ (void)checkCredentialsForViewController:(id)viewController;
@end