Skip to content

Instantly share code, notes, and snippets.

@stoicflame
stoicflame / Main.java
Created March 25, 2015 19:22
Using the FamilySearch Client For OAuth 2 Authorization Code Flow
package org.familysearch.api.client;
import org.gedcomx.rs.client.PersonState;
/**
* @author Ryan Heaton
*/
public class Main {
public static void main(String[] args) {
anonymous
anonymous / gist:4488883
Created January 8, 2013 23:04
Possible interface for a new "familysearch" ruby gem. Please give feedback
require 'familysearch'
# Ways to instantiate a client
# This would start with an access_token and keep it for all requests.
client = FamilySearch::Client.new :env => 'production', :access_token => '{YOUR_ACCESS_TOKEN}', :logger => Logger.new(STDOUT)
# Will probably support Basic Auth through this gem, so we would need the developer key for that
client = FamilySearch::Client.new :host => 'https://sandbox.familysearch.org', :key => '{YOUR_DEV_KEY}', :logger => Logger.new(File.new('log/api.log'))
client = FamilySearch::Client.new :host => 'http://localhost:5000', :key => '{YOUR_DEV_KEY}'