9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/everylog_wrapper.rb', line 9
def self.send_notification(project_id:, title:, summary:, body:, tags: [], link: "", push: false)
api_key = ENV["EVERYLOG_KEY"]
everylog_url = "https://api.everylog.io/api/v1/log-entries"
body = {
project_id: project_id,
title: title,
summary: summary,
body: body,
tags: tags,
link: link,
push: push
}
HTTParty.post(everylog_url,
{
body: body.to_json,
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer #{api_key}"
}
})
end
|