ten_thousand_feet 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15f278ec54054b318188f5210d0c940984dfbb15
4
- data.tar.gz: 96a9bf95cfae9296c31597e9ef998e4401df9aad
3
+ metadata.gz: 62305396da77abd17939b73b43e8ba384899c33b
4
+ data.tar.gz: 2d56d3b6b4a3697ef361ce88c76728ad2d47bfd9
5
5
  SHA512:
6
- metadata.gz: 6762d7c0292f759efb4cd36fa03edaba3e6160802247e8877ae99777f8a0ac37511c6114f39920e41d0268066b7232db1d74592e7140810d29891871b64afb4e
7
- data.tar.gz: 9b005b913c36a6986ebbe1db19f5faed1e284eb9af4817652cb1eaaf6645ce61f599f23670ac51f1d36006b591f962012040befdb292ed3490cf4873bd88a3a8
6
+ metadata.gz: bef12eba760d2bb0a606c588b1be28b9fc979148c00495987c4e8adf3f69fd39f26d8b285c7799b07decf2d202ec6aa906a7c2772b45283b27ffc2af7ce7e980
7
+ data.tar.gz: b4150693e320f4e9e3cc4b0bdfef55b1c6d15cb1feb4cb95cda617ade1dc406bf6fe0d48f497ac69529b32377401b6957a3d5c218769dac7487b8eaf56b40524
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TenThousandFeet
2
2
 
3
- Ruby wrapper for the [10,000ft API (BETA)](http://10kft.github.io/api-documentation).
3
+ Ruby wrapper for the [10,000ft API](http://10kft.github.io/api-documentation).
4
4
 
5
5
  ## Installation
6
6
 
@@ -78,6 +78,11 @@ Note: 'options' will be different for each method. Check the official API docume
78
78
  client.create_time_entry(user_id, options)
79
79
  client.delete_time_entry(time_entry_id, user_id, project_id, options)
80
80
 
81
+ ## Leave Types
82
+
83
+ client.get_leave_types(options)
84
+ client.show_leave_types(leave_type_id, options)
85
+
81
86
  ## To-Do
82
87
 
83
88
  * Budget Items
@@ -0,0 +1,15 @@
1
+ module TenThousandFeet
2
+ module API
3
+ module LeaveTypes
4
+
5
+ def get_leave_types(options={})
6
+ get("/leave_types", options)
7
+ end
8
+
9
+ def show_leave_type(id, options={})
10
+ get("/leave_types/#{id}", options)
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -8,6 +8,7 @@ require 'ten_thousand_feet/api/projects'
8
8
  require 'ten_thousand_feet/api/user_status'
9
9
  require 'ten_thousand_feet/api/assignments'
10
10
  require 'ten_thousand_feet/api/time_entries'
11
+ require 'ten_thousand_feet/api/leave_types'
11
12
 
12
13
  module TenThousandFeet
13
14
  class Client
@@ -21,6 +22,7 @@ module TenThousandFeet
21
22
  include API::UserStatus
22
23
  include API::Assignments
23
24
  include API::TimeEntries
25
+ include API::LeaveTypes
24
26
 
25
27
  def initialize(options={})
26
28
  @auth = options[:auth]
@@ -46,7 +48,7 @@ module TenThousandFeet
46
48
  params
47
49
  end
48
50
 
49
- def full_url(path, options)
51
+ def full_url(path, options = {})
50
52
  if options.empty?
51
53
  api_url + path
52
54
  else
@@ -55,7 +57,7 @@ module TenThousandFeet
55
57
  end
56
58
 
57
59
  def get(path, options = {})
58
- response = RestClient.get(full_url(path, default_options), options)
60
+ response = RestClient.get(full_url(path), {params: default_options.merge(options) })
59
61
 
60
62
  JSON.parse(response)
61
63
  end
@@ -1,3 +1,3 @@
1
1
  module TenThousandFeet
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ten_thousand_feet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Suss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-17 00:00:00.000000000 Z
11
+ date: 2014-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -137,6 +137,7 @@ files:
137
137
  - Rakefile
138
138
  - lib/ten_thousand_feet.rb
139
139
  - lib/ten_thousand_feet/api/assignments.rb
140
+ - lib/ten_thousand_feet/api/leave_types.rb
140
141
  - lib/ten_thousand_feet/api/phases.rb
141
142
  - lib/ten_thousand_feet/api/projects.rb
142
143
  - lib/ten_thousand_feet/api/time_entries.rb