workmate 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -1
- data/README.rdoc +5 -9
- data/Rakefile +1 -1
- data/lib/workmate.rb +0 -1
- data/lib/workmate/client.rb +3 -3
- data/workmate.gemspec +1 -1
- metadata +5 -5
data/CHANGELOG
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
v0.1.0 first release
|
1
|
+
v0.1.0 first release
|
2
|
+
v0.1.1 fix application url
|
data/README.rdoc
CHANGED
@@ -1,13 +1,9 @@
|
|
1
1
|
== Installation
|
2
|
-
$ gem install
|
2
|
+
$ gem install workmate
|
3
3
|
|
4
4
|
== Using
|
5
|
-
require '
|
5
|
+
require 'workmate'
|
6
6
|
|
7
|
-
client =
|
8
|
-
client.
|
9
|
-
client.
|
10
|
-
client.events(calendar.id) # returns events in calendar
|
11
|
-
|
12
|
-
# retrieving events with options
|
13
|
-
client.events(calendar.id, :start_time => 1.month.ago, :timezone => 'Europe/Moscow')
|
7
|
+
client = Workmate::Client.new(api_key, api_secret, oauth_token)
|
8
|
+
client.me # returns current user
|
9
|
+
client.user(user_id) # returns user by Id
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
3
3
|
require 'rake'
|
4
4
|
require 'echoe'
|
5
5
|
|
6
|
-
Echoe.new('workmate', '0.1.
|
6
|
+
Echoe.new('workmate', '0.1.1') do |p|
|
7
7
|
p.description = "Ruby library for Workmate API."
|
8
8
|
p.url = "http://github.com/workmate/workmate-ruby"
|
9
9
|
p.author = "Iskander Haziev"
|
data/lib/workmate.rb
CHANGED
data/lib/workmate/client.rb
CHANGED
@@ -2,11 +2,11 @@ require 'json'
|
|
2
2
|
require 'oauth2'
|
3
3
|
module Workmate
|
4
4
|
class Client
|
5
|
-
BASE_URL = '
|
5
|
+
BASE_URL = 'https://workmateapp.com'
|
6
6
|
API_URL = "#{BASE_URL}/api"
|
7
7
|
|
8
|
-
def initialize(client_id, client_secret, token = nil)
|
9
|
-
@client = OAuth2::Client.new(client_id, client_secret, :site =>
|
8
|
+
def initialize(client_id, client_secret, token = nil, url = BASE_URL)
|
9
|
+
@client = OAuth2::Client.new(client_id, client_secret, :site => url)
|
10
10
|
@token = OAuth2::AccessToken.from_hash(@client, access_token: token)
|
11
11
|
end
|
12
12
|
|
data/workmate.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workmate
|
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:
|
@@ -13,7 +13,7 @@ date: 2011-11-21 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
16
|
-
requirement: &
|
16
|
+
requirement: &2169904140 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2169904140
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: json
|
27
|
-
requirement: &
|
27
|
+
requirement: &2169834880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2169834880
|
36
36
|
description: Ruby library for Workmate API.
|
37
37
|
email: gvalmon@gmail.com
|
38
38
|
executables: []
|