Project

tincan-api

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby gem for the TinCan Storage API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

Gem Version Build Status Code Climate Score Code Climate Coverage License

Installation

From Ruby Gems

gem install tincan-api

From Github

git clone https://github.com/XD6Code/tincan-gem.git
cd tincan-gem
gem build tincan-api.gemspec
gem install tincan-api-*.gem

Usage

Demo queries can be found on the TinCan Storage API demo page, however in the ruby gem they can be inputted as a Hash or JSON.

Example Query (Hash): {:query => {:key => "value"}, :options => {:count => true}}

Example Query (JSON): '{"key":"value"}'

require "tincan"

demo = TinCan.new("APP_ID", "APP_KEY", "APP_NAME")

demo.validate      #=> Returns True or an Error
demo.insert(query) #=> Returns true if successful
demo.find(query)   #=> Returns data if successful
demo.update(query) #=> Returns true if successful
demo.remove(query) #=> returns true if successful

Testing

Testing is done with RSpec for now.

gem install rspec
cd /path/to/downloaded/repo
rspec spec

To get a better output of what it's doing (Get told what it's doing rather than dots):

rspec spec --format documentation