Repository is archived
No commit activity in last 3 years
No release in over 3 years
An API client for the Purpose Platform
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.8.4
>= 0
>= 0

Runtime

 Project Readme

porpoise_external_actions

An API client in ruby for the Purpose Platform External Actions API

Build Status

Usage

require 'porpoise_external_actions'

# setup an API client.
client = PorpoiseExternalActions.new(host: 'test.herokuapp.com', username: 'controlshift', password: 'controlshift', movement_id: 'controlshift')

# send an action
response = client.action.create { source: 'foo', role: 'signer', action_slug: "slug", action_language_iso: "en", activity: "action_taken", user: { email: "foo@bar.com"}}

response # is a Farraday::Response object, API always returns an empty body with 201 status.

Exceptions

  • PorpoiseInvalidException - thrown for validation exceptions, when API return 422. Contains error message raw response.
  • PorpoiseException - thrown when endpoint returns 500. Contains error message and raw http response

Purpose API Documentation

https://github.com/PurposeOpen/Platform/wiki/Create-External-Activity-Event