Giter Site home page Giter Site logo

aliexpress's Introduction

Aliexpress

Aliexpress 期初就就是想要实现对 速卖通的 API 进行封装, 尝试用使用开源的手法来开发。

Installation

Add this line to your application's Gemfile:

gem 'aliexpress'

And then execute:

$ bundle

Or install it yourself as:

$ gem install aliexpress

Usage

文件的目录结构:

├── bin
│   ├── console
│   └── setup
└── lib
    ├── aliexpress
    │   ├── authorization.rb - 授权相关
    │   ├── base.rb - 基本类
    │   ├── category.rb - 类目
    │   ├── common.rb - 公共
    │   ├── configure.rb - 配置信息
    │   ├── data.rb - 数据
    │   ├── evaluation.rb - 评价接口
    │   ├── freight.rb - 运费
    │   ├── logistics.rb - 物流信息
    │   ├── marketing.rb - 营销
    │   ├── message.rb - 站内信
    │   ├── order.rb - 较易
    │   ├── product.rb - 产品
    │   ├── image.rb - 图片相关的接口, 图片银行 和 上传图片
    │   └── version.rb
    └── aliexpress.rb

配置参数:

Aliexpress.app_key = 'Your app key'
Aliexpress.app_secret = 'Your app secret' 
Aliexpress.redis = Redis.new 

TODO: 配置获取 code 的授权还没有完成, 这个参考谁。

Development

签出代码库之后, 运行 bin/setup安装依赖, 运行 bin/console 进入交互式探索环境。

运行 bundle exec rake install, 将 gem 包安装到本地。 生成新的版本的步骤:

  • 更新 version.rb 中的版本号
  • 运行 bundle exec rake release, 创建 git tag, 提交请求和 tag,将生成新的 gem 推送到 rubygems.org

速卖通的 API 地址: http://gw.api.alibaba.com/dev/doc/intl/sys_description.htm?spm=5261.6744729.972263401.3.B9M4i7&ns=aliexpress.open

备注:

方法的命名,取自 API 文档中的 apiName,将其中的 api. 前缀去掉。

Contributing

实现上, 获取 access_token 的方式,参考了 https://github.com/lanrion/weixin_authorize。

Bug reports and pull requests are welcome on GitHub at https://github.com/xiajian/aliexpress. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

aliexpress's People

Contributors

xiajian avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.