Share Taobao API Auxiliary function-Apply CI framework

Source: Internet
Author: User

Recently in the rewriting of a Taobao guest's website, considering the future expansion, so integrate it into CI, this will appear a problem, Taobao SDK how to integrate into the class library? After reading the Taobao API document, I found a non-SDK call method, I modified this based on the integration of the helper function of CI, now the source to share with you, hope to help the students in need.

The invocation method is simple, passing in an array parameter, where methods are the API interfaces you intend to invoke, and the remaining parameters are filled in according to the actual needs of the API interface. I'm here to give you a call example to see.

The code is as follows 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);   

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.