1.0.1 • Published 7 years ago

axiom-apis v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
7 years ago

axiom-apis

Axiom-apis module.

Usage:

var axiom = require('axiom-apis')();

See: www.npmjs.com/package/axiom-apis

axiom-apis~AxiomAPIs : Object

AxiomAPIs is wrapper library to call axiom APIs.

Kind: inner property of axiom-apis

AxiomAPIs.URL : String

url on which all axiom apis will be called

Kind: static property of AxiomAPIs

AxiomAPIs.UserID : String

axiom user id will be stored in this variable

Kind: static property of AxiomAPIs

AxiomAPIs.access_token : String

access_token provided by axiom will be stored in this variable and then will be used in all other API calls automatically

Kind: static property of AxiomAPIs

AxiomAPIs.listProjects(cb)

This all the projects for the current user. It includes the the projects associated to the user as well as the public projects

Kind: static method of AxiomAPIs

ParamTypeDescription
cbfunctionThis is the Callback method tobe called after the listProjects is executed

AxiomAPIs.listPublicProjects(isMarket, cb)

This all the public projects for the current user.

Kind: static method of AxiomAPIs

ParamTypeDescription
isMarketBooleanIf one wants to recieve all public projects this field should be specified to 2
cbfunctionThis is the Callback method tobe called after the listPublicProjects is executed

AxiomAPIs.listProjectMembers(projectID, cb)

To list all the members of a prjoect given the project ID

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDnumberProject's ID
cbfunctionThis is the Callback method tobe called after the listProjectMembers is executed

AxiomAPIs.getTagListByElement(elementTypeID, projectID, cb)

Get a list of all tags of the given element (i.e. tags assigned to table,task,file etc) assigned to a project

Kind: static method of AxiomAPIs

ParamTypeDescription
elementTypeIDnumberType Id agaisnt the element type chosen
projectIDnumberproject ID
cbfunctionThis is the Callback method tobe called after the getTagListByElement is executed

AxiomAPIs.saveProject(name, desc, projectid, URL, invitedStr, Comment, tagStr, Photo, Overview, companyName, department, productName, isOverviewActive, isCollaVisible, isMemberVisible, isDefaultColla, fixTags, isOtherTagNotAllowed, isOverviewUpdate, cb)

To add a new project or to update the details of an existing one

Kind: static method of AxiomAPIs

ParamTypeDescription
nameStringProject name
descStringDescription of the project
projectidnumber0 if new project
URLStringBaseURL
invitedStrStringList of comma separated emailIDs of invited members
CommentStringCommment Text if added
tagStrStringList of comma separated tags
PhotoStringfile name for uploaded project image
OverviewStringOverview of the project
companyNameStringCompany initiating the project
departmentStringThe department under which the project falls
productNameStringProduct on which the prjoect is based
isOverviewActiveBooleanTo activate the 'overview' section
isCollaVisibleBoolean1 to hide other collaborators
isMemberVisibleBoolean1 to hide other members
isDefaultCollaBoolean1 to make creator default collaborator
fixTagsStringset tags
isOtherTagNotAllowedBoolean1 if the word 'other' cannot be a tag
isOverviewUpdateBooleanIf an exisiting project is updated and the value of the 'overview' key is changed this variable is to be set to 1
cbfunctionThis is the Callback method tobe called after the saveProject is executed

AxiomAPIs.getOverviewContent(projectID, cb)

Get the value of the key 'overview' of a project given the project ID

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDnumberProject ID
cbfunctionThis is the Callback method tobe called after the getOverviewContent is executed

AxiomAPIs.getProjectDetailsByProjectID(projectID, cb)

Get all the information saved under a project given the projectID

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDnumber
cbfunctionThis is the Callback method tobe called after the getProjectDetailsByProjectID is executed

AxiomAPIs.deleteProject(projectID, cb)

Delete a project given the projectID

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDnumber
cbfunctionThis is the Callback method tobe called after the deleteProject is executed

AxiomAPIs.inviteMember(projectid, invitedStr, cb)

Add collaborators to a given project

Kind: static method of AxiomAPIs

ParamTypeDescription
projectidnumber
invitedStrStringList of comma separated emailIDs of invited members
cbfunctionThis is the Callback method tobe called after the inviteMember is executed

AxiomAPIs.getCollaboratorList(projectID, isMarket, cb)

