Git Product home page Git Product logo

fullcontact-objc's Introduction

fullcontact-objc

Ever wanted to call FullContact's API from your own iOS or OS X application? Now you can.

fullcontact-objc is a library for iOS and Mac OS X. It's built on top of AFNetworking and provides connectivity to the FullContact Developer API endpoints.

###Why we love it… fullcontact-objc makes it painless to access the FullContact Developer API in your iOS or Mac OS X apps - in fact, we use it ourselves in our own apps such as FullContact Card Reader.

Currently this library has support for the following FullContact endpoints:

Endpoint What it Does Documentation Supported in
Person API Returns social profile data from an email address, phone number, Twitter handle, or Facebook ID Person API FCAPI+Person.h
Name API Normalize, parse, compare, and deduce names from an email address or other source Name API FCAPI+Name.h
Location API Normalizes and provides related info for semi-structured location data Location API FCAPI+Location.h
Card Reader API Returns human-transcribed, structured contact data from an image of a business card Card Reader API FCAPI+CardReader.h
Disposable Email API Detects disposable and sub-addressed email addresses Disposable Email API FCAPI+Email.h
Icon API Returns free social media icons via an HTTPS request Icon API FCAPI+Icon.h
Batch Process API Batch several API requests into a single request to improve performance Batch Process API FCAPI+Batch.h
Stats API View and keep track of your FullContact API account usage Stats API FCAPI+Stats.h

Requirements

fullcontact-objc requires either iOS 5.0 and above, or Mac OS 10.7 (64-bit with modern Cocoa runtime) and above.

###Installation CocoaPods is the recommended way to add fullcontact-objc to your project.

  1. Add a pod entry for fullcontact-objc to your Podfile pod 'fullcontact-objc', '~> 1.0.0'
  2. Install the pod(s) by running pod install.
  3. Include fullcontact-objc wherever you need it with #import "FCAPI.h" or any of it's subcategories.

ARC

fullcontact-objc uses ARC.

If you are using fullcontact-objc in your non-arc project, you will need to set a -fobjc-arc compiler flag on all of the source files.

To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all fullcontact-objc source files, press Enter, insert -fobjc-arc and then "Done" to enable ARC for fullcontact-objc.

Using the Library

Initializing the API

To initialize the API, simply import FCAPI.h. Ensure you have the following constants defined:

  1. kAPIUrl is "https://api.fullcontact.com"
  2. kAPIVersion is "v2"
  3. kAPIKey is the API Key that you obtained from FullContact.

Then call:

FCAPI *api = [[FCAPI alloc] initWithBaseURL:[NSURL URLWithString:kAPIUrl] andVersion:kAPIVersion andAPIKey:kAPIKey];

Calling the API

To use the API after it is initialized, simply import the category that you wish to use and invoke one of the methods. For example, if you'd like to look up a person by their email address you could do the following:

Add the following to your imports:

#import "FCAPI+Person.h"

After initializing your API instance, call the lookupByEmail method as follows:

[api lookupByEmail:@"[email protected]" success:^(FCResponse *response) {
      //response.response will contain your JSON payload which you can handle here
} 
failure:^(FCResponse *response, NSError *error) {
      //handle the error that may have been returned
}];

Running Tests

To run fullcontact-objcTest, simply locate the TestContstants.h file in the fullcontact-objcTest project and insert your API key as the value for kAPIKey. After doing this you can run tests for both iOS and OSX architectures.

Note that Card Reader tests only function for the iOS platform at this time.

##Need Help - No Problem! We're always available to help in any way we can. Check out our Support Page to access our Knowledge Base or contact our Support group.

##Got an Idea? We love ideas! Submit your ideas, suggestions, or feedback on our API Developer Forum or fork our repo. We review pull requests regularly and look forward to seeing what you come up with!

License

fullcontact-objc is available under the Apache License Version 2.0 license. See the LICENSE file for more info.

Bitdeli Badge

fullcontact-objc's People

Watchers

James Cloos avatar MXLink avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.