-
Notifications
You must be signed in to change notification settings - Fork 2
/
AnswerBuilder.h
39 lines (31 loc) · 1.04 KB
/
AnswerBuilder.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
//
// AnswerBuilder.h
// BrowseOverflow
//
// Created by Graham Lee on 25/04/2011.
// Copyright 2011 Fuzzy Aliens Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class Question;
/**
* Constructing Answer objects from data sent by the Stack Overflow site.
* @see Answer
*/
@interface AnswerBuilder : NSObject {
}
/**
* Populate a question object with the answers
* supplied by the Stack Overflow web service.
* @param question The question to which answers are required.
* @param objectNotation The data containing the answer content.
* @param error A by-reference error return.
* @return YES if answers are successfully parsed, otherwise NO and error is filled to describe the problem.
* @note If the data is valid but there are no answers to add, this is not an error.
*/
- (BOOL)addAnswersToQuestion: (Question *)question fromJSON: (NSString *)objectNotation error: (NSError **)error;
@end
extern NSString *AnswerBuilderErrorDomain;
enum {
AnswerBuilderErrorInvalidJSONError,
AnswerBuilderErrorMissingDataError,
};