add: gitea api notification
This commit is contained in:
parent
2c4dab9d39
commit
7c4d503814
|
@ -4,6 +4,7 @@ require_relative 'api/repository'
|
|||
require_relative 'api/settings'
|
||||
require_relative 'api/user'
|
||||
require_relative 'api/organization'
|
||||
require_relative 'api/notification'
|
||||
require_relative 'api/client'
|
||||
require_relative 'api/config'
|
||||
require_relative 'api/exception'
|
||||
|
|
|
@ -21,6 +21,7 @@ module Gitea
|
|||
include Gitea::Api::Settings
|
||||
include Gitea::Api::User
|
||||
include Gitea::Api::Organization
|
||||
include Gitea::Api::Notification
|
||||
end
|
||||
end # User
|
||||
end # Gitea
|
|
@ -0,0 +1,33 @@
|
|||
module Gitea
|
||||
module Api
|
||||
module Notification
|
||||
def get_notifications(opt={})
|
||||
@http.get("/notifications", opt)
|
||||
end
|
||||
|
||||
def put_notifications(opt={})
|
||||
@http.put("/notifications", opt)
|
||||
end
|
||||
|
||||
def get_notifications_new(opt={})
|
||||
@http.get("/notifications/new", opt)
|
||||
end
|
||||
|
||||
def get_notifications_threads_by_id(opt={})
|
||||
@http.get("/notifications/threads/#{id}", opt)
|
||||
end
|
||||
|
||||
def patch_notifications_threads_by_id(opt={})
|
||||
@http.patch("/notifications/threads/#{id}", opt)
|
||||
end
|
||||
|
||||
def get_repos_notifications_by_owner_repo(owner, repo, opt={})
|
||||
@http.get("/repos/#{owner}/#{repo}/notifications", opt)
|
||||
end
|
||||
|
||||
def put_repos_notifications_by_owner_repo(owner, repo, opt={})
|
||||
@http.put("/repos/#{owner}/#{repo}/notifications", opt)
|
||||
end
|
||||
end # Notification
|
||||
end # Api
|
||||
end # Gitea
|
Loading…
Reference in New Issue