2017 © Pedro Peláez
 

library f1

Utilizes 2nd Party authentication to work with FellowshipOne's API

image

schplay/f1

Utilizes 2nd Party authentication to work with FellowshipOne's API

  • Sunday, June 8, 2014
  • by schplay
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Fellowship One API

Interacting with Fellowship One

This package provides 2nd Party, and Vendor to Vendor authentication and the ability to make GET, POST, and PUT requests. You must build your own package/controllers to actually interact with Fellowship One data., (*1)

For 2nd party authorization, before starting, you need to have a "Portal User" account that is linked to a specific user in your Fellowship One database. You also must have a 2nd Party Application enabled in your church's Fellowship One admin section., (*2)

Installation

Service Provider

Add the following to your service provider array, (*3)

Schplay\F1\F1ServiceProvider

Configuration

Copy the configuration file, (*4)

php artisan config:publish schplay/f1

Set the appropriate credentials and base URLs., (*5)

Usage

In any class, add use F1; before the class declaration., (*6)

If using 3rd party or vendor to vendor authorization, you then need to dynamically set the base url and api secret using the Config class., (*7)

The builtin F1 façade uses Guzzle's HTTP Client + OauthPlugin to make the requests. Consult their documentation for building requests and handling responses., (*8)

For example, create a request to Fellowship One's API by using the appropriate endpoint and format:, (*9)

$request = F1::get('v1/people/statuses.json')->send();

Using Guzzle, there are multiple ways to handle the response:, (*10)

$response = $request->getBody(true);

Or, use Guzzle's built in json() method:, (*11)

$response = $request->json();

Check Guzzle's documentation for more help (including leveraging Exceptions, etc)., (*12)

Questions: @avr, (*13)

The Versions

08/06 2014

dev-master

9999999-dev

Utilizes 2nd Party authentication to work with FellowshipOne's API

  Sources   Download

The Requires

 

by David Myers
by Aaron Van Ruler