Project

t2_airtime

0.0
No commit activity in last 3 years
No release in over 3 years
Wrapper methods to interface with [TransferTo](https://www.transfer-to.com/home) Airtime API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

Runtime

= 2.1.2
>= 2.2.1, ~> 2.2
= 0.9.1
~> 5.1.4
 Project Readme

Build Status Gem Version GitHub version Dependency Status Code Climate

t2-airtime

T2-Airtime client, t2_airtime.

T2-Airtime is a Ruby gem providing a proxy cache and a REST API to TransferTo Airtime service.

Installation

Install as a Ruby gem

gem install t2_airtime

Setup Transfer-To credentials

  1. Make sure you are a registered user of Transfer-To.
  2. Enable Two Factor Authentication (2FA) in your Transfer-To Shop Security Center section
  3. Retrieve API key (token) created by Transfer-To Shop.
  4. Export your secrets as an environment variables:
export T2_SHOP_USER=<your_username>
export T2_AIRTIME_KEY=<your_token>
  1. Export the host allowed to access the API (CORS):
export CORS_ORIGIN=<your_frontend_address>
  1. Export your API secrets:
export API_KEY=<t2_airtime_key>
export API_TOKEN=<t2_airtime_token>

Using Docker

  1. Download image:
docker pull voxbox/t2_airtime
  1. Export your secrets in env (see previous step)

  2. Run:

docker run -d \
  --name t2_airtime \
  -p 3000:3000 \
  -e T2_SHOP_USER \
  -e T2_AIRTIME_KEY \
  -e API_KEY \
  -e API_TOKEN \
  -e CORS_ORIGIN \
  voxbox/t2_airtime

Development

  1. If needed, install bundler:

    $ gem install bundler
  2. Clone the repo:

    $ git clone git@github.com:matteolc/t2_airtime.git
    $ cd t2_airtime
  3. Install dependencies:

    $ bundle install

Test

Inside the t2_airtime repository directory run:

$ bundle exec rspec

To start a development server:

$ cd spec/dummy
$ puma -C config/puma.rb

License

Copyright 2015-17 (c) Matteo La Cognata

Released under MIT license. See LICENSE file for further details.