lib/api/modules/organizations.js
function (orgIdOrSlug, data) {
      var path,
          rejectMsg;
      if (orgIdOrSlug && data) {
        path = this.constructPath(constants.ORGANIZATIONS, orgIdOrSlug, constants.USERS);
        return this.Core.POST(path, data);
      } else {
        rejectMsg = 'Bad Request: An organization id or slug and data is required.';
        return this.rejectRequest(rejectMsg);
      }
    }
function (orgIdOrSlug, data) {
      var path,
          rejectMsg;
      if (orgIdOrSlug && data) {
        path = this.constructPath(constants.ORGANIZATIONS, orgIdOrSlug, constants.USERS);
        return this.Core.POST(path, data);
      } else {
        rejectMsg = 'Bad Request: An organization id or slug and data is required.';
        return this.rejectRequest(rejectMsg);
      }
    }
function ( orgIdOrSlug , data ) { var path , rejectMsg ; if ( orgIdOrSlug && data ) { path = this . constructPath ( constants . ORGANIZATIONS , orgIdOrSlug , constants . USERS ) ; return this . Core . POST ( path , data ) ; } else { rejectMsg = 'Bad Request: An organization id or slug and data is required.' ; return this . rejectRequest ( rejectMsg ) ; } }
Create a channel in an organization
@param  {String|Integer} orgIdOrSlug A Robin organization id or slug
@param  {Object}         data        A data object
@return {Function}                   A promise
Create a channel in an organization