CN112631694A - API (application programming interface) packaging calling method and system - Google Patents
API (application programming interface) packaging calling method and system Download PDFInfo
- Publication number
- CN112631694A CN112631694A CN202011445437.8A CN202011445437A CN112631694A CN 112631694 A CN112631694 A CN 112631694A CN 202011445437 A CN202011445437 A CN 202011445437A CN 112631694 A CN112631694 A CN 112631694A
- Authority
- CN
- China
- Prior art keywords
- interface
- api
- configuration file
- calling
- parameter
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention relates to an API (application program interface) interface packaging calling method and system, which solve the problems that in the prior art, API is originally manually packaged, calling needs to be manually introduced and configuration is dependent. The method comprises the following steps: reading a first interface configuration file of the API interface, and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface; adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file; adding API directory information in the configuration file into the API directory file; and scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, calling the API interface according to the sample request parameter after the scanning information is successfully matched, matching the return parameter of the API interface with the sample return parameter, and taking the second interface configuration file as a new configuration file if the matching is successful, and finishing the packaging and calling.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an API (application program interface) interface packaging calling method and system.
Background
An API (Application Programming Interface) is a predefined function or a convention for linking different components of a software system. To provide a set of routines that applications and developers can access based on certain software or hardware without accessing source code or understanding the details of the internal workings.
Currently, the main procedures for API encapsulation call are: firstly, storing an API interface in a project directory; then configuring a development environment, a test environment, a production environment and the like; repackage the request, configure the request mode, and request parameters, methods, etc.; setting time-out and request interception; then introducing a corresponding API function into the page; and calling an API interface. That is, the API package is still in the original state, and most processing methods still remain in the manual package and then upload to the server. The calling needs manual introduction and configuration dependence.
Therefore, a method and a system for fast packaging and convenient calling of a general API are lacked in the prior art.
Disclosure of Invention
In view of the foregoing analysis, embodiments of the present invention provide a method and a system for API interface encapsulation call, so as to solve the problems that the existing API is originally manually encapsulated, the call needs to be manually introduced, and the configuration is dependent.
In one aspect, an embodiment of the present invention provides an API interface encapsulation calling method, including:
reading a first interface configuration file of the API interface, and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface;
adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file;
adding API directory information in the first interface configuration file and the local configuration file into an API directory file;
and scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, calling the API interface according to the sample request parameter after the scanning information is successfully matched, matching the return parameter of the API interface with the sample return parameter, and taking the second interface configuration file as a new configuration file if the matching is successful, and finishing the packaging and calling.
Further, the sample request parameter is a call message for calling an API (application program interface); and the sample return parameter is data returned after calling the API.
Further, the API directory information includes: interface name, interface request type, sample request parameter, sample return parameter, timeout and interception mode.
Further, still include: scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, if the scanning information is not successfully matched, generating a third interface configuration file, adding the interface name, the interface request type, the timeout mode and the interception mode of the API interface to be called into the third interface configuration file, judging whether the return parameter is correct according to the input request parameter, if the return parameter is correct, calling successfully, adding the request parameter and the return parameter into the third interface configuration file, taking the third interface configuration file as a new configuration file, and finishing packaging.
Further, after the calling is successful, adding the API directory information in the third interface configuration file into the API directory file.
Further, after the encapsulation is finished, the second or third interface configuration file includes basic information of the API interface used for identification in subsequent encapsulation, where the basic information includes an interface name of the API, an interface request type, a sample request parameter, a sample return parameter, a timeout and an interception mode.
Further, modifying part of parameters in the second or third interface configuration file to realize subsequent packaging of the API interface.
In another aspect, an embodiment of the present invention provides an API interface encapsulation calling system, including:
the interface configuration file information acquisition module is used for reading a first interface configuration file of the API interface and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface;
the local configuration file information matching module is used for adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file;
the API directory file updating module is used for adding the API directory information in the first interface configuration file and the local configuration file into an API directory file;
and the API automatic test calling module is used for scanning and matching the calling mode, the interface name and the interface request type of the API to be called in the API directory file, calling the API according to the sample request parameter after the scanning information is successfully matched, matching the return parameter of the API with the sample return parameter, and saving the second interface configuration file as a new configuration file after the matching is successful.
Further, still include: and the API (application program interface) configuration file updating module is used for scanning and matching the calling mode, the interface name and the interface request type of the API to be called in the API directory file, if the scanning information is not successfully matched, generating a third interface configuration file, adding the interface name, the interface request type, the timeout mode and the interception mode of the API to be called into the third interface configuration file, judging whether the return parameters are correct according to the input request parameters, if the return parameters are correct, calling successfully, adding the request parameters and the return parameters into the third interface configuration file, and storing the third interface configuration file as a new configuration file.
Further, after the API configuration file updating module updates and generates the third interface configuration file, the API directory file updating module needs to add the API directory information to the API directory file.
Compared with the prior art, the invention can realize at least one of the following beneficial effects:
(1) the complex configuration and uploading during the packaging of the API interface are avoided, and filling type packaging is realized; and the packaging is finished and the automatic test call is carried out for verification so as to finish the process of packaging the interface.
(2) When the API interface is updated and called, the encoding and calling are associated in real time and updated in real time without manual updating and addition of dependence.
(3) Therefore, time is saved on the packaging and calling of the API interface, and a lot of error possibility is avoided.
In the invention, the technical schemes can be combined with each other to realize more preferable combination schemes. Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It should be apparent that the drawings in the following description are merely exemplary, and that other embodiments can be derived from the drawings provided by those of ordinary skill in the art without inventive effort.
FIG. 1 is a flowchart illustrating an API interface package calling method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an API interface package call system according to another embodiment of the present application;
fig. 3 is a schematic diagram of a hardware structure of an electronic device that executes the API interface encapsulation calling method according to the embodiment of the present invention.
Detailed Description
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention and not to limit the scope of the invention.
As shown in fig. 1, a specific embodiment of the present invention discloses an API interface encapsulation calling method, including:
s10, reading a first interface configuration file of the API interface, and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface;
specifically, the sample request parameter is a call packet for calling the API interface, for example: the call message of the login interface is an account and a password, and can be in a key _ value or json format:
key _ value format: username ═ aaaa & password 123456
json format: { 'username': aaaa ',' password ': 123456' };
the sample return parameter is data returned after calling the API;
the interface request type refers to a request mode of an interface, and comprises the following steps: the get request is used for acquiring information and is mainly used for inquiring data; a post request may cause the establishment of a new resource, and data (such as a submitted form and an uploaded file) is submitted to a specified resource position to make a request; in addition, the method also comprises put request and delete request.
Optionally, the first interface profile companion interface of the API interface may be reused by other items.
S20, adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file;
specifically, the local configuration file is preset; the configuration file of the local machine needs to be manually maintained to configure different timeout and interception modes corresponding to each request type, the configuration file aims at the local machine or all projects, needs to be continuously maintained for a long time, can be used when different APIs are packaged in different projects, the maintenance frequency is not too high, the configuration file is a process of continuously accumulating and expanding, and the automatic addition of an API interface can be realized on the premise that the file is well maintained. Alternatively, the native configuration file may be an XML file.
If the interface request is not fed back within the specified time, the calling service is interrupted, the timeout is prompted, or the service is called again; interception is to intercept non-login state access and no-permission access, for example: and (5) token checking and detecting the login state.
S30, adding the API directory information in the first interface configuration file and the local configuration file into an API directory file; specifically, the API directory information includes: interface name, interface request type, sample request parameter, sample return parameter, timeout and interception mode. The API directory file is related code and project configuration information automatically generated through two operations of S10 and S20.
And S40, scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file. Specifically, the calling modes are calling modes such as "native ajax", "ajax in jquery", "fetch designed based on premium", and the like, and different calling modes require respective setting of information such as a request line, a request body, and a received response. Corresponding to the calling mode in the interface configuration file, the processing is performed according to the specified mode.
And S50, after the scanning information is successfully matched, calling an API interface according to the sample request parameters, matching the return parameters of the API interface with the sample return parameters, and if the matching is successful, taking the second interface configuration file as a new configuration file, and finishing the packaging and calling.
S60, scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, if the scanning information is not successfully matched, generating a third interface configuration file, adding the interface name, the interface request type, the timeout mode and the interception mode of the API interface to be called into the third interface configuration file, judging whether the return parameter is correct according to the input request parameter, if the return parameter is correct, calling successfully, adding the request parameter and the return parameter into the third interface configuration file, taking the third interface configuration file as a new configuration file, and finishing packaging.
Specifically, if the scan information is not successfully matched, it indicates that the corresponding interface configuration file lacks relevant information or causes a problem due to other unpredictable factors. The package through step S50 is needed to complete the relevant information and test calls. Only in the case of no matching, the interface configuration file needs to perform filling type input parameters, and record the request parameters of the time for the next packaging use. The third configuration file is generated on the basis of the original configuration file, and the old configuration file is reserved and may be needed to be referred to later, but the reserved quantity of the old configuration file is limited.
And after the calling is successful, adding the API directory information in the newly generated third interface configuration file into the API directory file, and re-performing the automatic test calling in the step S40.
After the encapsulation is finished, the second or third interface configuration file comprises basic information of the API interface used for identification in subsequent encapsulation, wherein the basic information comprises an interface name, an interface request type, a sample request parameter, a sample return parameter, a timeout mode and an interception mode of the API. In addition, partial parameters in the second or third interface configuration file are modified, and subsequent packaging of the API interface can be realized.
As shown in fig. 2, another embodiment of the present application provides an API interface package calling system, including: an interface configuration file information obtaining module 110, a local configuration file information matching module 120, an API directory file updating module 130, and an API interface automatic test calling module 140.
An interface configuration file information obtaining module 110, configured to read a first interface configuration file of an API interface, and automatically obtain an interface name, an interface request type, a sample request parameter, and a sample return parameter of the API interface;
a local configuration file information matching module 120, configured to add the timeout and interception manner corresponding to the interface request type in the local configuration file to the first interface configuration file, and generate a second interface configuration file;
an API directory file updating module 130, configured to add the first interface configuration file and API directory information in the local configuration file to an API directory file;
the API interface automatic test calling module 140 is configured to scan and match a calling mode, an interface name, and an interface request type of an API interface to be called in the API directory file, call the API interface according to the sample request parameter after the scanning information is successfully matched, match a return parameter of the API interface with the sample return parameter, and store the second interface configuration file as a new configuration file after the matching is successful.
Specifically, the API interface encapsulates the calling system, which further includes: an API interface configuration file updating module 150, configured to scan and match the calling mode, the interface name, and the interface request type of the API interface to be called in the API directory file, if the scanning information is not successfully matched, generate a third interface configuration file, add the interface name, the interface request type, the timeout, and the interception mode of the API interface to be called into the third interface configuration file, determine whether the return parameter is correct according to the input request parameter, if the return parameter is correct, the calling is successful, add the request parameter and the return parameter into the third interface configuration file, and store the third interface configuration file as a new configuration file.
After the API configuration file updating module 150 updates and generates the third interface configuration file, the API directory information needs to be added to the API directory file through the API directory file updating module 130.
Hereinafter, the API interface encapsulation call is described by way of a specific example:
(1) reading a first interface configuration file of the API, acquiring an API interface with an interface name of 'API interface one', and acquiring an interface request type by taking a post login operation as an example:
sample request parameters:
the sample return parameters are: the 200 status code represents success.
(2) Reading the XML configuration file, matching the interface request type to post login operation, correspondingly adding a token intercepting mode, and intercepting the access rights of all other pages except the login page. And adding the API request response timeout time to 10s, and setting the maximum number of times of re-calling to 3 times.
(3) And adding an interface name, an interface request type, a sample request parameter, a sample return parameter, a timeout mode and an interception mode into the API directory in the project.
(4) And scanning the obtained interface name and the interface request type in the API directory, automatically calling a logic method of the API according to the obtained username and password as sample request parameters, successfully calling when the interface feeds back 200 successful status codes, finishing packaging, and otherwise failing.
(5) If the corresponding interface name and request type are not scanned in the API directory, manually inputting the username and password by the pop-up window, automatically calling the logic method of the API according to the input username and password as sample request parameters, successfully calling when the interface feeds back a 200 successful status code, and finishing packaging.
(6) After the completion, the generated configuration file contains the interface name (API interface I) of the API in the above step, the interface request type (post, login operation), the request parameter (user name and password, http:// API. xxxx. com/logic /) and the return parameter (200 status code represents success), the newly added interception mode and timeout response in (2), and the request parameter and the return parameter input in (5).
And in the API packaging and calling process, automatically testing the test case to detect whether the API is successfully packaged into a project, packaging the configuration file, and waiting for the generated configuration file to be reused for subsequent multiplexing or modification.
Referring to fig. 3, another embodiment of the present invention further provides an electronic device for executing the API interface package calling method in the foregoing embodiment. The electronic device includes:
one or more processors 710 and a memory 720, one processor 710 being illustrated in fig. 3.
The electronic device executing the API interface package calling method may further include: an input device 730 and an output device 740.
The processor 710, the memory 720, the input device 730, and the output device 740 may be connected by a bus or other means, such as the bus connection in fig. 3.
The memory 720, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules (units) corresponding to the API interface package calling method in the embodiment of the present invention. The processor 710 executes various functional applications of the server and data processing by running nonvolatile software programs, instructions and modules stored in the memory 720, that is, implements the icon display method of the above-described method embodiment.
The memory 720 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store information on the number of acquired reminders for the application program, and the like. Further, the memory 720 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 720 may optionally include memory located remotely from processor 710, which may be connected over a network to a processing device operating the list items. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 730 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the API interface package calling system. The output device 740 may include a display device such as a display screen.
The one or more modules are stored in the memory 720 and, when executed by the one or more processors 710, perform the API interface encapsulation calling method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The electronic device of embodiments of the present invention may exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) Other electronic devices with reminding item recording function.
The above-described embodiments of the apparatus are merely illustrative, and the units (modules) described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
The embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer-executable instructions, wherein when the computer-executable instructions are executed by an electronic device, the electronic device is caused to execute an API interface encapsulation calling method in any method embodiment described above.
Embodiments of the present invention provide a computer program product, where the computer program product includes a computer program stored on a non-transitory computer readable storage medium, where the computer program includes program instructions, where the program instructions, when executed by an electronic device, cause the electronic device to execute an API interface encapsulation calling method in any of the above method embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. An API (application programming interface) packaging calling method is characterized by comprising the following steps:
reading a first interface configuration file of the API interface, and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface;
adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file;
adding API directory information in the first interface configuration file and the local configuration file into an API directory file;
and scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, calling the API interface according to the sample request parameter after the scanning information is successfully matched, matching the return parameter of the API interface with the sample return parameter, and taking the second interface configuration file as a new configuration file if the matching is successful, and finishing the packaging and calling.
2. The API interface package calling method according to claim 1, wherein the sample request parameter is a call packet for calling the API interface; and the sample return parameter is data returned after calling the API.
3. The method of claim 1, wherein the API directory information comprises: interface name, interface request type, sample request parameter, sample return parameter, timeout and interception mode.
4. The API interface package calling method of claim 1 further comprising:
scanning and matching the calling mode, the interface name and the interface request type of the API interface to be called in the API directory file, if the scanning information is not successfully matched, generating a third interface configuration file, adding the interface name, the interface request type, the timeout mode and the interception mode of the API interface to be called into the third interface configuration file, judging whether the return parameter is correct according to the input request parameter, if the return parameter is correct, calling successfully, adding the request parameter and the return parameter into the third interface configuration file, taking the third interface configuration file as a new configuration file, and finishing packaging.
5. The API interface package calling method of claim 4, wherein the API directory information in the third interface configuration file is added to an API directory file after the call is successful.
6. The API interface packaging calling method according to claim 1 or 4, wherein after the packaging is finished, the second or third interface configuration file includes basic information of the API interface used for identification in subsequent packaging, and the basic information includes an interface name of the API, an interface request type, a sample request parameter, a sample return parameter, a timeout and an interception mode.
7. The API interface package calling method of claim 1 or 4, wherein a portion of the parameters in the second or third interface configuration file are modified to enable subsequent packaging of the API interface.
8. An API interface package call system, comprising:
the interface configuration file information acquisition module is used for reading a first interface configuration file of the API interface and automatically acquiring an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface;
the local configuration file information matching module is used for adding the overtime and interception mode corresponding to the interface request type in the local configuration file into the first interface configuration file to generate a second interface configuration file;
the API directory file updating module is used for adding the API directory information in the first interface configuration file and the local configuration file into an API directory file;
and the API automatic test calling module is used for scanning and matching the calling mode, the interface name and the interface request type of the API to be called in the API directory file, calling the API according to the sample request parameter after the scanning information is successfully matched, matching the return parameter of the API with the sample return parameter, and saving the second interface configuration file as a new configuration file after the matching is successful.
9. The API interface package call system of claim 8 further comprising:
and the API (application program interface) configuration file updating module is used for scanning and matching the calling mode, the interface name and the interface request type of the API to be called in the API directory file, if the scanning information is not successfully matched, generating a third interface configuration file, adding the interface name, the interface request type, the timeout mode and the interception mode of the API to be called into the third interface configuration file, judging whether the return parameter is correct according to the input request parameter, if the return parameter is correct, adding the request parameter and the return parameter into the third interface configuration file, and storing the third interface configuration file as a new configuration file.
10. The API interface package calling system of claim 8, wherein after the API interface configuration file updating module updates the third interface configuration file, the API directory file updating module is required to add the API directory information to the API directory file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011445437.8A CN112631694B (en) | 2020-12-11 | 2020-12-11 | API (application program interface) encapsulation calling method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011445437.8A CN112631694B (en) | 2020-12-11 | 2020-12-11 | API (application program interface) encapsulation calling method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112631694A true CN112631694A (en) | 2021-04-09 |
CN112631694B CN112631694B (en) | 2023-08-11 |
Family
ID=75309580
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011445437.8A Active CN112631694B (en) | 2020-12-11 | 2020-12-11 | API (application program interface) encapsulation calling method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112631694B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113766030A (en) * | 2021-09-13 | 2021-12-07 | 城云科技(中国)有限公司 | Automatic parameter entering method and device for interface constant parameters |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160314219A1 (en) * | 2014-04-10 | 2016-10-27 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for invoking application programming interface |
CN106484421A (en) * | 2016-10-11 | 2017-03-08 | 武汉斗鱼网络科技有限公司 | A kind of method and system quickly generating api interface |
WO2017054531A1 (en) * | 2015-09-30 | 2017-04-06 | 中兴通讯股份有限公司 | Yang model-based compiling method, and corresponding interface, component, and system |
CN106598851A (en) * | 2016-12-05 | 2017-04-26 | 广州唯品会信息科技有限公司 | Software interface test method and system |
CN107423041A (en) * | 2016-03-31 | 2017-12-01 | 阿里巴巴集团控股有限公司 | Method and apparatus for realizing application programming interface configuration and calling |
CN109857404A (en) * | 2019-01-11 | 2019-06-07 | 平安科技(深圳)有限公司 | The packaging method and device of SDK interface, storage medium, electronic equipment |
CN110196733A (en) * | 2019-06-06 | 2019-09-03 | 深圳市伊欧乐科技有限公司 | A kind of default API document structure tree method, apparatus, equipment and storage medium |
CN110333897A (en) * | 2019-05-09 | 2019-10-15 | 重庆天蓬网络有限公司 | A kind of interface allocation method, device, medium and electronic equipment |
US20190325074A1 (en) * | 2018-04-18 | 2019-10-24 | International Business Machines Corporation | Application programing interface document generator |
CN110489101A (en) * | 2019-07-15 | 2019-11-22 | 北京字节跳动网络技术有限公司 | Interface analogy method, system, medium and electronic equipment |
CN110688142A (en) * | 2019-10-10 | 2020-01-14 | 星环信息科技(上海)有限公司 | Method, device and storage medium for publishing application programming interface |
CN110908890A (en) * | 2018-09-18 | 2020-03-24 | 亿阳信通股份有限公司 | Automatic test method and device for interface |
CN110990269A (en) * | 2019-11-26 | 2020-04-10 | 苏宁云计算有限公司 | Interface testing method, device and system |
CN111488285A (en) * | 2020-04-15 | 2020-08-04 | 北京字节跳动网络技术有限公司 | Interface testing method and device, electronic equipment and computer readable storage medium |
CN111782546A (en) * | 2020-07-23 | 2020-10-16 | 北京斗米优聘科技发展有限公司 | Automatic interface testing method and device based on machine learning |
CN112035163A (en) * | 2020-09-03 | 2020-12-04 | 北京字节跳动网络技术有限公司 | Software development kit configuration method, device and storage medium |
CN112052038A (en) * | 2020-09-09 | 2020-12-08 | 云账户技术(天津)有限公司 | Method and device for generating front-end interface |
-
2020
- 2020-12-11 CN CN202011445437.8A patent/CN112631694B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160314219A1 (en) * | 2014-04-10 | 2016-10-27 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for invoking application programming interface |
WO2017054531A1 (en) * | 2015-09-30 | 2017-04-06 | 中兴通讯股份有限公司 | Yang model-based compiling method, and corresponding interface, component, and system |
CN107423041A (en) * | 2016-03-31 | 2017-12-01 | 阿里巴巴集团控股有限公司 | Method and apparatus for realizing application programming interface configuration and calling |
CN106484421A (en) * | 2016-10-11 | 2017-03-08 | 武汉斗鱼网络科技有限公司 | A kind of method and system quickly generating api interface |
CN106598851A (en) * | 2016-12-05 | 2017-04-26 | 广州唯品会信息科技有限公司 | Software interface test method and system |
US20190325074A1 (en) * | 2018-04-18 | 2019-10-24 | International Business Machines Corporation | Application programing interface document generator |
CN110908890A (en) * | 2018-09-18 | 2020-03-24 | 亿阳信通股份有限公司 | Automatic test method and device for interface |
CN109857404A (en) * | 2019-01-11 | 2019-06-07 | 平安科技(深圳)有限公司 | The packaging method and device of SDK interface, storage medium, electronic equipment |
CN110333897A (en) * | 2019-05-09 | 2019-10-15 | 重庆天蓬网络有限公司 | A kind of interface allocation method, device, medium and electronic equipment |
CN110196733A (en) * | 2019-06-06 | 2019-09-03 | 深圳市伊欧乐科技有限公司 | A kind of default API document structure tree method, apparatus, equipment and storage medium |
CN110489101A (en) * | 2019-07-15 | 2019-11-22 | 北京字节跳动网络技术有限公司 | Interface analogy method, system, medium and electronic equipment |
CN110688142A (en) * | 2019-10-10 | 2020-01-14 | 星环信息科技(上海)有限公司 | Method, device and storage medium for publishing application programming interface |
CN110990269A (en) * | 2019-11-26 | 2020-04-10 | 苏宁云计算有限公司 | Interface testing method, device and system |
CN111488285A (en) * | 2020-04-15 | 2020-08-04 | 北京字节跳动网络技术有限公司 | Interface testing method and device, electronic equipment and computer readable storage medium |
CN111782546A (en) * | 2020-07-23 | 2020-10-16 | 北京斗米优聘科技发展有限公司 | Automatic interface testing method and device based on machine learning |
CN112035163A (en) * | 2020-09-03 | 2020-12-04 | 北京字节跳动网络技术有限公司 | Software development kit configuration method, device and storage medium |
CN112052038A (en) * | 2020-09-09 | 2020-12-08 | 云账户技术(天津)有限公司 | Method and device for generating front-end interface |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113766030A (en) * | 2021-09-13 | 2021-12-07 | 城云科技(中国)有限公司 | Automatic parameter entering method and device for interface constant parameters |
Also Published As
Publication number | Publication date |
---|---|
CN112631694B (en) | 2023-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107908485B (en) | Interface parameter transmission method, device, equipment and computer readable storage medium | |
CN111782492B (en) | Page first screen loading duration testing method and device, computer equipment and medium | |
CN104363226B (en) | Method, device and system for logging in operating system | |
CN107861713A (en) | Data calling method, device and computer-readable recording medium | |
CN108089985B (en) | Method, device and equipment for verifying interface return parameters and readable storage medium | |
US20170090950A1 (en) | Information processing device, information processing method, and computer readable storage medium | |
CN107807841B (en) | Server simulation method, device, equipment and readable storage medium | |
CN112738046B (en) | One-key login method, terminal and system server | |
CN104618316A (en) | Method, device and system of safety verification | |
CN107256349A (en) | Dynamic base method for preventing fraudulent-using, device, electronic equipment and readable storage medium storing program for executing | |
CN112996020B (en) | Bluetooth-based automatic test method and device and Bluetooth test terminal | |
CN107908416A (en) | Microcontroller firmware upgrade method, device and computer-readable recording medium | |
CN113672441A (en) | Method and device for testing intelligent equipment | |
CN112631694A (en) | API (application programming interface) packaging calling method and system | |
CN113935010A (en) | Mobile banking login method and device based on block chain and 5G message | |
CN112699034A (en) | Virtual login user construction method, device, equipment and storage medium | |
CN112433935A (en) | Test method, test device, electronic equipment and storage medium | |
CN116702668A (en) | Regression testing method and device, electronic equipment and storage medium | |
CN110752933A (en) | Verification code input method and device, electronic equipment and storage medium | |
CN112749355B (en) | Page display method, device, terminal, server and storage medium | |
KR101684454B1 (en) | Hybrid application and event handling method thereof | |
CN113852610A (en) | Message processing method and device, computer equipment and storage medium | |
CN113050985A (en) | Front-end engineering dependence automatic registration method and device | |
AU2013206622B2 (en) | Download management method and device based on Android browser | |
CN112000381B (en) | Resource loading method and device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |