noko 1.6.0 → 1.7.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ff0fcc7691e060653275c30cdfb02fd4e19da5ee2f4e1468c6935f26d0c3454
4
- data.tar.gz: 622da78be984693f095e5f931c32a52606d1a1cd8f440e53025251c20ebe3f4b
3
+ metadata.gz: 81d6555249faec8107a260575d395f6b2a88c1d694aa91dc4b38bebe626b8242
4
+ data.tar.gz: 389c839562b740d41563b3d81f9676a6550e3b88a2d7268c3ca81d8a17cb1359
5
5
  SHA512:
6
- metadata.gz: 63232176cc36783f3891245dcc44a0ee800312038ae904216cc7f219533d2ce4df9382acc80b5b2f1b8bfc722aa29f924e8efda411e8281c912ca78f32cebbcf
7
- data.tar.gz: bcb26ccd331dbc71c88193aba038c5f1c06272c0c93590d11486229bf77fdfb795010aa05d18d93b3bd8cdceff51b922bc4b52ad69cd5f6cf8c7c7a9e83d0701
6
+ metadata.gz: 22a89f9ac8d47d5c0f68a7bb9599f4f9761867c1a932185147500a27566c87a07e996aedd7a2a21b9cc5d612db5c189cfe56d36244078edb450ae721fed4a2f1
7
+ data.tar.gz: e8a86055b076426d92a7d45afd5651d0d1773fc3a5a66447dfd5333b8e21bfada13d4b1560e2eb76a946658f202c6f40ced600d4b9ec4af51a4f9f0469cb095f
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.7.0
2
+
3
+ * Added methods for webhook endpoints (#7)
4
+
5
+ * Fixed outdated changelog_uri
6
+
1
7
  # 1.6.0
2
8
 
3
9
  * Added Noko::NotFound for 404 responses
@@ -9,3 +9,4 @@ require 'noko/client/projects'
9
9
  require 'noko/client/tags'
10
10
  require 'noko/client/timers'
11
11
  require 'noko/client/users'
12
+ require 'noko/client/webhooks'
@@ -0,0 +1,43 @@
1
+ module Noko
2
+ class Client
3
+ def get_webhooks(params = nil)
4
+ get('/v2/webhooks', params)
5
+ end
6
+
7
+ def get_webhook(id)
8
+ get("/v2/webhooks/#{id}")
9
+ end
10
+
11
+ def create_webhook(attributes)
12
+ post('/v2/webhooks', attributes)
13
+ end
14
+
15
+ def update_webhook(id, attributes)
16
+ put("/v2/webhooks/#{id}", attributes)
17
+ end
18
+
19
+ def add_webhook_events(id, attributes)
20
+ put("/v2/webhooks/#{id}/add_events", attributes)
21
+ end
22
+
23
+ def remove_webhook_events(id, attributes)
24
+ put("/v2/webhooks/#{id}/remove_events", attributes)
25
+ end
26
+
27
+ def reroll_webhook_secret(id)
28
+ put("/v2/webhooks/#{id}/reroll_secret")
29
+ end
30
+
31
+ def disable_webhook(id)
32
+ put("/v2/webhooks/#{id}/disable")
33
+ end
34
+
35
+ def enable_webhook(id)
36
+ put("/v2/webhooks/#{id}/enable")
37
+ end
38
+
39
+ def delete_webhook(id)
40
+ delete("/v2/webhooks/#{id}")
41
+ end
42
+ end
43
+ end
@@ -1,3 +1,3 @@
1
1
  module Noko
2
- VERSION = '1.6.0'
2
+ VERSION = '1.7.0'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'noko'
3
- s.version = '1.6.0'
3
+ s.version = '1.7.0'
4
4
  s.license = 'MIT'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = ['Tim Craft']
@@ -15,6 +15,6 @@ Gem::Specification.new do |s|
15
15
  'homepage' => 'https://github.com/timcraft/noko',
16
16
  'source_code_uri' => 'https://github.com/timcraft/noko',
17
17
  'bug_tracker_uri' => 'https://github.com/timcraft/noko/issues',
18
- 'changelog_uri' => 'https://github.com/timcraft/noko/blob/master/CHANGES.md'
18
+ 'changelog_uri' => 'https://github.com/timcraft/noko/blob/main/CHANGES.md'
19
19
  }
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noko
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Craft
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-08 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruby client for the Noko API
14
14
  email:
@@ -32,6 +32,7 @@ files:
32
32
  - lib/noko/client/tags.rb
33
33
  - lib/noko/client/timers.rb
34
34
  - lib/noko/client/users.rb
35
+ - lib/noko/client/webhooks.rb
35
36
  - lib/noko/errors.rb
36
37
  - lib/noko/link_header.rb
37
38
  - lib/noko/params.rb
@@ -46,8 +47,8 @@ metadata:
46
47
  homepage: https://github.com/timcraft/noko
47
48
  source_code_uri: https://github.com/timcraft/noko
48
49
  bug_tracker_uri: https://github.com/timcraft/noko/issues
49
- changelog_uri: https://github.com/timcraft/noko/blob/master/CHANGES.md
50
- post_install_message:
50
+ changelog_uri: https://github.com/timcraft/noko/blob/main/CHANGES.md
51
+ post_install_message:
51
52
  rdoc_options: []
52
53
  require_paths:
53
54
  - lib
@@ -62,8 +63,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
63
  - !ruby/object:Gem::Version
63
64
  version: '0'
64
65
  requirements: []
65
- rubygems_version: 3.1.2
66
- signing_key:
66
+ rubygems_version: 3.1.4
67
+ signing_key:
67
68
  specification_version: 4
68
69
  summary: See description
69
70
  test_files: []