Sha256: 3143f1855ca56c24318925889528c5e2adba0c72e4c4ff47945dde1d1f2d77e5

Contents?: true

Size: 756 Bytes

Versions: 1

Compression:

Stored size: 756 Bytes

Contents

module Ribose
  class Member < Ribose::Base
    include Ribose::Actions::All

    # List A Space Members
    #
    # This interface retrieves the list of members for any speicfic
    # user spaces and then will return those as `Sawyer::Resource`
    #
    # @param space_id [String] The Space Id
    # @param options [Hash] Query parameters as a Hash
    # @return [Array<Sawyer::Resource>]
    #
    def self.all(space_id, options = {})
      new(space_id: space_id, **options).all
    end

    private

    attr_reader :space_id

    def resource
      "spaces_user"
    end

    def resources_path
      ["spaces", space_id, "members"].join("/")
    end

    def extract_local_attributes
      @space_id = attributes.delete(:space_id)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ribose-0.2.0 lib/ribose/member.rb