bamboozled 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Readme.md +14 -0
- data/lib/bamboozled.rb +1 -1
- data/lib/bamboozled/api/meta.rb +14 -0
- data/lib/bamboozled/base.rb +4 -0
- data/lib/bamboozled/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 413da1e61f882da4c661b84e0f2c4931e3a801b9
|
4
|
+
data.tar.gz: 653872c670f8bb189795b0331970ad23ab4f48f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9ffe7eaa01a46b34eaff800e3fdf54c1c5f7b41a0c14b4b687ce5670f0c8368a9f18752fdd2eef3b265e12c4a2e26f17b69efb362741dbcdc87633d82a24bb
|
7
|
+
data.tar.gz: fec918fcd77a836434326718d8e29a49dfab47abd0c90e3010650f2fd46cd047e095f1152c55e77b2cccfc26abbb0ba34471aef80770a18129ac07191370ac8c
|
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -60,6 +60,20 @@ client.time_off.whos_out(Time.now, '2014-12-31')
|
|
60
60
|
client.report.find(report_number, format = 'JSON', fd = true)
|
61
61
|
```
|
62
62
|
|
63
|
+
# Metadata
|
64
|
+
|
65
|
+
```ruby
|
66
|
+
# Get fields
|
67
|
+
client.meta.fields
|
68
|
+
# Get lists
|
69
|
+
client.meta.lists
|
70
|
+
# Get tables
|
71
|
+
client.meta.tables
|
72
|
+
# Get users
|
73
|
+
# Note: this is all uses in the system, whereas client.employee.all only gets active employees
|
74
|
+
client.meta.users
|
75
|
+
```
|
76
|
+
|
63
77
|
## Todo:
|
64
78
|
|
65
79
|
1. Write tests!
|
data/lib/bamboozled.rb
CHANGED
@@ -8,7 +8,7 @@ require 'bamboozled/version'
|
|
8
8
|
require 'bamboozled/errors'
|
9
9
|
require 'bamboozled/base'
|
10
10
|
|
11
|
-
%w(base employee report time_off).each {|a| require "bamboozled/api/#{a}"}
|
11
|
+
%w(base employee report time_off meta).each {|a| require "bamboozled/api/#{a}"}
|
12
12
|
|
13
13
|
module Bamboozled
|
14
14
|
class << self
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Bamboozled
|
2
|
+
module API
|
3
|
+
class Meta < Base
|
4
|
+
|
5
|
+
[:field, :table, :list, :user].each do |action|
|
6
|
+
define_method("#{action}s") do
|
7
|
+
result = request(:get, "meta/#{action}s")
|
8
|
+
result["#{action}s".to_sym][action]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/bamboozled/base.rb
CHANGED
@@ -14,6 +14,10 @@ module Bamboozled
|
|
14
14
|
@report ||= Bamboozled::API::Report.new(@subdomain, @api_key)
|
15
15
|
end
|
16
16
|
|
17
|
+
def meta
|
18
|
+
@meta ||= Bamboozled::API::Meta.new(@subdomain, @api_key)
|
19
|
+
end
|
20
|
+
|
17
21
|
def time_off
|
18
22
|
@time_off ||= Bamboozled::API::TimeOff.new(@subdomain, @api_key)
|
19
23
|
end
|
data/lib/bamboozled/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bamboozled
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/bamboozled.rb
|
56
56
|
- lib/bamboozled/api/base.rb
|
57
57
|
- lib/bamboozled/api/employee.rb
|
58
|
+
- lib/bamboozled/api/meta.rb
|
58
59
|
- lib/bamboozled/api/report.rb
|
59
60
|
- lib/bamboozled/api/time_off.rb
|
60
61
|
- lib/bamboozled/base.rb
|