File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 this . showTrigger = bind ( this . showTrigger , this ) ;
1818 this . listTriggers = bind ( this . listTriggers , this ) ;
1919 this . search = bind ( this . search , this ) ;
20+ this . share = bind ( this . share , this ) ;
2021 this . fork = bind ( this . fork , this ) ;
2122 this . remove = bind ( this . remove , this ) ;
2223 this . listTags = bind ( this . listTags , this ) ;
300301 } ) ;
301302 } ;
302303
304+ Projects . prototype . share = function ( params , fn ) {
305+ if ( params == null ) {
306+ params = { } ;
307+ }
308+ if ( fn == null ) {
309+ fn = null ;
310+ }
311+ this . debug ( "Projects::share()" ) ;
312+ return this . post ( "projects/" + ( Utils . parseProjectId ( params . projectId ) ) + "/share" , params , function ( data ) {
313+ if ( fn ) {
314+ return fn ( data ) ;
315+ }
316+ } ) ;
317+ } ;
318+
303319 Projects . prototype . search = function ( projectName , params , fn ) {
304320 if ( params == null ) {
305321 params = { } ;
Original file line number Diff line number Diff line change @@ -108,6 +108,10 @@ class Projects extends BaseModel
108108 @ debug " Projects::fork()"
109109 @ post " projects/fork/#{ params .id } " , params, (data ) -> fn data if fn
110110
111+ share : (params = {}, fn = null ) =>
112+ @ debug " Projects::share()"
113+ @ post " projects/#{ Utils .parseProjectId params .projectId } /share" , params, (data ) -> fn data if fn
114+
111115 search : (projectName , params = {}, fn = null ) =>
112116 if ' function' is typeof params
113117 fn = params
You can’t perform that action at this time.
0 commit comments