UNPKG

@smoothnlp/smoothnlp-api

Version:
153 lines (133 loc) 4.69 kB
/** * Company * 企业相关信息 - 工商 * 默认域名: service-1ffy5rfz-1259459016.ap-shanghai.apigateway.myqcloud.com/release * 自定义域名: data.service.company.smoothnlp.com/ * * OpenAPI spec version: 2019-09-04 17:44:33 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 2.4.0-SNAPSHOT * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['ApiClient'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../ApiClient')); } else { // Browser globals (root is window) if (!root.Company) { root.Company = {}; } root.Company.CompanyApi = factory(root.Company.ApiClient); } }(this, function(ApiClient) { 'use strict'; /** * Company service. * @module api/CompanyApi * @version 2019-09-04 17:44:33 */ /** * Constructs a new CompanyApi. * @alias module:api/CompanyApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { this.apiClient = apiClient || ApiClient.instance; /** * Callback function to receive the result of the getCompanyExact operation. * @callback module:api/CompanyApi~getCompanyExactCallback * @param {String} error Error message, if any. * @param {'String'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * 企业全称查企业工商 * * @param {String} name 企业工商名全称 * @param {module:api/CompanyApi~getCompanyExactCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link 'String'} */ this.getCompanyExact = function(name, callback) { var postBody = null; // verify the required parameter 'name' is set if (name === undefined || name === null) { throw new Error("Missing the required parameter 'name' when calling getCompanyExact"); } var pathParams = { }; var queryParams = { 'name': name, }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['JSON']; var returnType = 'String'; return this.apiClient.callApi( '/company_exact', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } /** * Callback function to receive the result of the getCompanyFuzzy operation. * @callback module:api/CompanyApi~getCompanyFuzzyCallback * @param {String} error Error message, if any. * @param {'String'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * 企业简称查企业工商 * * @param {String} name 企业简称 * @param {Object} opts Optional parameters * @param {Number} opts.offset 第几页 (default to 0) * @param {module:api/CompanyApi~getCompanyFuzzyCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link 'String'} */ this.getCompanyFuzzy = function(name, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'name' is set if (name === undefined || name === null) { throw new Error("Missing the required parameter 'name' when calling getCompanyFuzzy"); } var pathParams = { }; var queryParams = { 'name': name, 'offset': opts['offset'], }; var collectionQueryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = ['application/json']; var accepts = ['JSON']; var returnType = 'String'; return this.apiClient.callApi( '/company_fuzzy', 'GET', pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); } }; return exports; }));