Inherits from NSObject
Declared in HNKLookup.h

Tasks

Properties

delegate

@property (nonatomic, weak) id<HNKLookupDelegate> delegate

Class Methods

sharedInstance

+ (instancetype)sharedInstance
Discussion

Returns shared HNKLookup instance

Should only be called after sharedInstanceWithAPIKey:

Declared In

HNKLookup.h

sharedInstanceWithAPIKey:

+ (instancetype)sharedInstanceWithAPIKey:(NSString *)apiKey
Discussion

Sets up shared HNKLookup instance with provided API key

Declared In

HNKLookup.h

Instance Methods

definitionsForWord:completion:

- (NSUInteger)definitionsForWord:(NSString *)word completion:(void ( ^ ) ( NSArray *definitions , NSError *error ))completion
Discussion

Retrieves an array of definitions

Parameters

word

Word to be defined

completion

A block to be executed when the request finishes

Return Value

Identifier for this request

Declared In

HNKLookup.h

definitionsForWord:withPartsOfSpeech:completion:

- (NSUInteger)definitionsForWord:(NSString *)word withPartsOfSpeech:(HNKWordDefinitionPartOfSpeech)partOfSpeech completion:(void ( ^ ) ( NSArray *definitions , NSError *error ))completion
Discussion

Retrieves an array of definitions with only the specified part of speech

Parameters

word

Word to be defined

completion

A block to be executed when the request finishes

partsOfSpeech

Parts of speech the definitions can be

Return Value

Identifier for this request

Declared In

HNKLookup.h

pronunciationsForWord:completion:

- (NSUInteger)pronunciationsForWord:(NSString *)word completion:(void ( ^ ) ( NSArray *pronunciations , NSError *error ))completion
Discussion

Retrieves an array of pronunciations

Parameters

word

Word to retrieve pronunciations for

completion

A block to be executed when the request finishes

Return Value

Identifier for this request

Declared In

HNKLookup.h

randomWordWithCompletion:

- (NSUInteger)randomWordWithCompletion:(void ( ^ ) ( NSString *randomWord , NSError *error ))completion
Discussion

Retrieves a random word

Parameters

completion

A block to be executed when the request finishes

Return Value

Identifier for this request

Declared In

HNKLookup.h

wordOfTheDayForDate:completion:

- (NSUInteger)wordOfTheDayForDate:(NSDate *)date completion:(void ( ^ ) ( HNKWordOfTheDay *wordOfTheDay , NSError *error ))completion
Discussion

Retrieves the Word of the Day for a given date

Parameters

date

Date for which to fetch the Word of the Day

completion

A block to be executed when the request finishes

Return Value

Identifier for this request

Declared In

HNKLookup.h

wordOfTheDayWithCompletion:

- (NSUInteger)wordOfTheDayWithCompletion:(void ( ^ ) ( HNKWordOfTheDay *wordOfTheDay , NSError *error ))completion
Discussion

Retrieves the Word of the Day

Parameters

completion

A block to be executed when the request finishes

Return Value

Identifier for this request

Declared In

HNKLookup.h