Skip to content

Commit

Permalink
Base for ruby binding
Browse files Browse the repository at this point in the history
  • Loading branch information
02strich committed May 29, 2013
1 parent 763f101 commit 08fe81e
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -11,6 +11,7 @@ spec/reports
test/tmp
test/version_tmp
tmp
Gemfile.lock

# YARD artifacts
.yardoc
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
language: ruby
rvm:
- 1.9.3
- 2.0.0
- jruby-19mode # JRuby in 1.9 mode
- rbx-19mode
5 changes: 5 additions & 0 deletions Gemfile
@@ -0,0 +1,5 @@
source "http://rubygems.org"

gemspec

gem "rake"
41 changes: 39 additions & 2 deletions README.md
@@ -1,4 +1,41 @@
ruby-figo
ruby-figo [![Build Status](https://secure.travis-ci.org/fiog-connect/ruby-figo.png)](https://travis-ci.org/figo-connect/ruby-figo)
=========

Ruby binding for the figo connect API
Ruby bindings for the figo connect API: http://figo.me

Usage
=====

First, you've to install the gem

```bash
gem install figo
```

and require it

```ruby
require "figo"
```

Now you can create a new session and access data:

```ruby
session = Figo::Session.create("ASHWLIkouP2O6_bgA2wWReRhletgWKHYjLqDaqb0LFfamim9RjexTo22ujRIP_cjLiRiSyQXyt2kM1eXU2XLFZQ0Hro15HikJQT_eNeT_9XQ")

# print out a list of accounts including its balance
session.accounts.each do |account|
puts account
puts account.balance
end

# print out the list of all transactions on a specific account
session.get_account("A1.2").transactions do |transaction|
puts transaction
end
```

Requirements
============

This gem requires Ruby 1.9.
8 changes: 8 additions & 0 deletions Rakefile
@@ -0,0 +1,8 @@
require 'rake/testtask'

Rake::TestTask.new do |t|
t.libs << 'test'
end

desc "Run tests"
task :default => :test
18 changes: 18 additions & 0 deletions figo.gemspec
@@ -0,0 +1,18 @@
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = "figo"
s.version = "0.1"
s.authors = ["Stefan Richter", "Michael Haller"]
s.email = ["stefan.richter@figo.me", "michael.haller@figo.me"]
s.homepage = "https://github.com/figo-connect/ruby-figo"
s.summary = %q{API wrapper for figo connect.}
s.description = %q{API wrapper for figo connect.}

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]

s.add_dependency "json"
end
Empty file added lib/figo.rb
Empty file.
6 changes: 6 additions & 0 deletions test/test_figo.rb
@@ -0,0 +1,6 @@
require 'test/unit'
require 'figo'

class FigoTest < Test::Unit::TestCase

end

0 comments on commit 08fe81e

Please sign in to comment.