javascript-generated/src/api/FragmentsApi.js
function(apiClient) {
    this.apiClient = apiClient || ApiClient.instance;



    /**
     * Finds organizations page fragment
     * Finds single organization page fragment 
     * @param {String} organizationId Organization id
     * @param {String} fragmentId fragment id
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Fragment}
     */
    this.findOrganizationFragment = function(organizationId, fragmentId) {
      var postBody = null;

      // verify the required parameter 'organizationId' is set
      if (organizationId == undefined || organizationId == null) {
        throw "Missing the required parameter 'organizationId' when calling findOrganizationFragment";
      }

      // verify the required parameter 'fragmentId' is set
      if (fragmentId == undefined || fragmentId == null) {
        throw "Missing the required parameter 'fragmentId' when calling findOrganizationFragment";
      }


      var pathParams = {
        'organizationId': organizationId,
        'fragmentId': fragmentId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['basicAuth'];
      var contentTypes = ['application/json;charset=utf-8'];
      var accepts = ['application/json;charset=utf-8'];
      var returnType = Fragment;

      return this.apiClient.callApi(
        '/organizations/{organizationId}/fragments/{fragmentId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }


    /**
     * Lists organizations page fragments
     * Lists organizations page fragments 
     * @param {String} organizationId Organization id
     * @param {Object} opts Optional parameters
     * @param {String} opts.slug Filter results by fragment slug
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Fragment>}
     */
    this.listOrganizationFragments = function(organizationId, opts) {
      opts = opts || {};
      var postBody = null;

      // verify the required parameter 'organizationId' is set
      if (organizationId == undefined || organizationId == null) {
        throw "Missing the required parameter 'organizationId' when calling listOrganizationFragments";
      }


      var pathParams = {
        'organizationId': organizationId
      };
      var queryParams = {
        'slug': opts['slug']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['basicAuth'];
      var contentTypes = ['application/json;charset=utf-8'];
      var accepts = ['application/json;charset=utf-8'];
      var returnType = [Fragment];

      return this.apiClient.callApi(
        '/organizations/{organizationId}/fragments', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
  }
function(apiClient) {
    this.apiClient = apiClient || ApiClient.instance;



    /**
     * Finds organizations page fragment
     * Finds single organization page fragment 
     * @param {String} organizationId Organization id
     * @param {String} fragmentId fragment id
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Fragment}
     */
    this.findOrganizationFragment = function(organizationId, fragmentId) {
      var postBody = null;

      // verify the required parameter 'organizationId' is set
      if (organizationId == undefined || organizationId == null) {
        throw "Missing the required parameter 'organizationId' when calling findOrganizationFragment";
      }

      // verify the required parameter 'fragmentId' is set
      if (fragmentId == undefined || fragmentId == null) {
        throw "Missing the required parameter 'fragmentId' when calling findOrganizationFragment";
      }


      var pathParams = {
        'organizationId': organizationId,
        'fragmentId': fragmentId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['basicAuth'];
      var contentTypes = ['application/json;charset=utf-8'];
      var accepts = ['application/json;charset=utf-8'];
      var returnType = Fragment;

      return this.apiClient.callApi(
        '/organizations/{organizationId}/fragments/{fragmentId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }


    /**
     * Lists organizations page fragments
     * Lists organizations page fragments 
     * @param {String} organizationId Organization id
     * @param {Object} opts Optional parameters
     * @param {String} opts.slug Filter results by fragment slug
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Fragment>}
     */
    this.listOrganizationFragments = function(organizationId, opts) {
      opts = opts || {};
      var postBody = null;

      // verify the required parameter 'organizationId' is set
      if (organizationId == undefined || organizationId == null) {
        throw "Missing the required parameter 'organizationId' when calling listOrganizationFragments";
      }


      var pathParams = {
        'organizationId': organizationId
      };
      var queryParams = {
        'slug': opts['slug']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['basicAuth'];
      var contentTypes = ['application/json;charset=utf-8'];
      var accepts = ['application/json;charset=utf-8'];
      var returnType = [Fragment];

      return this.apiClient.callApi(
        '/organizations/{organizationId}/fragments', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType
      );
    }
  }
function ( apiClient ) { this . apiClient = apiClient || ApiClient . instance ; /**
     * Finds organizations page fragment
     * Finds single organization page fragment 
     * @param {String} organizationId Organization id
     * @param {String} fragmentId fragment id
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Fragment}
     */ this . findOrganizationFragment = function ( organizationId , fragmentId ) { var postBody = null ; // verify the required parameter 'organizationId' is set if ( organizationId == undefined || organizationId == null ) { throw "Missing the required parameter 'organizationId' when calling findOrganizationFragment" ; } // verify the required parameter 'fragmentId' is set if ( fragmentId == undefined || fragmentId == null ) { throw "Missing the required parameter 'fragmentId' when calling findOrganizationFragment" ; } var pathParams = { 'organizationId' : organizationId , 'fragmentId' : fragmentId } ; var queryParams = { } ; var headerParams = { } ; var formParams = { } ; var authNames = [ 'basicAuth' ] ; var contentTypes = [ 'application/json;charset=utf-8' ] ; var accepts = [ 'application/json;charset=utf-8' ] ; var returnType = Fragment ; return this . apiClient . callApi ( '/organizations/{organizationId}/fragments/{fragmentId}' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; } /**
     * Lists organizations page fragments
     * Lists organizations page fragments 
     * @param {String} organizationId Organization id
     * @param {Object} opts Optional parameters
     * @param {String} opts.slug Filter results by fragment slug
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/Fragment>}
     */ this . listOrganizationFragments = function ( organizationId , opts ) { opts = opts || { } ; var postBody = null ; // verify the required parameter 'organizationId' is set if ( organizationId == undefined || organizationId == null ) { throw "Missing the required parameter 'organizationId' when calling listOrganizationFragments" ; } var pathParams = { 'organizationId' : organizationId } ; var queryParams = { 'slug' : opts [ 'slug' ] } ; var headerParams = { } ; var formParams = { } ; var authNames = [ 'basicAuth' ] ; var contentTypes = [ 'application/json;charset=utf-8' ] ; var accepts = [ 'application/json;charset=utf-8' ] ; var returnType = [ Fragment ] ; return this . apiClient . callApi ( '/organizations/{organizationId}/fragments' , 'GET' , pathParams , queryParams , headerParams , formParams , postBody , authNames , contentTypes , accepts , returnType ) ; } }
Fragments service.
@module api/FragmentsApi
@version 0.0.139
 
Constructs a new FragmentsApi.
@alias module:api/FragmentsApi
@class
@param {module:ApiClient} apiClient Optional API client implementation to use,
default to {@link module:ApiClient#instance} if unspecified.
Fragments service .