
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
See coggle-issue-importer or coggle-opml-importer for complete example applications, including authentication.
npm install coggle
var CoggleApi = require('coggle');
var coggle = new CoggleApi({
token:user_access_token
});
coggle.createDiagram(
"My New Coggle"
function(err, diagram){
if(err)
throw err;
console.log("created diagram!", diagram);
}
);
##Class CoggleApi
The Coggle API client.
###Constructor Create a new instance of the Coggle API client.
Example:
new CoggleApi({token:user_auth_token})
Parameters:
options type: Objecttoken, required: API user authentication token###Method listDiagrams()
Lists diagrams accessible to the authorised user.
Parameters:
options type: Objectorganisation: The organisation to fetch diagrams for. (If undefined, the authenticated user's personal Coggles will be retrieved)callback type: Function###Method createDiagram()
Create a new Coggle diagram.
Parameters:
title type: Stringcallback type: Function##Class CoggleApiDiagram
Coggle API Diagram object.
###Constructor Create a new instance of a Coggle API Diagram object.
Parameters:
coggle_api type: CoggleApidiagram_resource type: Object_id and title fields###Method webUrl()
Return the web URL for accessing this diagram.
###Method getNodes()
Get all of the nodes (branch elements) in a Diagram.
Parameters:
callback type: Function###Method arrange()
Rearrange the nodes in this diagram. Use with care!
This function performs a server-side re-arrangement of all of the items in the diagram. It will attempt to make sure no items overlap, and to space things out evenly, it is not guaranteed to produce the same result when called with the same parameters.
Use of this function is generally discouraged, for the same reason that an auto-arrange function isn't provided in the web interface to Coggle: the placement of items can convey meaning, and if your program understands relationships in the data (such as a natural ordering, or that some sibling branches are more closely associated than others), then you should make use of that information to perform a custom layout.
Parameters:
callback type: Function##Class CoggleApiNode
Coggle API Node object, which represents individual parts("nodes") of the branches in a Coggle diagarm
###Constructor Create a new instance of a Coggle API Node object.
Parameters:
coggle_api_diagram type: CoggleApiDiagramnode_resource type: Object_id (String), text (String), and offset ({x:Number, y:Number}) fields.###Method addChild()
Add a child to this item. The child is positioned relative to this item, and will move when you move this item.
Parameters:
text Text to add for the item.offset type: Object: {x:Number, y:Number}x coordinate is along the branch direction, the y coordinate is vertically down from the top of the document.callback type: Function###Method update()
Update the properties of this node
Parameters:
properties type: Object: {text:String, offset:{x:Number, y:Number}, parent:String}callback type: Function###Method setText()
Set the text of this node.
Parameters:
text type: Stringcallback type: Function###Method move()
Move this node to a new offset relative to its parent.
Parameters:
offset type: Object {x:Number, y:Number}callback type: Function###Method remove()
Remove this node, and all nodes descended from it.
Parameters:
callback type: FunctionFAQs
Library for accessing the Coggle API
The npm package coggle receives a total of 1 weekly downloads. As such, coggle popularity was classified as not popular.
We found that coggle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.