Get a list of all collaborators of a given project

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDnumber
isMarketBoolean
cbfunctionThis is the Callback method tobe called after the getCollaboratorList is executed

AxiomAPIs.removeCollaborators(email, projectid, cb)

To remove an exisiting collaborator from the given project

Kind: static method of AxiomAPIs

ParamTypeDescription
emailStringRegistered email of the collaborator who is to be removed
projectidnumber
cbfunctionThis is the Callback method to be called after the removeCollaborators is executed

AxiomAPIs.changeOwner(projectid, ProjectOwnerID, cb)

This method facilitates the tranfer of ownership from one user to another

Kind: static method of AxiomAPIs

ParamTypeDescription
projectidNumbernew owner's userID
ProjectOwnerIDNumberoriginal owner's userID
cbfunctionThis is the Callback method to be called after the changeOwner is executed

AxiomAPIs.getCollaboratorProfile(projectID, collaID, cb)

Get user details of a collaborator of the given project

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumber
collaIDNumberuserID of collaborator
cbfunctionThis is the Callback method to be called after the getCollaboratorProfile is executed

AxiomAPIs.getDetailForPublish(projectID, cb)

To get information about the given project berfore publishing

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumber
cbfunctionThis is the Callback method to be called after the getDetailForPublish is executed

AxiomAPIs.publishProject(categoryID, subcategoryID, projectID, cb)

publishProject description

Kind: static method of AxiomAPIs

ParamTypeDescription
categoryIDNumberCategoryID under which the project is to be published
subcategoryIDNumbersubcategoryID of the chosen category
projectIDNumber
cbfunctionThis is the Callback method to be called after the publishProject is executed

AxiomAPIs.getRecentUpdates(projectID, cb)

Get the activity on a given project of the current user during their most recent login

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumber
cbfunctionThis is the Callback method to be called after the getRecentUpdates is executed

AxiomAPIs.getFileListByProjectID(projectID, isMarket, cb)

Get a list of all media/files added under a project

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumber
isMarketBooleanproject type
cbfunctionThis is the Callback method to be called after the getFileListByProjectID is executed

AxiomAPIs.getUploadExtentions(cb)

Get a list of permitted extention names of the files to be uploaded

Kind: static method of AxiomAPIs

ParamTypeDescription
cbfunctionThis is the Callback method to be called after the getUploadExtentions is executed

AxiomAPIs.resendSignupmail(email, captchaAns, cb)

resendSignupmail takes takes the email address of a newly registered user and sends them an email confirmation.

Kind: static method of AxiomAPIs

ParamTypeDescription
emailStringEmail address to which the signup mail is sent
captchaAnsStringcaptha code
cbfunctionThis is the Callback method to be called after the resendSignupmail is executed

AxiomAPIs.getAllTask(projectID, isMarket, cb)

Get all the tasks created by a user under the given project

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumber
isMarketBoolean
cbfunctionThis is the Callback method to be called after the getAllTask is executed

AxiomAPIs.createTask(taskID, taskName, desc, projectID, assignTo, URL, latitude, longitude, strCCUserID, isPublicdueDate, actualDueDate, tagStr, fileInfo, deleteFileList, allFiles, cb)

This helps add new tasks to a project or update exisiting ones given the project id

Kind: static method of AxiomAPIs

ParamTypeDescription
taskIDNumber
taskNameStringTitle for the task
descStringDescription
projectIDNumberContainer project
assignToNumberID of the user the task is assigned to be completed
URLStringbaseURL
latitudeNumber
longitudeNumber
strCCUserIDStringstring of comma seperated IDs of the users to be CCed
isPublicdueDateBoolean1 if due date is to be displayed publically
actualDueDateNumberdate of entry
tagStrStringstring of comma seperated tags to be linked to the task
fileInfoArrayArray of file details
deleteFileListArrayArray of files names to be removed
allFilesArrayArray of all filesname
cbfunctionThis is the Callback method to be called after the createTask is executed

AxiomAPIs.updateTask(taskID, taskName, desc, projectID, assignTo, URL, latitude, longitude, strCCUserID, isPublicdueDate, actualDueDate, tagStr, fileInfo, deleteFileList, allFiles, cb)

This helps add new tasks to a project or update exisiting ones given the project id

