Sha256: 75ea43f2b00fcf229d4c71f2bd2d52c640895ba5ff62a45dacfaab8dd61bf727
Contents?: true
Size: 533 Bytes
Versions: 13
Compression:
Stored size: 533 Bytes
Contents
module Ahub class Group include Ahub::APIResource def add(user_id) add_user(user_id) end def self.find_by_name(group_name) matches = find_all matches.find{|group| group.name.downcase.strip == group_name.downcase.strip} end def add_user(user_id) raise Exception("No Group Id") unless id move_url = "#{self.class.base_url}/#{id}/add.json?users=#{user_id}" RestClient.put("#{move_url}", self.class.admin_headers) true rescue => e false end end end
Version data entries
13 entries across 13 versions & 1 rubygems