Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

API interface packaging and calling method and system

A technology of API interface and calling method, which is applied in the computer field, can solve the problems of manually introducing and configuring dependencies for calling, and achieve the effect of avoiding errors and saving time

Active Publication Date: 2021-04-09
YGSOFT INC
View PDF17 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of the above analysis, the embodiment of the present invention aims to provide an API interface encapsulation calling method and system to solve the problem of the original manual encapsulation of the existing API and the need to manually introduce and configure dependencies for the call

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • API interface packaging and calling method and system
  • API interface packaging and calling method and system
  • API interface packaging and calling method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] Preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of the application and together with the embodiments of the present invention are used to explain the principle of the present invention and are not intended to limit the scope of the present invention.

[0034] Such as figure 1 As shown, a specific embodiment of the present invention discloses an API interface encapsulation calling method, comprising:

[0035] S10. Read the first interface configuration file of the API interface, and automatically obtain the interface name, interface request type, sample request parameters and sample return parameters of the API interface;

[0036] Specifically, the sample request parameter is the call message for calling the API interface. For example, the call message for the login interface is the account and password, which can be in key_value or json for...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an API (Application Programming Interface) packaging and calling method and system, and solves the problems that in the prior art, API original manual packaging and calling need to be manually introduced and depends on configuration. The method comprises the steps of reading a first interface configuration file of an API interface, and automatically obtaining an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface; adding a timeout and interception mode corresponding to the interface request type in a local configuration file into the first interface configuration file to generate a second interface configuration file; adding the API directory information in the configuration file into an API directory file; scanning and matching a calling mode, an interface name and an interface request type of a to-be-called API in the API directory file, calling the API according to the sample request parameter after the scanning information is successfully matched, matching a return parameter of the API with a sample return parameter; if the matching is successful, taking a second interface configuration file as a new configuration file, and ending packaging calling.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to an API interface encapsulation calling method and system. Background technique [0002] API (Application Programming Interface, application programming interface) is some pre-defined functions, or refers to the agreement of different components of the software system. A set of routines that applications and developers can access based on a piece of software or hardware without accessing the source code or understanding the details of the inner workings. [0003] At present, the main process of API encapsulation and calling is as follows: first store the API interface in the project directory; then configure the development environment, test environment and production environment, etc.; re-encapsulate the request, configure the request method, and request parameters, methods, etc.; set timeout , Request interception; then introduce the corresponding API function on the page; ca...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/448G06F9/445
CPCG06F9/449G06F9/44505G06F9/44521Y02D10/00
Inventor 钟凯黄选成
Owner YGSOFT INC
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products