Kind: static method of AxiomAPIs

ParamTypeDescription
taskIDNumber0 if updating existing task
taskNameStringTitle for the task
descStringDescription
projectIDNumberContainer project
assignToNumberID of the user the task is assigned to be completed
URLStringbaseURL
latitudeNumber
longitudeNumber
strCCUserIDStringstring of comma seperated IDs of the users to be CCed
isPublicdueDateBoolean1 if due date is to be displayed publically
actualDueDateNumberdate of entry
tagStrStringstring of comma seperated tags to be linked to the task
fileInfoArrayArray of file details
deleteFileListArrayArray of files names to be removed
allFilesArrayArray of all filesname
cbfunctionThis is the Callback method to be called after the createTask is executed

AxiomAPIs.getTaskDetailsByID(taskID, projectID, isMarket, cb)

Get information about a task given the task ID

Kind: static method of AxiomAPIs

ParamType
taskIDNumber
projectIDNumber
isMarketBoolean
cbfunction

AxiomAPIs.getPostHistory(taskID, cb)

Get activity logs of the given task of the current user

Kind: static method of AxiomAPIs

ParamType
taskIDNumber
cbfunction

AxiomAPIs.updateTaskStatus(name, taskID, URL, status, cb)

This API facilitates the staus update on a task

Kind: static method of AxiomAPIs

ParamTypeDescription
nameStringasignee name ?
taskIDNumber
URLStringBase URL
statusNumberThe value to which the status is to be updated
cbfunction

AxiomAPIs.saveComment(taskID, latitude, longitude, comment, URL, fileInfo, cb)

saveComment posts a comment under the given task

Kind: static method of AxiomAPIs

ParamTypeDescription
taskIDNumberTask ID
latitudeNumberGeocoordinates of the current user
longitudeNumberGeocoordinates of the current user
commentStringComment text to be posted
URLStringBase url
fileInfoArrayArray of file names uploaded with the comment
cbfunctionCallback method

AxiomAPIs.deleteComment(commentID, isComment, fileName, cb)

This API deletes a comment given the comment ID

Kind: static method of AxiomAPIs

ParamTypeDescription
commentIDNumberComment ID
isCommentBooleanIf the comment has text
fileNameStringfile name of attachment with the comment
cbfunctionCallback method

AxiomAPIs.updateprofile(firstname, lastname, email, password, oldEmailID, timezoneid, actualfilename, URL, cb)

Updates user's personal info

Kind: static method of AxiomAPIs

ParamTypeDescription
firstnameStringUser's first name
lastnameStringUser's last name
emailStringUser's current registered email ID
passwordStringUser's password
oldEmailIDStringNew emailID, if the email is to be updated
timezoneidNumbertimezone of the user
actualfilenameStringfile name of the user's profile picture
URLStringBase URL (to the uploaded files)
cbfunctionCallback method

AxiomAPIs.updatepassword(newPassword, oldPassword, cb)

This API is used to change the password for the current user

Kind: static method of AxiomAPIs

ParamType
newPasswordString
oldPasswordString
cbfunction

AxiomAPIs.deleteFile(fileName, cb)

Delete an ploaded file

Kind: static method of AxiomAPIs

ParamType
fileNameString
cbfunction

AxiomAPIs.getNotificationByUser(userID, cb)

Returns a list of activity of the given user

Kind: static method of AxiomAPIs

ParamType
userIDNumber
cbfunction

AxiomAPIs.getNotificationList(userID, weekNo, cb)

Get all the activitties of a user over the week

Kind: static method of AxiomAPIs

ParamType
userIDNumber
weekNoNumber
cbfunction

AxiomAPIs.listTables(projectID, isMarket, cb)

List all the tables added to a project by the current user

Kind: static method of AxiomAPIs

ParamTypeDescription
projectIDNumberProject ID
isMarketNumber1 if project is public
cbfunctionCallback method

AxiomAPIs.getTableDetails(viewID, includeTempTable, where, cb)

getTableDetails description

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberview ID
includeTempTableNumberIf 1 put data in a temporary table
whereStringConditions if any on the data to retrieved
cbfunctionCallback method

AxiomAPIs.getTableData(viewID, from, to, tableName, where, commonAPITableName, considerTopXWhenDrop, canViewOnlySelfRows, cb)

