class Projects::Api::BugsAPI
-
BugsAPI
is used to: -
Get list of bugs.
-
Get the details of a bug.
-
Creates a bug.
-
Update the details of a bug.
-
Delete an existing bug.
Public Class Methods
-
Construct a
BugsAPI
using User's authToken and portalId.
Parameters¶ ↑
- authToken
-
User's authToken.
-
- portalId
-
User's portalId.
-
Projects::Api::API::new
# File lib/projects/api/BugsAPI.rb, line 37 def initialize(authToken,portalId) super(authToken,portalId) end
Public Instance Methods
-
Create a Bug for the project.
Parameters¶ ↑
- projectId
-
ID of the project.
-
- bug
-
Bug object.
-
Returns¶ ↑
-
Bug object.
# File lib/projects/api/BugsAPI.rb, line 92 def create(projectId, bug) url = getBaseURL+"projects/"+String(projectId)+"/bugs/" response = ZohoHTTPClient.post(url, getQueryMap, bug.toParamMAP) return $bugParser.getBug(response) end
-
Delete an existing bug for the project.
Parameters¶ ↑
- projectId
-
ID of the project.
-
- bugId
-
ID of the bug.
-
Returns¶ ↑
-
String containg result of delete.
# File lib/projects/api/BugsAPI.rb, line 128 def delete(projectId, bugId) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(bugId)+"/" response = ZohoHTTPClient.delete(url, getQueryMap) return $bugParser.getResult(response) end
-
Get the details of a bug.
Parameters¶ ↑
- projectId
-
ID of the project.
-
- bugId
-
ID of the bug.
-
Return¶ ↑
-
Bug object.
# File lib/projects/api/BugsAPI.rb, line 73 def get(projectId, bugId) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(bugId)+"/" response = ZohoHTTPClient.get(url, getQueryMap) return $bugParser.getBug(response) end
-
Get list of bugs for the project.
Parameters¶ ↑
- projectId
-
ID of the project.
-
- queryMap
-
This queryMap contains the filters in the form of key-value pair.
-
Returns¶ ↑
-
List of Bug object.
# File lib/projects/api/BugsAPI.rb, line 54 def getBugs(projectId, queryMap) url = getBaseURL+"projects/"+String(projectId)+"/bugs/" response = ZohoHTTPClient.get(url, getQueryMap(queryMap)) return $bugParser.getBugs(response) end
-
Get all the custom fields in the given project.
Parameters¶ ↑
- projectId
-
ID of the project.
-
Returns¶ ↑
-
Returns list of Customfield object.
# File lib/projects/api/BugsAPI.rb, line 168 def getCustomfields(projectId) url = getBaseURL+"projects/"+String(projectId)+"/bugs/customfields/" response = ZohoHTTPClient.get(url, getQueryMap) return @bugParser.getCustomfields(response) end
-
Get all the default fields in the given project.
Parameters¶ ↑
- projectId
-
ID of the project.
-
Returns¶ ↑
-
Returns the Defaultfield object.
# File lib/projects/api/BugsAPI.rb, line 146 def getDefaultfields(projectId) url = getBaseURL+"projects/"+String(projectId)+"/bugs/defaultfields/" response = ZohoHTTPClient.get(url, getQueryMap) return @bugParser.getDefaultfields(response) end
-
Update the details of a bug.
Parameters¶ ↑
- projectId
-
ID of the project.
-
- bug
-
Bug object.
-
Returns¶ ↑
-
Bug object.
# File lib/projects/api/BugsAPI.rb, line 110 def update(projectId, bug) url = getBaseURL+"projects/"+String(projectId)+"/bugs/"+String(bug.getId)+"/" response = ZohoHTTPClient.post(url, getQueryMap, bug.toParamMAP) return $bugParser.getBug(response) end