Project

badgeapi

0.0
No commit activity in last 3 years
No release in over 3 years
The badgeapi gem provides Ruby bindings for the Lancaster University Badge API platform. It allows for quicker and easier access, insertion and consumption of data from the API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 5.5
~> 10.0
~> 2.9
~> 1.20

Runtime

~> 0.9
~> 1.8
 Project Readme

Lancaster University Badge API Gem Gem Version

The badgeapi gem provides Ruby bindings for the Lancaster University Badge API platform. It allows for quicker and easier access, insertion and consumption of data from the API.

Documentation

You can find API documentation and examples of how to use this gem at the Badge API Docs.

Requirements

Your application will need to make request via SSL/HTTPS. If you are developing locally the rechampoulier/tunnelss can be used but you will need to follow the Certificate Authority Fix below.

Installation

Add this line to your application's Gemfile:

gem badgeapi

And then execute:

$ bundle

Or install it yourself as:

$ gem install badgeapi

You will need to provide your api key to the gem:

Badgeapi.api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Certificate Authority Fix

The gem relies on Faraday to make the http requests to the API. If you get get any Farday SSL errors, this is because Farday cannot find your CA Certificate. More info at Faraday: Setting up SSL certificates.

Once you know the location of your CA certificates path your can provide this to the gem via:

Badgeapi.ssl_ca_cert='/usr/lib/ssl/certs'

If using rechampoulier/tunnelss for local development.

Badgeapi.ssl_ca_cert='/Users/your_user/.tunnelss/ca/cert.pem'

Development

Use the gems console:

$ rake console

Run all tests:

$ bundle exec rake

Run a single test suite:

$ruby test/badge/badge_test.rb