luna_api 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ module LunaApi
2
+ class Sale < OpenStruct
3
+ URL = "http://luna-data.herokuapp.com/transactions"
4
+ def self.all
5
+ response = Typhoeus::Request.get(URL)
6
+ sales = JSON.parse(response.body)
7
+ end
8
+
9
+ def self.create(attrs)
10
+ response = Typhoeus::Request.post(URL, params: attrs)
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module LunaApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/luna_api.rb CHANGED
@@ -8,3 +8,4 @@ end
8
8
 
9
9
  require "luna_api/store"
10
10
  require "luna_api/todo"
11
+ require "luna_api/sale"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luna_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-22 00:00:00.000000000 Z
12
+ date: 2013-01-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: typhoeus
@@ -40,6 +40,7 @@ files:
40
40
  - README.md
41
41
  - Rakefile
42
42
  - lib/luna_api.rb
43
+ - lib/luna_api/sale.rb
43
44
  - lib/luna_api/store.rb
44
45
  - lib/luna_api/todo.rb
45
46
  - lib/luna_api/version.rb