0.0
No commit activity in last 3 years
No release in over 3 years
Weidian Open Platform(微店开放平台) API in Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

WeidianOpen

Weidian Open Platform(微店开放平台) API in Ruby

Gem Version

Installation

Add this line to your application's Gemfile:

gem 'weidian_open'

And then execute:

$ bundle

Or install it yourself as:

$ gem install weidian_open

Usage

Information about this gem:

puts WeidianOpen::API
puts WeidianOpen::HOWTO_CONFIG

Configuration

WeidianOpen.config do
    @app_key = '1111111'             # your app_key
    @app_secret = '1111111111111111' # your app_secret
  end

or

WeidianOpen.app_key = '111111'          # your app_key
WeidianOpen.app_secret = '1111111111'   # your app_secret

###Access Token Access Token can be refreshed automatically by this Gem. You can show access token used currently after configuration:

WeidianOpen.access_token

Normally, you can use any Offical API method if HTTP Method of it is GET. All you need to do is subsituing "." inside API method name with "_".

Example:

WeidianOpen.vdian_order_list_get(page_num: "1",
                             order_type: "unpay",
                             add_start: "2015-03-18 14:15:12",
                             add_end: "2015-03-20 14:15:12")

WeidianOpen.vdian_order_list_get(order_type: "unpay", page_num: "1")
WeidianOpen.vdian_order_get(order_id: "1164787976")

Contributing

  1. Fork it ( https://github.com/yanyingwang/weidian_open/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request