Home Backend Development PHP Tutorial Share Taobao API auxiliary function-applicable CI framework_PHP tutorial

Share Taobao API auxiliary function-applicable CI framework_PHP tutorial

Jul 20, 2016 am 11:12 AM
api introduce function share classmate article frame Taobao Auxiliary Be applicable

This article introduces and shares the Taobao API auxiliary function-applicable CI framework to all students. Friends who need to know more can refer to it.

Recently I am rewriting a Taobao website. Considering the future scalability, I integrated it into CI. This raises a question. How to integrate Taobao’s SDK into the class library? After carefully reading the Taobao API documentation, I found a non-SDK calling method. Based on this, I modified it and integrated it into a CI helper function. Now I share the source code with everyone, hoping to help students in need.

Calling the method is very simple. Pass in an array parameter, where method is the API interface you plan to call, and the remaining parameters are filled in according to the actual needs of the API interface. Let me give you a calling example here.

The code is as follows
 代码如下 复制代码


  
$paramArr = array(   
    ’method’    => ’taobao.taobaoke.items.get’,  //API名称   
    ’fields’    =>’num_iid,title,nick,pic_url,price,click_url,seller_credit_score,   
commission,commission_rate,volume’,   
    ’pid’       =>YOUR PID,   
    ’page_size’ =>YOUR PAGE_SIZE,   
    ’sort’      =>YOUR SORT,   
    ’keyword’   =>your keyword,   
);   
$this->load->helper(‘taoapi’);   
$result['item_list'] = send($paramArr);  

Copy code

  
$paramArr = array(  
 'method' => 'taobao.taobaoke.items.get', //API name
'fields' =>'num_iid,title,nick,pic_url,price,click_url,seller_credit_score,
commission,commission_rate,volume',
'pid' =>YOUR PID, 'page_size' =>YOUR PAGE_SIZE,
'sort' =>YOUR SORT,
'keyword' =>your keyword,
);
$this ->load->helper('taoapi');
$result['item_list'] = send($paramArr);

http://www.bkjia.com/PHPjc/444590.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/444590.html
TechArticle
This article introduces and shares Taobao API auxiliary functions-applicable CI framework, friends who need to know more can refer to it. Recently, I am rewriting a Taobao website. Considering the future scalability, so...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Detailed introduction of Samsung S24ai functions Detailed introduction of Samsung S24ai functions Jun 24, 2024 am 11:18 AM

2024 is the first year of AI mobile phones. More and more mobile phones integrate multiple AI functions. Empowered by AI smart technology, our mobile phones can be used more efficiently and conveniently. Recently, the Galaxy S24 series released at the beginning of the year has once again improved its generative AI experience. Let’s take a look at the detailed function introduction below. 1. Generative AI deeply empowers Samsung Galaxy S24 series, which is empowered by Galaxy AI and brings many intelligent applications. These functions are deeply integrated with Samsung One UI6.1, allowing users to have a convenient intelligent experience at any time, significantly improving the performance of mobile phones. Efficiency and convenience of use. The instant search function pioneered by the Galaxy S24 series is one of the highlights. Users only need to press and hold

Taobao internal beta after-sales negotiation tool: improve communication efficiency with consumers and effectively reduce refund rates Taobao internal beta after-sales negotiation tool: improve communication efficiency with consumers and effectively reduce refund rates Aug 07, 2024 pm 04:35 PM

This website reported on August 2 that while loosening the "refund only" policy, Taobao will also launch an after-sales negotiation tool for all Taobao and Tmall merchants to meet the independent negotiation needs of merchants and consumers in after-sales scenarios. 1. Under normal circumstances, when a buyer initiates an after-sales service, the merchant can only choose to agree or refuse. For non-standard buyers’ after-sales demands (such as requesting a full refund after receiving the goods, being unable to provide valid vouchers for merchant liability refunds, etc.), merchants can only regard rejection as a communication channel with buyers, allowing them to For issues that need to be resolved through negotiation, rude rejection increases the platform's help-seeking rate and the platform's liability rate risk. According to reports, this tool is currently in internal testing for some merchants, and can automatically provide a variety of solutions for consumers to choose from according to the different needs of consumers in after-sales scenarios, such as sending comfort words to consumers.

