class Projects::Api::BugsAPI

Public Class Methods

new(authToken,portalId) click to toggle source
  • Construct a BugsAPI using User's authToken and portalId.

Parameters

  • authToken
    • User's authToken.

  • portalId
    • User's portalId.

Calls superclass method Projects::Api::API::new
# File lib/projects/api/BugsAPI.rb, line 37
def initialize(authToken,portalId)
        super(authToken,portalId)
end

Public Instance Methods

create(projectId, bug) click to toggle source
  • 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(projectId, bugId) click to toggle source
  • 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(projectId, bugId) click to toggle source
  • 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
getBugs(projectId, queryMap) click to toggle source
  • 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
getCustomfields(projectId) click to toggle source
  • 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
getDefaultfields(projectId) click to toggle source
  • 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(projectId, bug) click to toggle source
  • 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