bwapi 11.0.1.pre.595 → 11.0.1.pre.596
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/bwapi/client/projects.rb +2 -0
- data/lib/bwapi/client/projects/alerts.rb +83 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjExZTRmYjIyY2RmZmVkYTc4OGQyNDEwMDA4MzhhMzc2NjRiZTdiYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWJkZTJkNjY3MTA3Mjc3MGQ3NTM2NTEyMmM5YTdiMjFkYjA4MmQzNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmU3NmFmMGEzOGZkM2IxMDkwNWQ5OWFkNDFlODRlN2VmOTc2YTIxNTBiODhm
|
10
|
+
NDYwNzVhZmJlZjQwNDE4NDI2ZmE5ZTI2NDEzZjhkNTEwZDg1ZjZmMjFiMDNm
|
11
|
+
NDFkOWFlZTViNjg5Y2E4Y2ZiZDRkYzRiMWYzNDk1MzZjZGY0ODM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTg4NDI4MjlkMzI3NjM4YzEyMjlmOWNjOWEyYmNkZTVmMGZhOTBlNTM1ZmIz
|
14
|
+
NTBiMjY1NjUyMDNlZDNjZjIxZDVkNjc4NDEzZWVkNDg4OTkxYTAwNmUwZWEw
|
15
|
+
NTM1M2FhYTlkMTdmZmY1MzhjYjlmZjE4NjQyMWZiMWVkZTY4ZDI=
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'bwapi/client/projects/alerts'
|
1
2
|
require 'bwapi/client/projects/bulk_actions'
|
2
3
|
require 'bwapi/client/projects/categories'
|
3
4
|
require 'bwapi/client/projects/data'
|
@@ -97,6 +98,7 @@ module BWAPI
|
|
97
98
|
get "/projects/#{project_id}/twitteraudiencesummary", opts
|
98
99
|
end
|
99
100
|
|
101
|
+
include BWAPI::Client::Projects::Alerts
|
100
102
|
include BWAPI::Client::Projects::BulkActions
|
101
103
|
include BWAPI::Client::Projects::Categories
|
102
104
|
include BWAPI::Client::Projects::Data
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module BWAPI
|
2
|
+
class Client
|
3
|
+
module Projects
|
4
|
+
# Alerts module for alerts endpoints
|
5
|
+
module Alerts
|
6
|
+
# Get a list of alerts
|
7
|
+
#
|
8
|
+
# @param project_id [Integer] Id of project
|
9
|
+
# @return [Hash] Alerts in project
|
10
|
+
def alerts(project_id)
|
11
|
+
get "projects/#{project_id}/alerts"
|
12
|
+
end
|
13
|
+
|
14
|
+
# Get a selected alert
|
15
|
+
#
|
16
|
+
# @param project_id [Integer] Id of project
|
17
|
+
# @param alert_id [Integer] Id of alert
|
18
|
+
# @return [Hash] Alert in project
|
19
|
+
def get_alert(project_id, alert_id)
|
20
|
+
get "projects/#{project_id}/alerts/#{alert_id}"
|
21
|
+
end
|
22
|
+
|
23
|
+
# Create a new alert in project
|
24
|
+
#
|
25
|
+
# @param project_id [Integer] Id of project
|
26
|
+
# @param opts [Hash] options hash of parameters
|
27
|
+
# @option opts [String] alertTypes type of alert
|
28
|
+
# @option opts [Integer] clientId The id of the client
|
29
|
+
# @option opts [Date] created Creation date
|
30
|
+
# @option opts [Boolean] deleted Alert deleted check
|
31
|
+
# @option opts [Boolean] emailCreator Does this alert also email the creator
|
32
|
+
# @option opts [Boolean] enabled Alert enabled check
|
33
|
+
# @option opts [Boolean] externalLink External link
|
34
|
+
# @option opts [Integer] frequency Frequence of checks
|
35
|
+
# @option opts [Integer] id The id of Frequence
|
36
|
+
# @option opts [Long] lastResourceId Last checked resource id
|
37
|
+
# @option opts [Integer] mentionsPerAlert Number of mentions
|
38
|
+
# @option opts [String] name Alert name
|
39
|
+
# @option opts [Date] nextRun Date/time of next run
|
40
|
+
# @option opts [Integer] queryId Corresponding query id
|
41
|
+
# @option opts [String] queryName Name of the query this alert relates to
|
42
|
+
# @option opts [Integer] repeatOnDayOfWeek Repeats in a week
|
43
|
+
# @option opts [Integer] repeatOnHourOfDay Repeats in a day
|
44
|
+
# @option opts [String] searchLiteString Filters to be considered
|
45
|
+
# @option opts [Double] threshold Threshold
|
46
|
+
# @option opts [Integer] userId Corresponding user id
|
47
|
+
# @return [Hash] New alert
|
48
|
+
def create_alert(project_id, opts = {})
|
49
|
+
post "/projects/#{project_id}/alerts", opts
|
50
|
+
end
|
51
|
+
|
52
|
+
# Update an existing alert in project
|
53
|
+
#
|
54
|
+
# @param project_id [Integer] Id of project
|
55
|
+
# @param opts [Hash] options hash of parameters
|
56
|
+
# @option opts [String] alertTypes type of alert
|
57
|
+
# @option opts [Integer] clientId The id of the client
|
58
|
+
# @option opts [Date] created Creation date
|
59
|
+
# @option opts [Boolean] deleted Alert deleted check
|
60
|
+
# @option opts [Boolean] emailCreator Does this alert also email the creator
|
61
|
+
# @option opts [Boolean] enabled Alert enabled check
|
62
|
+
# @option opts [Boolean] externalLink External link
|
63
|
+
# @option opts [Integer] frequency Frequence of checks
|
64
|
+
# @option opts [Integer] id The id of Frequence
|
65
|
+
# @option opts [Long] lastResourceId Last checked resource id
|
66
|
+
# @option opts [Integer] mentionsPerAlert Number of mentions
|
67
|
+
# @option opts [String] name Alert name
|
68
|
+
# @option opts [Date] nextRun Date/time of next run
|
69
|
+
# @option opts [Integer] queryId Corresponding query id
|
70
|
+
# @option opts [String] queryName Name of the query this alert relates to
|
71
|
+
# @option opts [Integer] repeatOnDayOfWeek Repeats in a week
|
72
|
+
# @option opts [Integer] repeatOnHourOfDay Repeats in a day
|
73
|
+
# @option opts [String] searchLiteString Filters to be considered
|
74
|
+
# @option opts [Double] threshold Threshold
|
75
|
+
# @option opts [Integer] userId Corresponding user id
|
76
|
+
# @return [Hash] Returns alert as saved
|
77
|
+
def update_alert(project_id, opts = {})
|
78
|
+
put "/projects/#{project_id}/alerts", opts
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bwapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.0.1.pre.
|
4
|
+
version: 11.0.1.pre.596
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chrisp
|
@@ -212,6 +212,7 @@ files:
|
|
212
212
|
- lib/bwapi/client/oauth.rb
|
213
213
|
- lib/bwapi/client/ping.rb
|
214
214
|
- lib/bwapi/client/projects.rb
|
215
|
+
- lib/bwapi/client/projects/alerts.rb
|
215
216
|
- lib/bwapi/client/projects/bulk_actions.rb
|
216
217
|
- lib/bwapi/client/projects/bulk_actions/author.rb
|
217
218
|
- lib/bwapi/client/projects/bulk_actions/mentions.rb
|