New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

f1api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

f1api

  • 0.10.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Fellowship One REST API Ruby Client Library

Introduction

This library is an implementation of the Fellowship One REST API. The library currently abstracts the ActiveRecord class so it can be used to easily model data from the F1 REST API.

Two Authentication Methods

The F1 REST API uses two methods to authenticate the user to the API: credentials for 2nd party and OAuth for 3rd party. See the F1 API Authentication documentation.

OAuth (2nd or 3rd Party)

The Fellowship One API implements the OAuth v1.0 standard. OAuth allows you to let Fellowship One handle the authentication and pass back the access tokens to a callback URL in your app.

client = FellowshipOneAPI::Client.new
# To be explicit: client = FellowshipOneAPI::Client.new({:auth_type => :oauth})
client.authorize!

Credentials (2nd Party)

To authenticate against the API using credentials the default can be changed in the YAML configuration file or the method of authentication can be explicitly specified on the instantiation of the FellowshipOneAPI::Client class. After that, the credentials of the user you are authenticating needs to be passed into the authorize! method.

client = FellowshipOneAPI::Client.new({:auth_type => :credentials})
client.authorize! "username", "password"

Usage

Install the gem:

gem install f1api

Use it in your code:

require 'f1api'

class Person < FellowshipOneAPI::Base
end

client.authorize!
# If using creds in YAML file:
# client.authorize! "username", "password"

FellowshipOneAPI::Base.connect client

Person.find(12345)
Person.find(:search, :params => {:searchFor => "Dearing", :include => "communications,addresses"})

FAQs

Package last updated on 08 May 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc