Class: Projects::Api::PortalAPI

Inherits:
API
  • Object
show all
Includes:
Parser, Util
Defined in:
lib/projects/api/PortalAPI.rb

Overview

  • PortalsAPI is used to get list of portals.

Instance Method Summary collapse

Methods inherited from API

#getBaseURL, #getQueryMap

Constructor Details

#initialize(authToken) ⇒ PortalAPI

  • Construct a new PortalsAPI using User’s authTken.

Parameters

  • authToken
    • User’s authToken.



22
23
24
# File 'lib/projects/api/PortalAPI.rb', line 22

def initialize(authToken)
	super(authToken,"")
end

Instance Method Details

#getPortalsObject

  • Parse the JSON response into respective objects.

  • Get list of portals.

Returns

  • List of Portal object.



34
35
36
37
38
# File 'lib/projects/api/PortalAPI.rb', line 34

def getPortals
	portalParser = PortalParser.new
	url = @@baseURL+'portals/'
	return portalParser.getPortals(ZohoHTTPClient.get(url,getQueryMap))
end