{"id":19110075,"url":"https://github.com/hkellaway/hnkwordlookup","last_synced_at":"2026-02-26T12:04:57.815Z","repository":{"id":29173622,"uuid":"32704264","full_name":"hkellaway/HNKWordLookup","owner":"hkellaway","description":"Obj-C lib for English dictionary queries, such as definitions, pronunciations, random words, and Word of the Day :book:","archived":false,"fork":false,"pushed_at":"2016-02-12T17:04:21.000Z","size":4777,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-04-18T18:34:14.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cocoapods.org/pods/HNKWordLookup","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hkellaway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-23T01:14:58.000Z","updated_at":"2019-12-20T06:36:28.000Z","dependencies_parsed_at":"2022-08-17T20:05:10.685Z","dependency_job_id":null,"html_url":"https://github.com/hkellaway/HNKWordLookup","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FHNKWordLookup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FHNKWordLookup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FHNKWordLookup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hkellaway%2FHNKWordLookup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hkellaway","download_url":"https://codeload.github.com/hkellaway/HNKWordLookup/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251778943,"owners_count":21642452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T04:23:31.834Z","updated_at":"2026-02-26T12:04:57.758Z","avatar_url":"https://github.com/hkellaway.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HNKWordLookup\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/HNKWordLookup.svg)](http://cocoapods.org/pods/HNKWordLookup)\n![Objective-C](https://img.shields.io/badge/language-objective--c-blue.svg)\n[![CocoaPods](https://img.shields.io/cocoapods/l/HNKWordLookup.svg)](https://raw.githubusercontent.com/hkellaway/HNKWordLookup/master/LICENSE)\n[![CocoaPods](https://img.shields.io/cocoapods/p/HNKWordLookup.svg)](http://cocoapods.org/pods/HNKWordLookup)\n[![Build Status](https://travis-ci.org/hkellaway/HNKWordLookup.svg?branch=master)](https://travis-ci.org/hkellaway/HNKWordLookup)\n\nHNKWordLookup is a Cocoapod that performs standard English-language dictionary queries, such as definitions, pronunciations, random words, and Word of the Day.\n\n\u003cimg src=\"https://raw.githubusercontent.com/hkellaway/HNKWordLookup/develop/Demo/demo.gif\" title=\"demo gif\" height=\"600\" /\u003e\n\n## Communication\n\n- If you **have found a bug**, _and can provide steps to reliably reproduce it_, [open an issue](https://github.com/hkellaway/HNKWordLookup/issues/new).\n- If you **have a feature request**, [open an issue](https://github.com/hkellaway/HNKWordLookup/issues/new).\n- If you **want to contribute**, [submit a pull request](https://github.com/hkellaway/HNKWordLookup/pulls).\n\n## Getting Started\n\n- [Download HNKWordLookup](https://github.com/hkellaway/HNKWordLookup/archive/master.zip) and try out the included iOS example app\n- Check out the [documentation](http://cocoadocs.org/docsets/HNKWordLookup/) for a more comprehensive look at the classes available in HNKWordLookup\n\n### Installation with CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like HNKWordLookup in your projects. CocoaPods is the preferred way to incorporate HNKWordLookup in your project; if you are unfamiliar with how to install CocoaPods or how create a Podfile, there are many tutorials online.\n\n#### Podfile\n\n```ruby\nplatform :ios, '7.0'\npod \"HNKWordLookup\", \"~\u003e 1.1\"\n```\n\n### API Key\n\nHNKWordLookup uses the [Wordnik API](http://developer.wordnik.com/docs.html) to lookup information. You will need a Wordnik API key in order to use HNKWordLookup.\n\n* Create a [Wordnik](https://www.wordnik.com/signup) account\n* Once activated, find your API key on your [Settings](https://www.wordnik.com/users/edit) page\n\n## Classes\n\n- `HNKLookup`\n- `HNKWordDefinition`\n- `HNKWordPronunciation`\n- `HNKWordOfTheDay`\n\n## Usage\n\n### Setup\n\nRequests cannot be made without first supplying `HNKLookup` with your Wordnik API Key (see [Getting Started](#getting-started)). Once your API key is obtained, you can setup `HNKLookup` for use by calling `sharedInstanceWithAPIKey` (typically within the `AppDelegate`):\n\n```objective-c\n[HNKLookup sharedInstanceWithAPIKey:@\"YOUR_API_KEY\"];\n```\n\nYou should replace `YOUR_API_KEY` with your Wordnik API key.\n\n### Lookups\n\n`HNKLookup` is responsible for handling any lookups of information. Once [Setup](#setup) is complete, lookup requests can be made to `[HNKLookup sharedInstance]`.\n\n#### Looking up `definitions`\n\n```objective-c\n[[HNKLookup sharedInstance] definitionsForWord:@\"center\" completion:^(NSArray *definitions, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n        for (HNKWordDefinition *definition in definitions) {\n\t        NSLog(@\"%@\", definition);\n\t\t}\n    }\n}];\n```\n\n#### Looking up `definitions` with specific `partsOfSpeech`\n\nNote: The `partsOfSpeech` argument can take any number of `HNKWordDefinitionPartOfSpeech` types separated by a `|` symbol.\n\n```objective-c\n[[HNKLookup sharedInstance] definitionsForWord:@\"center\" \n                                 withPartsOfSpeech:HNKWordDefinitionPartOfSpeechNoun | HNKWordDefinitionPartOfSpeechVerbTransitive\n                                        completion:^(NSArray *definitions, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n        for (HNKWordDefinition *definition in definitions) {\n\t        NSLog(@\"%@\", definition);\n\t\t}\n    }\n}];\n```\n\n#### Looking up `pronunciations`\n\n```objective-c\n[[HNKLookup sharedInstance] pronunciationsForWord:@\"orange\" completion:^(NSArray *pronunciations, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n        for (HNKWordPronunciation *pronunciation in pronunciations) {\n\t        NSLog(@\"%@\", pronunciation);\n\t\t}\n    }\n}];\n```\n\n#### Looking up a random word\n\n```objective-c\n[[HNKLookup sharedInstance] randomWordWithCompletion:^(NSString *randomWord, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n\t    NSLog(@\"%@\", randomWord);\n    }\n}];\n```\n\n#### Looking up the `wordOfTheDay`\n\n```objective-c\n[[HNKLookup sharedInstance] wordOfTheDayWithCompletion:^(HNKWordOfTheDay *wordOfTheDay, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n\t\tNSLog(@\"%@\", wordOfTheDay);\n    }\n}];\n```\n\n#### Looking up the `wordOfTheDay` for a specific `date`\n\n```objective-c\n[[HNKLookup sharedInstance] wordOfTheDayForDate:[NSDate date] completion:^(HNKWordOfTheDay *wordOfTheDay, NSError *error) {\n    if (error) {\n        NSLog(@\"ERROR: %@\", error);\n    } else {\n\t\tNSLog(@\"%@\", wordOfTheDay);\n    }\n}];\n```\n\n## Delegate Methods\n\nDelegate methods are available to classes that implement the `HNKLookupDelegate` protocol.\n\n#### Optional Delegate Methods\n\n##### `(BOOL)shouldDisplayNetworkActivityIndicator`\n\nThe return value of this method determines whether the activity indicator in the status bar is displayed while `HNKLookup` makes network requests. The default is `NO`.\n\nTo have the activity indicator displayed, the class that implements the `HNKLookupDelegate` protocol should include the following method call:\n\n```objective-c\n- (BOOL)shouldDisplayNetworkActivityIndicator {\n  return YES;\n}\n```\n\n## Credits\n\nHNKWordLookup was created by [Harlan Kellaway](http://harlankellaway.com) and uses the [Wordnik API](http://developer.wordnik.com/docs.html).\n\n## License\n\nHNKWordLookup is available under the MIT license. See the [LICENSE](https://raw.githubusercontent.com/hkellaway/HNKWordLookup/master/LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkellaway%2Fhnkwordlookup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhkellaway%2Fhnkwordlookup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhkellaway%2Fhnkwordlookup/lists"}