https://github.com/ableco/fifteen_five
FifteenFive is a simple interface to help connect your application to the 15Five API.
https://github.com/ableco/fifteen_five
Last synced: about 1 month ago
JSON representation
FifteenFive is a simple interface to help connect your application to the 15Five API.
- Host: GitHub
- URL: https://github.com/ableco/fifteen_five
- Owner: ableco
- Created: 2018-05-28T19:51:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T19:35:30.000Z (almost 8 years ago)
- Last Synced: 2025-12-29T19:37:40.508Z (5 months ago)
- Language: Ruby
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# FifteenFive
A simple Ruby interface to the [15Five API](https://my.15five.com/api/public/).
## Overview
This gem creates a Rails-friendly interface with the [15Five API](https://my.15five.com/api/public/)
using the [Her gem](https://github.com/remiprev/her).
Her provides a lot of ActiveResource-like functionality out of the box:
```ruby
FifteenFive::User.all.to_a
# => [#, ...]
FifteenFive::User.find(6243)
# => #
```
## Limitations
* To maximize the use of Her, Her's `Association` class has been monkey-patched
because 15Five's API is not truly RESTful :( This patch is de-facto fickle.
* The `FifteenFive::ApiSupport::ResponseParser` is hack-y, primarily because
the 15Five API is inconsistent.
* Some methods added by Her (e.g. `Report.new().create`) will attempt to hit
the API even though those endpoints do not exist.
* Although `BulkUserImport` and `Hello` models have been stubbed out, due to
their non-RESTful quality, those models don't _do_ anything yet.
* Tests are non-existent.
## Road to v1.0
* [ ] Determine whether there's a better way to achieve associations via Her
without the need for a monkey patch.
* [ ] Implement `BulkUserImport` and `Hello` models.
* [ ] Squash methods provided by Her that are not applicable and/or available
via the 15Five API.
* [ ] Add test coverage.
* [ ] Flesh out Contribution guidelines.
## Installation (Rails)
Add the gem to your Gemfile:
```ruby
gem "fifteen_five", git: "https://github.com/ableco/fifteen_five.git", tag: "v0.2.1"
```
Create an initializer, providing your API key:
```ruby
require "fifteen_five"
FifteenFive.logger = Rails.logger
FifteenFive.setup(ENV["FIFTEENFIVE_TOKEN"])
```