caplinked-api 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a030a76d75548d60d727981da3bbb613819e421
4
- data.tar.gz: c2e892423666f91d9df9468176907207381965d4
3
+ metadata.gz: f7cb48515db307e473f698b77afc85cce3993669
4
+ data.tar.gz: f0a2da6fe0a1d34e7f72b4518e7c4fa1c15ca1bd
5
5
  SHA512:
6
- metadata.gz: 8f38f16dfc70752e5865ccaa82355129411537c7e9b80de7185f416d20bac9b15b9f013e86c12da2f72023ac35ab7c174e2d8216a83594b19a24c1548effebd5
7
- data.tar.gz: 9f7208ff8532ab6a0f56f8e1a20b4df82367d217b49ea868b92a396f9af66d370e4efce4d427c1d842af2d0fa1d875a79e7a0d01d8468585f69eb0546d2f0058
6
+ metadata.gz: 3beeb4454f93cc8f3a4543af25db32a5540f5bb77669bfba06d64eecd0b8f281b5cc297fa789dac233c7b35dc7ae7cbbcb152a2e93ab4e2d481b02692209bb39
7
+ data.tar.gz: 7ad54e90e3db332204cf26a358f77c97db5d88d11dee417497a85b61a37ae96d3815cb787153bb07d83300e933edddd0a8954eb26937589bbf8dfba336a391ab
@@ -7,6 +7,7 @@ require 'caplinked/rest/organizations'
7
7
  require 'caplinked/rest/permissions'
8
8
  require 'caplinked/rest/teams'
9
9
  require 'caplinked/rest/users'
10
+ require 'caplinked/rest/watermarks'
10
11
  require 'caplinked/rest/workspaces'
11
12
 
12
13
  module Caplinked
@@ -21,7 +22,8 @@ module Caplinked
21
22
  include Caplinked::REST::Permissions
22
23
  include Caplinked::REST::Teams
23
24
  include Caplinked::REST::Users
25
+ include Caplinked::REST::Watermarks
24
26
  include Caplinked::REST::Workspaces
25
27
  end
26
28
  end
27
- end
29
+ end
@@ -41,6 +41,12 @@ module Caplinked
41
41
  perform_get('/api/v1/teams/' + id.to_s + '/memberships', nil )
42
42
  end
43
43
 
44
+ def get_list_of_team_watermarks(options = {})
45
+ params = options.stringify_keys.slice('id')
46
+ id = params.delete('id')
47
+ perform_get('/api/v1/teams/' + id.to_s + '/watermark_settings', nil )
48
+ end
49
+
44
50
  end
45
51
  end
46
52
  end
@@ -0,0 +1,57 @@
1
+ module Caplinked
2
+ module REST
3
+ module Watermarks
4
+
5
+ def create_watermark(options = {})
6
+ body = options.stringify_keys.slice(
7
+ 'team_id',
8
+ 'custom_text',
9
+ 'color',
10
+ 'opacity',
11
+ 'font_size',
12
+ 'rotation',
13
+ 'hposition',
14
+ 'vposition',
15
+ 'display_user_name',
16
+ 'display_user_email',
17
+ 'display_ip_address',
18
+ 'display_time',
19
+ 'display_workspace_name'
20
+ )
21
+ perform_post('/api/v1/watermark', {}, body.to_json, {'Content-Type' => 'application/json'} )
22
+ end
23
+
24
+ def get_watermark(options = {})
25
+ params = options.stringify_keys.slice('id')
26
+ id = params.delete('id')
27
+ perform_get('/api/v1/watermark/' + id.to_s, nil)
28
+ end
29
+
30
+ def update_watermark(options = {})
31
+ body = options.stringify_keys.slice(
32
+ 'id',
33
+ 'custom_text',
34
+ 'color',
35
+ 'opacity',
36
+ 'font_size',
37
+ 'rotation',
38
+ 'hposition',
39
+ 'vposition',
40
+ 'display_user_name',
41
+ 'display_user_email',
42
+ 'display_ip_address',
43
+ 'display_time',
44
+ 'display_workspace_name'
45
+ )
46
+ id = body.delete('id')
47
+ perform_put('/api/v1/watermark/' + id.to_s, {}, body.to_json, { 'Content-Type' => 'application/json' } )
48
+ end
49
+
50
+ def delete_watermark(options = {})
51
+ body = options.stringify_keys.slice('id')
52
+ id = body.delete('id')
53
+ perform_delete('/api/v1/watermark/' + id.to_s, {}, body.to_json, { 'Content-Type' => 'application/json' } )
54
+ end
55
+ end
56
+ end
57
+ end
@@ -14,7 +14,7 @@ module Caplinked
14
14
 
15
15
  # @return [Integer]
16
16
  def patch
17
- 3
17
+ 4
18
18
  end
19
19
 
20
20
  # @return [Integer, NilClass]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caplinked-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Fowler
@@ -9,76 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-22 00:00:00.000000000 Z
12
+ date: 2017-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - '>='
19
19
  - !ruby/object:Gem::Version
20
20
  version: '4.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - '>='
26
26
  - !ruby/object:Gem::Version
27
27
  version: '4.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: addressable
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '2.3'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '2.3'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: http
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '2.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '2.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: http-form_data
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ~>
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ~>
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.0'
84
84
  description: Ruby SDK for Caplinked's API.
@@ -90,7 +90,6 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - README.md
92
92
  - caplinked-api.gemspec
93
- - lib/caplinked-api.rb
94
93
  - lib/caplinked/client.rb
95
94
  - lib/caplinked/error.rb
96
95
  - lib/caplinked/request.rb
@@ -104,9 +103,11 @@ files:
104
103
  - lib/caplinked/rest/permissions.rb
105
104
  - lib/caplinked/rest/teams.rb
106
105
  - lib/caplinked/rest/users.rb
106
+ - lib/caplinked/rest/watermarks.rb
107
107
  - lib/caplinked/rest/workspaces.rb
108
108
  - lib/caplinked/utils.rb
109
109
  - lib/caplinked/version.rb
110
+ - lib/caplinked-api.rb
110
111
  homepage: https://github.com/caplinked/caplinked-api-ruby
111
112
  licenses:
112
113
  - MIT
@@ -117,17 +118,17 @@ require_paths:
117
118
  - lib
118
119
  required_ruby_version: !ruby/object:Gem::Requirement
119
120
  requirements:
120
- - - ">="
121
+ - - '>='
121
122
  - !ruby/object:Gem::Version
122
123
  version: 1.9.3
123
124
  required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  requirements:
125
- - - ">="
126
+ - - '>='
126
127
  - !ruby/object:Gem::Version
127
128
  version: '0'
128
129
  requirements: []
129
130
  rubyforge_project:
130
- rubygems_version: 2.4.5
131
+ rubygems_version: 2.0.14
131
132
  signing_key:
132
133
  specification_version: 4
133
134
  summary: Ruby SDK for Caplinked's API.