Add toggl scraping
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
module Panopto
|
||||
def self.list_folder: (folder_id: String) -> Array[Hash[String, untyped]]
|
||||
end
|
||||
@@ -0,0 +1,13 @@
|
||||
module Toggl
|
||||
def self.entries_for_project(toggl_project_id, start_time:, end_time:)
|
||||
HTTParty.post(
|
||||
"http://localhost:3005/report",
|
||||
body: {
|
||||
"start_date": start_time.to_date.to_fs(),
|
||||
"end_date": end_time.to_date.to_fs(),
|
||||
"project_ids": [toggl_project_id]
|
||||
}.to_json,
|
||||
headers: { 'Content-Type' => 'application/json', 'Accept' => 'application/json' }
|
||||
)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user