odesk-api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +16 -0
- data/README.md +15 -1
- data/lib/odesk/api/routers/payments.rb +2 -12
- data/lib/odesk/api/version.rb +1 -1
- data/test/test_payments.rb +1 -6
- metadata +3 -2
data/.travis.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
language: ruby
|
2
|
+
script: rake
|
3
|
+
rvm:
|
4
|
+
- 1.9.3
|
5
|
+
- 2.0.0
|
6
|
+
- ruby-head
|
7
|
+
install: gem install oauth test-unit mocha
|
8
|
+
matrix:
|
9
|
+
allow_failures:
|
10
|
+
- rvm: ruby-head
|
11
|
+
fast_finish: true
|
12
|
+
notifications:
|
13
|
+
email:
|
14
|
+
recipients:
|
15
|
+
- apisupport@odesk.com
|
16
|
+
on_failure: change
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@ Ruby bindings for oDesk API
|
|
2
2
|
============
|
3
3
|
|
4
4
|
[![License](http://img.shields.io/packagist/l/odesk/php-odesk.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/odesk-api.svg)](http://badge.fury.io/rb/odesk-api)
|
6
|
+
[![Build Status](https://travis-ci.org/odesk/ruby-odesk.svg)](https://travis-ci.org/odesk/ruby-odesk)
|
7
|
+
[![Stories in Ready](http://badge.waffle.io/odesk/ruby-odesk.png)](http://waffle.io/odesk/ruby-odesk)
|
5
8
|
|
6
9
|
# Odesk::Api
|
7
10
|
|
@@ -46,6 +49,12 @@ The usage of this API is ruled by the Terms of Use at:
|
|
46
49
|
|
47
50
|
http://developers.odesk.com/API-Terms-of-Use
|
48
51
|
|
52
|
+
# Application Integration
|
53
|
+
To integrate this library you need to have:
|
54
|
+
|
55
|
+
* Ruby >= 1.9.3
|
56
|
+
* OAuth Extension installed (use `gem install oauth`)
|
57
|
+
|
49
58
|
## Installation
|
50
59
|
|
51
60
|
Add this line to your application's Gemfile:
|
@@ -62,4 +71,9 @@ Or install it yourself as:
|
|
62
71
|
|
63
72
|
## Usage
|
64
73
|
|
65
|
-
|
74
|
+
1.
|
75
|
+
Follow instructions from `Installation` section.
|
76
|
+
|
77
|
+
2.
|
78
|
+
Open `myapp.rb` and type the `consumer_key` and `consumer_secret` that you previously got from the API Center.
|
79
|
+
***That's all. Run your app as `ruby myapp.rb` and have fun.***'
|
@@ -27,26 +27,16 @@ module Odesk
|
|
27
27
|
@client.epoint = ENTRY_POINT
|
28
28
|
end
|
29
29
|
|
30
|
-
# Get adjustments
|
31
|
-
#
|
32
|
-
# Arguments:
|
33
|
-
# team_reference: (String)
|
34
|
-
# params: (Hash)
|
35
|
-
def submit_bonus(team_reference, params)
|
36
|
-
$LOG.i "running " + __method__.to_s
|
37
|
-
@client.get '/hr/v2/teams/' + team_reference + '/adjustments', params
|
38
|
-
end
|
39
|
-
|
40
30
|
# Submit bonus
|
41
31
|
#
|
42
32
|
# Arguments:
|
43
33
|
# team_reference: (String)
|
44
34
|
# params: (Hash)
|
45
|
-
def
|
35
|
+
def submit_bonus(team_reference, params)
|
46
36
|
$LOG.i "running " + __method__.to_s
|
47
37
|
@client.post '/hr/v2/teams/' + team_reference + '/adjustments', params
|
48
38
|
end
|
49
39
|
end
|
50
40
|
end
|
51
41
|
end
|
52
|
-
end
|
42
|
+
end
|
data/lib/odesk/api/version.rb
CHANGED
data/test/test_payments.rb
CHANGED
@@ -13,9 +13,4 @@ class PaymentsTest < Test::Unit::TestCase
|
|
13
13
|
api = Odesk::Api::Routers::Payments.new(get_client_mock)
|
14
14
|
assert api.submit_bonus('12', {})
|
15
15
|
end
|
16
|
-
|
17
|
-
def test_get_adjustments
|
18
|
-
api = Odesk::Api::Routers::Payments.new(get_client_mock)
|
19
|
-
assert api.get_adjustments('12', {})
|
20
|
-
end
|
21
|
-
end
|
16
|
+
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.1.
|
4
|
+
version: 0.1.1
|
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-
|
12
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -52,6 +52,7 @@ extensions: []
|
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
54
|
- .gitignore
|
55
|
+
- .travis.yml
|
55
56
|
- Gemfile
|
56
57
|
- LICENSE.txt
|
57
58
|
- README.md
|