module BWAPI::Client::Projects::Sharing
Sharing
module for projects/sharing endpoints
Public Instance Methods
Shares of a project
@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @options opts [Boolean] sharedOnly Boolean flag to return only shared shares (default: false) @return [Hash] Specific project shares
# File lib/bwapi/client/projects/sharing.rb, line 19 def project_sharing(project_id, opts = {}) get "projects/#{project_id}/sharing", opts end
User
share of a project
@param project_id [Integer] Id of project @param user_id [Integer] Id of user @return [Hash] Share of project for user
# File lib/bwapi/client/projects/sharing.rb, line 38 def project_sharing_user(project_id, user_id) get "projects/#{project_id}/sharing/#{user_id}" end
Update shares of a project
@param project_id [Integer] Id of project @param opts [Hash] options hash of parameters @options opts [Array] ProjectShareDTO Shares to be edited @return [Hash] Updated project shares
# File lib/bwapi/client/projects/sharing.rb, line 29 def update_project_sharing(project_id, opts = {}) put "projects/#{project_id}/sharing", opts end
Edit user share of a project
@param project_id [Integer] Id of project @param user_id [Integer] Id of user @options opts [Hash] User
share to be edited @return [Hash] Updated share of project for user
# File lib/bwapi/client/projects/sharing.rb, line 48 def update_project_sharing_user(project_id, user_id, opts = {}) put "projects/#{project_id}/sharing/#{user_id}", opts end