How do API game interfaces connect
Application Programming Interface
What is the API
The English full name of API is "application programming interface". It is the most basic thing of the operating system, through which computer hardware can be operated. Nowadays, it can be seen everywhere in the life of various industries, such as water and electricity fee, gas fee, fixed line broadband, traffic fine can be paid on the mobile phone, thus avoiding a series of tedious operations. This year's new crown statistics will almost have statistical diagnosis data and other information every hour when reading news, but behind the data are the API running silently.
API is like a channel for data transmission. The entry needs to request data, which is equivalent to a customs clearance password, while the exit needs to return results. The user of the interface doesn't need to care about how the interface is implemented, only whether he can get the final return result of the interface. The provider of the interface needs to define the interface request parameters, response contents, etc., and also needs to pay attention to the performance of the interface, whether it can meet the high concurrent calls, and how stable the interface is In short, an API is a predefined function.
API documentation The English "API developer Doc" is the most troublesome thing for developers. In addition to developing API interfaces, they also need to write well API documentation
API interfaces are generally divided into interface description, interface address, request method, request parameters, corresponding contents, error code and examples.
1. Interface description
Briefly describe the logic and function of the interface
2. Interface address
The formal URL of the interface and the URL of the interface test. The demander obtains the response content by calling the interface URL
3. Request method
Generally speaking, the most common request methods for interfaces are get and post, that is, read interface and write interface. Through these two methods, the addition, deletion, query and modification of data can be realized. Addition, deletion and modification are essentially written actions.
4. Request parameters
That is, the name and rules of the field name to be requested: what fields are they, what type of field are they, whether they are required, etc
5. Response content
Field names and rules returned by the interface.
注意:大部分开发往往不会把所有的字段罗列,只会列出比较重要的字段。当你发现,接口文档中没有你需求的字段,别着急找开发,可以看下实例中,有没有需求的字段。
Classify the interface errors with codes, so as to quickly find the cause of the error and solve the problem.
7. Examples
The content of the response when actually called.
到此无论是API game interface还是其他任何接口对接应该都会有一定的了解 做产品经理是难的,因为要懂得的东西太多了,而做产品经理也是容易的,因为有些东西根本不需要精通,只要略懂就可以了,基本上你能把以上几个部分搞明白,看懂一个API文档是没有问题的,和技术人员对接的时候也不会再被吐槽是个傻逼。总之,产品经理做得好就风风光光,做不好会人人喊打,根本就是条不归路,而我们已经在这条路上越走越远……
请先
!