openproject_api 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Rakefile +2 -2
- data/lib/openproject_api/client.rb +4 -0
- data/lib/openproject_api/client/projects.rb +1 -1
- data/lib/openproject_api/client/relations.rb +21 -0
- data/lib/openproject_api/client/root.rb +9 -0
- data/lib/openproject_api/client/time_entries.rb +1 -1
- data/lib/openproject_api/client/user_preferences.rb +13 -0
- data/lib/openproject_api/client/users.rb +33 -0
- data/lib/openproject_api/client/work_packages.rb +1 -1
- data/lib/openproject_api/version.rb +1 -1
- data/{files.txt → manifest} +8 -5
- metadata +7 -4
- data/openproject_api.gemspec +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e768f366dd71718524170e9b4e5610a54aed63c35d86cd19772cd73c5a69e11
|
4
|
+
data.tar.gz: 5bcedaf082f3648bbeabab546e3b440c2e54dd59ea99b923e8b1b10f9837f50a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20f19f58e497d47eb2e219f7750a4d080a13c079a36fed2477c6f57a877b9147e034317e3ba62248e67bbd85249f31eed1c962eee5d7622ef40992a5ab3e1ec
|
7
|
+
data.tar.gz: 50befd7303f7ff119c6019741b01b4b36c5b37e79a4332e2d01ea71bfaad12f26bbac4528312af1eefa582cd812c70abbca2016d59613eb9b0c9df17dc3a8cab
|
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -5,6 +5,6 @@ RSpec::Core::RakeTask.new(:spec)
|
|
5
5
|
|
6
6
|
task :default => :spec
|
7
7
|
|
8
|
-
task :
|
9
|
-
File.write(File.expand_path('
|
8
|
+
task :update_manifest do
|
9
|
+
File.write(File.expand_path('manifest', __dir__), Dir['lib/**/*', 'Gemfile', 'Gemfile.lock', 'openproject-api.gemspec', 'Rakefile', 'manifest'].join("\n"))
|
10
10
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module OpenprojectApi
|
2
|
+
class Client
|
3
|
+
module Relations
|
4
|
+
def relations(*args)
|
5
|
+
get('/api/v3/relations', *args)
|
6
|
+
end
|
7
|
+
|
8
|
+
def relation(relation_id, *args)
|
9
|
+
get("/api/v3/relations/#{relation_id}", *args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def update_relation(relation_id, body, *args)
|
13
|
+
patch("/api/v3/relations/#{relation_id}", body, *args)
|
14
|
+
end
|
15
|
+
|
16
|
+
def delete_relation(relation_id, *args)
|
17
|
+
delete("/api/v3/relations/#{relation_id}", *args)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -9,7 +9,7 @@ module OpenprojectApi
|
|
9
9
|
get("/api/v3/time_entries/#{time_entry_id}", *args)
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def update_time_entry(time_entry_id, body, *args)
|
13
13
|
patch("/api/v3/time_entries/#{time_entry_id}", body, *args)
|
14
14
|
end
|
15
15
|
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module OpenprojectApi
|
2
|
+
class Client
|
3
|
+
module Users
|
4
|
+
def users(*args)
|
5
|
+
get('/api/v3/users', *args)
|
6
|
+
end
|
7
|
+
|
8
|
+
def user(user_id, *args)
|
9
|
+
get("/api/v3/users/#{user_id}", *args)
|
10
|
+
end
|
11
|
+
|
12
|
+
def update_user(user_id, body, *args)
|
13
|
+
patch("/api/v3/users/#{user_id}", body, *args)
|
14
|
+
end
|
15
|
+
|
16
|
+
def create_user(body, *args)
|
17
|
+
post("/api/v3/users", body, *args)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete_user(user_id, *args)
|
21
|
+
delete("/api/v3/users/#{user_id}", *args)
|
22
|
+
end
|
23
|
+
|
24
|
+
def lock_user(user_id, *args)
|
25
|
+
post("/api/v3/users/#{user_id}/lock", *args)
|
26
|
+
end
|
27
|
+
|
28
|
+
def unlock_user(user_id, *args)
|
29
|
+
delete("/api/v3/users/#{user_id}/lock", *args)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -9,7 +9,7 @@ module OpenprojectApi
|
|
9
9
|
get("/api/v3/work_packages/#{work_package_id}", *args)
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def update_work_package(work_package_id, body, *args)
|
13
13
|
patch("/api/v3/work_packages/#{work_package_id}", body, *args)
|
14
14
|
end
|
15
15
|
|
data/{files.txt → manifest}
RENAMED
@@ -1,17 +1,20 @@
|
|
1
1
|
lib/openproject_api
|
2
|
-
lib/openproject_api/version.rb
|
3
2
|
lib/openproject_api/client
|
4
|
-
lib/openproject_api/client/time_entries.rb
|
5
|
-
lib/openproject_api/client/work_packages.rb
|
6
3
|
lib/openproject_api/client/statuses.rb
|
7
4
|
lib/openproject_api/client/types.rb
|
5
|
+
lib/openproject_api/client/work_packages.rb
|
6
|
+
lib/openproject_api/client/users.rb
|
7
|
+
lib/openproject_api/client/time_entries.rb
|
8
8
|
lib/openproject_api/client/projects.rb
|
9
|
+
lib/openproject_api/client/user_preferences.rb
|
10
|
+
lib/openproject_api/client/root.rb
|
11
|
+
lib/openproject_api/client/relations.rb
|
9
12
|
lib/openproject_api/objectified_hash.rb
|
10
13
|
lib/openproject_api/api.rb
|
14
|
+
lib/openproject_api/version.rb
|
11
15
|
lib/openproject_api/client.rb
|
12
16
|
lib/openproject_api.rb
|
13
17
|
Gemfile
|
14
18
|
Gemfile.lock
|
15
|
-
openproject_api.gemspec
|
16
19
|
Rakefile
|
17
|
-
|
20
|
+
manifest
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openproject_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- expeehaa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-10-
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -20,18 +20,21 @@ files:
|
|
20
20
|
- Gemfile
|
21
21
|
- Gemfile.lock
|
22
22
|
- Rakefile
|
23
|
-
- files.txt
|
24
23
|
- lib/openproject_api.rb
|
25
24
|
- lib/openproject_api/api.rb
|
26
25
|
- lib/openproject_api/client.rb
|
27
26
|
- lib/openproject_api/client/projects.rb
|
27
|
+
- lib/openproject_api/client/relations.rb
|
28
|
+
- lib/openproject_api/client/root.rb
|
28
29
|
- lib/openproject_api/client/statuses.rb
|
29
30
|
- lib/openproject_api/client/time_entries.rb
|
30
31
|
- lib/openproject_api/client/types.rb
|
32
|
+
- lib/openproject_api/client/user_preferences.rb
|
33
|
+
- lib/openproject_api/client/users.rb
|
31
34
|
- lib/openproject_api/client/work_packages.rb
|
32
35
|
- lib/openproject_api/objectified_hash.rb
|
33
36
|
- lib/openproject_api/version.rb
|
34
|
-
-
|
37
|
+
- manifest
|
35
38
|
homepage:
|
36
39
|
licenses: []
|
37
40
|
metadata:
|
data/openproject_api.gemspec
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require_relative 'lib/openproject_api/version'
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'openproject_api'
|
5
|
-
spec.version = OpenprojectApi::VERSION
|
6
|
-
spec.authors = ['expeehaa']
|
7
|
-
spec.email = ['expeehaa@outlook.com']
|
8
|
-
|
9
|
-
spec.summary = %q{Ruby interface for the OpenProject API.}
|
10
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
11
|
-
|
12
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
13
|
-
|
14
|
-
# Specify which files should be added to the gem when it is released.
|
15
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
16
|
-
spec.files = File.read(File.expand_path('files.txt', __dir__)).split("\n")
|
17
|
-
spec.bindir = 'exe'
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ['lib']
|
20
|
-
end
|