class PR::Pin::Repositories::Subscriptions
Public Instance Methods
create(*args)
click to toggle source
# File lib/pr/pin/repositories/subscriptions.rb, line 7 def create(*args) API::Result.wrap(root) do root.command(:create).call(*args) end end
find(token)
click to toggle source
# File lib/pr/pin/repositories/subscriptions.rb, line 19 def find(token) relation = root.with_path(token) API::Result.wrap(relation) { relation.one } end
list(page: 1, per_page: nil)
click to toggle source
# File lib/pr/pin/repositories/subscriptions.rb, line 25 def list(page: 1, per_page: nil) relation = root.with_params( page: page, per_page: per_page ) API::PaginatedResult.wrap(relation) { relation.paginate } end
update(token, *args)
click to toggle source
# File lib/pr/pin/repositories/subscriptions.rb, line 13 def update(token, *args) API::Result.wrap(root) do root.append_path(token).command(:update).call(*args) end end