Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An Objective-C API wrapper for Domainr.
Objective-C
branch: master

Merge pull request #5 from case/patch-3

Update to v1 API endpoint
latest commit 6e8f6e9ad0
@connor authored
Failed to load latest commit information.
Domainr.xcodeproj
JSON
Domainr.h
Domainr.m
Domainr_Prefix.pch
README.md
main.m

README.md

Objective-C Domainr API Wrapper

Usage/Installation

1) Copy the domainr folder into your project.

2) Have a #import Domainr.h in your source code:

#import Domainr.h

3) Instantiate a new instance of the Domainr class:

Domainr *d = [[Domainr alloc] init];

4) Call the appropriate method on the object (search and info are available):

// stores the search result in a searchResult variable
// parameter is (a) keyword(s) passed via string
id searchResult = [d search:@"connor"];

// stores the info result in an infoResult variable
// parameter is a URL passed via a string
id infoResult = [d info:@"cnnr.me"];

Output

The return type of both method calls is an NSDictionary that mirrors the JSON responses Domainr specifies here and here.

Example

I have examples of the method calls in main.m. The easiest way to see this in action is to open the Xcode project up and run it. You will see the log populate with the responses from Domainr.

Todo

  • Make an async version
  • Make an ARC-friendly version

Thanks

A huge thank you to Joshua Russell for his Dribbble API Wrapper, which provided a great starting point for an Objective-C n00b like myself to make this. <3

Something went wrong with that request. Please try again.