odesk-api 0.2.4 → 0.2.5

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.
data/README.md CHANGED
@@ -32,7 +32,7 @@ These are the supported API resources:
32
32
 
33
33
  Copyright 2014 oDesk Corporation. All Rights Reserved.
34
34
 
35
- php-odesk is licensed under the Apache License, Version 2.0 (the "License");
35
+ ruby-odesk is licensed under the Apache License, Version 2.0 (the "License");
36
36
  you may not use this file except in compliance with the License.
37
37
  You may obtain a copy of the License at
38
38
 
@@ -33,6 +33,12 @@ module Odesk
33
33
  @client.get '/profiles/v1/metadata/categories'
34
34
  end
35
35
 
36
+ # Get categories (v2)
37
+ def get_categories_v2
38
+ $LOG.i "running " + __method__.to_s
39
+ @client.get '/profiles/v2/metadata/categories'
40
+ end
41
+
36
42
  # Get skills
37
43
  def get_skills
38
44
  $LOG.i "running " + __method__.to_s
@@ -62,4 +68,4 @@ module Odesk
62
68
  end
63
69
  end
64
70
  end
65
- end
71
+ end
@@ -37,7 +37,17 @@ module Odesk
37
37
  $LOG.i "running " + __method__.to_s
38
38
  @client.get '/team/v1/workdiaries/' + company + '/' + username + '/' + date, params
39
39
  end
40
+
41
+ # Get Work Diary by Contract
42
+ # Arguments:
43
+ # contract: (String)
44
+ # date: (String)
45
+ # params: (Hash)
46
+ def get_by_contract(contract, date, params = {})
47
+ $LOG.i "running " + __method__.to_s
48
+ @client.get '/team/v2/workdiaries/contracts/' + contract + '/' + date, params
49
+ end
40
50
  end
41
51
  end
42
52
  end
43
- end
53
+ end
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Odesk # :nodoc:
15
15
  module Api
16
- VERSION = "0.2.4"
16
+ VERSION = "0.2.5"
17
17
  end
18
18
  end
@@ -29,8 +29,13 @@ class MetadataTest < Test::Unit::TestCase
29
29
  assert api.get_categories
30
30
  end
31
31
 
32
+ def test_get_categories_v2
33
+ api = Odesk::Api::Routers::Metadata.new(get_client_mock)
34
+ assert api.get_categories_v2
35
+ end
36
+
32
37
  def test_get_reasons
33
38
  api = Odesk::Api::Routers::Metadata.new(get_client_mock)
34
39
  assert api.get_reasons({})
35
40
  end
36
- end
41
+ end
@@ -13,4 +13,9 @@ class WorkdiaryTest < Test::Unit::TestCase
13
13
  api = Odesk::Api::Routers::Workdiary.new(get_client_mock)
14
14
  assert api.get('company', 'username', '20140101', {})
15
15
  end
16
- end
16
+
17
+ def test_get_by_contract
18
+ api = Odesk::Api::Routers::Workdiary.new(get_client_mock)
19
+ assert api.get_by_contract('1234', '20140101', {})
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odesk-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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: 2014-11-21 00:00:00.000000000 Z
12
+ date: 2015-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth