Development of Sina Weibo API debugging tools

Source: Internet
Author: User

Many park friends are trying Sina Weibo APIs and have developed many applications. During the development process, the API documentation has a great role. If the parameter values and the structure of returned data are clearly described, developers can spend a lot of time exploring. Although the documentation of Douban API is not perfect, it is already very good. Weibo API documentation, especially the example of returned data. The field meanings indicate that there are some problems that do not match the actual conditions, which brings a lot of trouble to developers. We look forward to a tool for API debugging. You can edit API parameters and send API requests to conveniently view the returned data. With an idea, I began to drum up and name it "Weibo API debugging platform ".

Technical Solution

For Web applications, the server uses the microblog SDK to complete oauth authentication and API request sending, and returns the execution result to the client. The client completes API selection, API request parameter editing, and sends API requests to the server, returns JSON data.

The server uses Python and bottle + jinja2 + beaker. Weibo SDK uses Weibo. py and applications are deployed on SAES. The client selects Bootstrap + jquery.

JSON data presentation

Displaying the original JSON string is meaningless to developers. The formatted JSON data has a certain indent structure, but it is not convenient to view a large amount of data. Use jsonview. JS library, which can convert JSON data into HTML, color different data types, and fold nested data. When you view a large amount of JSON returned data, you can quickly and conveniently find the desired data segment.

Implementation

Only one is provided. If you are interested, please try it out,CodeHosted on GitHub. Please be correct.

Tool address: http://weiboapidebugger.sinaapp.com

Code hosting: https://github.com/gzb1985/weibo-api-debugger

 

 

P.s. Has this idea is in early August, at that time to achieve a demo, after which has been stagnant, middle September surprise found that Weibo official also has a test tool (http://open.weibo.com/tools/console), very useful. Although the API debugging platform has already been repeated, it is still improved and has its own characteristics. Let's explain this idea.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.