How to evaluate the cost-effectiveness of commercial support for Java frameworks How to evaluate the cost-effectiveness of commercial support for Java frameworks Jun 05, 2024 pm 05:25 PM

Evaluating the cost/performance of commercial support for a Java framework involves the following steps: Determine the required level of assurance and service level agreement (SLA) guarantees. The experience and expertise of the research support team. Consider additional services such as upgrades, troubleshooting, and performance optimization. Weigh business support costs against risk mitigation and increased efficiency.

How does the learning curve of PHP frameworks compare to other language frameworks? How does the learning curve of PHP frameworks compare to other language frameworks? Jun 06, 2024 pm 12:41 PM

The learning curve of a PHP framework depends on language proficiency, framework complexity, documentation quality, and community support. The learning curve of PHP frameworks is higher when compared to Python frameworks and lower when compared to Ruby frameworks. Compared to Java frameworks, PHP frameworks have a moderate learning curve but a shorter time to get started.

How do the lightweight options of PHP frameworks affect application performance? How do the lightweight options of PHP frameworks affect application performance? Jun 06, 2024 am 10:53 AM

The lightweight PHP framework improves application performance through small size and low resource consumption. Its features include: small size, fast startup, low memory usage, improved response speed and throughput, and reduced resource consumption. Practical case: SlimFramework creates REST API, only 500KB, high responsiveness and high throughput

JD.com, Taobao, Pinduoduo, Douyin, and Kuaishou jointly signed the 'Self-discipline Convention on Compliance and Operation of Online Transactions' JD.com, Taobao, Pinduoduo, Douyin, and Kuaishou jointly signed the 'Self-discipline Convention on Compliance and Operation of Online Transactions' Aug 23, 2024 am 12:05 AM

Signatories of the "Convention on Self-Discipline in Compliance and Operation of Online Transactions": Beijing Jingdong Century Trading Co., Ltd. Taotian Co., Ltd. Shanghai Xunmeng Information Technology Co., Ltd. Shanghai Gewuzhipin Network Technology Co., Ltd. Beijing Kuaishou Technology Co., Ltd. Main contents: 1. Implementation of platform responsibilities Establish a credit evaluation mechanism, a product quality spot check mechanism, an advertising release management mechanism, strengthen the management of online live broadcasts and short video marketing activities, short video content management, and regulate competition within the platform. 2. Protection of consumer rights and interests. Adhere to social ethics and operate with integrity to protect the smooth flow of consumers' personal information. Channels for Consumer Complaints 3. Strictly prohibit unfair competition and healthy competition within the legal framework. Prevent malicious behavior from exploiting rules for profit. Prevent abuse of rules from causing unreasonable losses to operators within the platform. 4. Regulate price behavior. Clearly mark prices and prohibit profit.

How to choose the best golang framework for different application scenarios How to choose the best golang framework for different application scenarios Jun 05, 2024 pm 04:05 PM

Choose the best Go framework based on application scenarios: consider application type, language features, performance requirements, and ecosystem. Common Go frameworks: Gin (Web application), Echo (Web service), Fiber (high throughput), gorm (ORM), fasthttp (speed). Practical case: building REST API (Fiber) and interacting with the database (gorm). Choose a framework: choose fasthttp for key performance, Gin/Echo for flexible web applications, and gorm for database interaction.

Detailed practical explanation of golang framework development: Questions and Answers Detailed practical explanation of golang framework development: Questions and Answers Jun 06, 2024 am 10:57 AM

In Go framework development, common challenges and their solutions are: Error handling: Use the errors package for management, and use middleware to centrally handle errors. Authentication and authorization: Integrate third-party libraries and create custom middleware to check credentials. Concurrency processing: Use goroutines, mutexes, and channels to control resource access. Unit testing: Use gotest packages, mocks, and stubs for isolation, and code coverage tools to ensure sufficiency. Deployment and monitoring: Use Docker containers to package deployments, set up data backups, and track performance and errors with logging and monitoring tools.

See all articles