Inherits from AFHTTPSessionManager
Declared in HNKHttpSessionManager.h

Tasks

Class Methods

definitionsForWord:completion:

+ (NSUInteger)definitionsForWord:(NSString *)word completion:(void ( ^ ) ( NSURLSessionDataTask *task , id responseObject , NSError *error ))completion
Discussion

Retrieves definitions object notation

Parameters

word

Word to be defined

completion

A block to be executed when the request finishes

Return Value

Identifier for the data task used in the request

Declared In

HNKHttpSessionManager.h

displayActivityIndicator:

+ (void)displayActivityIndicator:(BOOL)shouldDisplayActivityIndicator
Discussion

Updates whether the system activity indicator should be displayed during requests

Declared In

HNKHttpSessionManager.h

pronunciationsForWord:completion:

+ (NSUInteger)pronunciationsForWord:(NSString *)word completion:(void ( ^ ) ( NSURLSessionDataTask *task , id responseObject , NSError *error ))completion
Discussion

Retrieves pronunciation object notation

Parameters

word

Word to retrieve pronunciations for

completion

A block to be executed when the request finishes

Return Value

Identifier for the data task used in the request

Declared In

HNKHttpSessionManager.h

randomWordWithCompletion:

+ (NSUInteger)randomWordWithCompletion:(void ( ^ ) ( NSURLSessionDataTask *task , id responseObject , NSError *error ))completion
Discussion

Retrieves a random word

Parameters

completion

A block to be executed when the request finishes

Return Value

Identifier for the data task used in the request

Declared In

HNKHttpSessionManager.h

setupSharedManager:apiKey:

+ (void)setupSharedManager:(NSURL *)url apiKey:(NSString *)apiKey
Discussion

Initializes the HNKHttpSessionManager singleton with a given URL

Parameters

url

A URL to be used as the base URL for all requests

apiKey

API key to be used for all requests

Declared In

HNKHttpSessionManager.h

wordOfTheDayForDate:completion:

+ (NSUInteger)wordOfTheDayForDate:(NSDate *)date completion:(void ( ^ ) ( NSURLSessionDataTask *task , id responseObject , NSError *error ))completion
Discussion

Retrieves Word of the Day object notation

Parameters

date

Date for which to retrieve the Word of the Day

completion

A block to be executed when the request finishes

Return Value

Identifier for the data task used in the request

Declared In

HNKHttpSessionManager.h