Class: Ghee::API::Orgs::PublicMembers::Proxy

Inherits:
ResourceProxy show all
Defined in:
lib/ghee/api/members.rb

Instance Attribute Summary

Attributes inherited from ResourceProxy

#connection, #current_page, #id, #pagination, #params, #path_prefix, #total

Instance Method Summary collapse

Methods inherited from ResourceProxy

accept_header, #all, #all_parallel, #build_prefix, #initialize, #method_missing, #paginate, #raw, #subject

Methods included from CUD

#create, #destroy, #patch

Constructor Details

This class inherits a constructor from Ghee::ResourceProxy

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ghee::ResourceProxy

Instance Method Details

#add(username = nil) ⇒ Object Also known as: publicize



21
22
23
24
# File 'lib/ghee/api/members.rb', line 21

def add(username=nil)
  prefix = username ? File.join(path_prefix, username) : path_prefix
  connection.put(prefix).status == 204
end

#check?(username = nil) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'lib/ghee/api/members.rb', line 16

def check?(username=nil)
  prefix = username ? File.join(path_prefix, username) : path_prefix
  connection.get(prefix).status == 204
end

#remove(username = nil) ⇒ Object Also known as: conceal



27
28
29
30
# File 'lib/ghee/api/members.rb', line 27

def remove(username=nil)
  prefix = username ? File.join(path_prefix, username) : path_prefix
  connection.delete(prefix).status == 204
end