gitlab
Version:
GitLab API Nodejs library.
168 lines (115 loc) • 7.42 kB
HTML
<html>
<head>
<title>ProjectMilestones.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To …</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="ApiBase.html">
ApiBase.coffee
</a>
<a class="source" href="ApiBaseHTTP.html">
ApiBaseHTTP.coffee
</a>
<a class="source" href="ApiV3.html">
ApiV3.coffee
</a>
<a class="source" href="BaseModel.html">
BaseModel.coffee
</a>
<a class="source" href="Groups.html">
Groups.coffee
</a>
<a class="source" href="Issues.html">
Issues.coffee
</a>
<a class="source" href="ProjectDeployKeys.html">
ProjectDeployKeys.coffee
</a>
<a class="source" href="ProjectHooks.html">
ProjectHooks.coffee
</a>
<a class="source" href="ProjectIssues.html">
ProjectIssues.coffee
</a>
<a class="source" href="ProjectMembers.html">
ProjectMembers.coffee
</a>
<a class="source" href="ProjectMergeRequests.html">
ProjectMergeRequests.coffee
</a>
<a class="source" href="ProjectMilestones.html">
ProjectMilestones.coffee
</a>
<a class="source" href="ProjectRepository.html">
ProjectRepository.coffee
</a>
<a class="source" href="Projects.html">
Projects.coffee
</a>
<a class="source" href="Users.html">
Users.coffee
</a>
<a class="source" href="Utils.html">
Utils.coffee
</a>
<a class="source" href="index.html">
index.coffee
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>ProjectMilestones.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">¶</a>
</div>
</div>
<div class="content"><div class='highlight'><pre>BaseModel = <span class="hljs-built_in">require</span> <span class="hljs-string">'../BaseModel'</span>
Utils = <span class="hljs-built_in">require</span> <span class="hljs-string">'../Utils'</span>
<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ProjectMilestones</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">BaseModel</span></span>
<span class="hljs-attribute">list</span>: <span class="hljs-function"><span class="hljs-params">(projectId, fn = <span class="hljs-literal">null</span>)</span> =></span>
<span class="hljs-property">@debug</span> <span class="hljs-string">"Projects::milestones()"</span>
<span class="hljs-property">@get</span> <span class="hljs-string">"projects/<span class="hljs-subst">#{Utils.parseProjectId projectId}</span>/milestones"</span>, <span class="hljs-function"><span class="hljs-params">(data)</span> =></span> fn data <span class="hljs-keyword">if</span> fn
<span class="hljs-attribute">show</span>: <span class="hljs-function"><span class="hljs-params">(projectId, milestoneId, fn = <span class="hljs-literal">null</span>)</span> =></span>
<span class="hljs-property">@debug</span> <span class="hljs-string">"Projects::milestone()"</span>
<span class="hljs-property">@get</span> <span class="hljs-string">"projects/<span class="hljs-subst">#{Utils.parseProjectId projectId}</span>/milestones/<span class="hljs-subst">#{parseInt milestoneId}</span>"</span>, <span class="hljs-function"><span class="hljs-params">(data)</span> =></span> fn data <span class="hljs-keyword">if</span> fn
<span class="hljs-attribute">add</span>: <span class="hljs-function"><span class="hljs-params">(projectId, title, description, due_date, fn = <span class="hljs-literal">null</span>)</span> =></span>
<span class="hljs-property">@debug</span> <span class="hljs-string">"Projects::addMilestone()"</span>
params =
<span class="hljs-attribute">id</span>: Utils.parseProjectId projectId
<span class="hljs-attribute">title</span>: title
<span class="hljs-attribute">description</span>: description
<span class="hljs-attribute">due_date</span>: due_date
<span class="hljs-property">@post</span> <span class="hljs-string">"projects/<span class="hljs-subst">#{Utils.parseProjectId projectId}</span>/milestones"</span>, params, <span class="hljs-function"><span class="hljs-params">(data)</span> =></span> fn data <span class="hljs-keyword">if</span> fn
<span class="hljs-attribute">update</span>: <span class="hljs-function"><span class="hljs-params">(projectId, milestoneId, title, description, due_date, state_event, fn = <span class="hljs-literal">null</span>)</span> =></span>
<span class="hljs-property">@debug</span> <span class="hljs-string">"Projects::editMilestone()"</span>
params =
<span class="hljs-attribute">id</span>: Utils.parseProjectId projectId
<span class="hljs-attribute">title</span>: title
<span class="hljs-attribute">description</span>: description
<span class="hljs-attribute">due_date</span>: due_date
<span class="hljs-attribute">state_event</span>: state_event
<span class="hljs-property">@put</span> <span class="hljs-string">"projects/<span class="hljs-subst">#{Utils.parseProjectId projectId}</span>/milestones/<span class="hljs-subst">#{parseInt milestoneId}</span>"</span>, params, <span class="hljs-function"><span class="hljs-params">(data)</span> =></span> fn data <span class="hljs-keyword">if</span> fn
<span class="hljs-built_in">module</span>.exports = <span class="hljs-function"><span class="hljs-params">(client)</span> -></span> <span class="hljs-keyword">new</span> ProjectMilestones client</pre></div></div>
</li>
</ul>
</div>
</body>
</html>