SBBSurveyManagerProtocol Protocol Reference

Conforms to SBBBridgeAPIManagerProtocol
Declared in SBBSurveyManager.h

Overview

This protocol defines the interface to the SBBSurveyManager’s non-constructor, non-initializer methods. The interface is abstracted out for use in mock objects for testing, and to allow selecting among multiple implementations at runtime.

– getSurveyByRef:cachingPolicy:completion: required method

Fetch a survey from the Bridge API via an activityRef (href).

- (NSURLSessionTask *)getSurveyByRef:(NSString *)ref cachingPolicy:(SBBCachingPolicy)policy completion:(SBBSurveyManagerGetCompletionBlock)completion

Parameters

ref

The href identifying the desired survey, obtained e.g. from the Schedules or Activities API.

policy

Caching policy to use (ignored if the SDK was initialized with useCache=NO).

completion

An SBBSurveyManagerGetCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBSurveyManager.h

– getSurveyByRef:completion: required method

This is a convenience method that assumes the default caching policy, which is SBBCachingPolicyCheckCacheFirst, if caching is enabled.

- (NSURLSessionTask *)getSurveyByRef:(NSString *)ref completion:(SBBSurveyManagerGetCompletionBlock)completion

Declared In

SBBSurveyManager.h

– getSurveyByGuid:createdOn:cachingPolicy:completion: required method

Fetch a survey from the Bridge API by guid and version number.

- (NSURLSessionTask *)getSurveyByGuid:(NSString *)guid createdOn:(NSDate *)createdOn cachingPolicy:(SBBCachingPolicy)policy completion:(SBBSurveyManagerGetCompletionBlock)completion

Parameters

guid

The survey’s guid.

createdOn

The creation date and time of the version of the survey to fetch.

policy

Caching policy to use (ignored if the SDK was initialized with useCache=NO).

completion

An SBBSurveyManagerGetCompletionBlock to be called upon completion.

Return Value

An NSURLSessionTask object so you can cancel or suspend/resume the request.

Declared In

SBBSurveyManager.h

– getSurveyByGuid:createdOn:completion: required method

This is a convenience method that assumes the default caching policy, which is SBBCachingPolicyCheckCacheFirst, if caching is enabled.

- (NSURLSessionTask *)getSurveyByGuid:(NSString *)guid createdOn:(NSDate *)createdOn completion:(SBBSurveyManagerGetCompletionBlock)completion

Declared In

SBBSurveyManager.h