This API fetches all the data from a given table

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberView ID
fromNumberFrom cell number
toNumberTo cell number
tableNameStringtable Name
whereStringconditions if to filter the data to be recieved
commonAPITableNameStringTemporay name for the data between from and to
considerTopXWhenDropNumberReturn only X rows from the top if thi key is set 1
canViewOnlySelfRowsNumber1 if only the rows assgined to the current user must be returned
cbfunctionCallback method

AxiomAPIs.getTableFilters(viewID, filterID, cb)

Get preexisting filters

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberViewId of the view seen by the user
filterIDNumberfilterID of the filter to be retrieved
cbfunctionCallback Method

AxiomAPIs.isTableLocked(tableID, viewID, cb)

For a given user and their view on a table, it returns if the table is locked. (i.e. not editable by the user)

Kind: static method of AxiomAPIs

ParamTypeDescription
tableIDNumberTable Id of the given table
viewIDNumberView Id of the given view
cbfunctionCallback method

AxiomAPIs.deleteTableFilters(filterIDs, cb)

Delete filters that were applied on a table

Kind: static method of AxiomAPIs

ParamTypeDescription
filterIDsStringStrimg of comma separated filterIDs
cbfunctionCallback method

AxiomAPIs.saveTableFilters(viewID, filterID, filterName, filterDetails, isAlert, cb)

Add a new filter to the table

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberViewID
filterIDNumberID against the name of the filter to be applied
filterNameStringfilter's name
filterDetailsStringString of values to which filter is applied
isAlertNumberIf 1, when the table updates, checks if any filter becomes applicable and if yes sends an email to collaborators about the change
cbfunctionCallback method

AxiomAPIs.setTableFilterAsDefault(viewID, filterID, isDefault, cb)

This API sets the given filter as a deafult on the given table

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberViewID
filterIDNumberID against the name of the filter to be applied
isDefaultBooleanSet to 1 to have the filter be applied to the table by default
cbfunctionCallback method

AxiomAPIs.applyTableFilters(viewID, filterID, showTopXRows, tn, filtersData, cb)

Applies dynamic filters to a table

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberViewID
filterIDNumberID against the name of the filter to be applied
showTopXRowsNumberNumber of rows from the top to be displayed
tnStringTable name
filtersDataObjectStringified object having an array of the length equal to the number of columns to which the filter is applied. Each element in the array has filterName the cell numbers to be applies and the conditions on which it should be applied
cbfunctionCallback method

AxiomAPIs.getUserRightsForPublish(parentViewID, viewID, mode, filterID, projectID, cb)

Gets user's rights(permissions) for a table that the user wants to publish

Kind: static method of AxiomAPIs

ParamTypeDescription
parentViewIDNumberThe ID of the view underwhich the table was created
viewIDNumberView ID of the table
modeString
filterIDNumberThe Filter on the table
projectIDNumberThe project under which the table was created
cbfunctionCallback method

AxiomAPIs.removeTable(viewIDs, isArchive, cb)

To delete a table from the view

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDsStringString of comma separated ViewIDs
isArchiveBooleanIf 1 archive/hide instead of delete
cbfunctionCallback method

AxiomAPIs.getLookupKeyColumns(viewID, projectID, cb)

Given a table and viewID, get the permitted fields (to the current user) to do a lookup on

Kind: static method of AxiomAPIs

ParamTypeDescription
viewIDNumberID of the view
projectIDNumberID of the projectID
cbfunctionCallback method

AxiomAPIs.getLookupTableStructure(tableID, projectID, VDID, cb)

Gets the table structure of the lookup for a given project of a given view for the current user

Kind: static method of AxiomAPIs

ParamTypeDescription
tableIDNumbertable ID
projectIDNumberProject ID
VDIDNumberview details ID
cbfunctionCallback method

AxiomAPIs.getLookupValues(IDs, cb)

Get the lookup values given the viewDetailsIDs

Kind: static method of AxiomAPIs

ParamTypeDescription
IDsStringString of comma separated viewDetailsIDs
cbfunctionCallback Function

AxiomAPIs.getCellHistory(rowID, VDID, cb)

Get the change in call values over time given the rowID and viewID for the current user

Kind: static method of AxiomAPIs

ParamTypeDescription
rowIDNumberrowID
VDIDNumberviewDetailsID
cbfunctionCallback method