topsdk 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/lib/topsdk.rb +24 -11
- data/lib/topsdk/version.rb +3 -1
- metadata +5 -6
- data/.DS_Store +0 -0
data/.gitignore
CHANGED
data/lib/topsdk.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
1
2
|
require 'topsdk/version'
|
2
3
|
require 'topsdk/client'
|
3
4
|
|
@@ -29,17 +30,29 @@ apply_settings
|
|
29
30
|
module Topsdk
|
30
31
|
class << self
|
31
32
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
def get_with(joined_params = {})
|
34
|
+
Client.new(joined_params).get
|
35
|
+
end
|
36
|
+
|
37
|
+
def post_with(joined_params = {})
|
38
|
+
Client.new(joined_params).post
|
39
|
+
end
|
40
|
+
|
41
|
+
def now
|
42
|
+
get_with({:method => 'taobao.time.get'})['time']
|
43
|
+
end
|
44
|
+
|
45
|
+
def date(datetime)
|
46
|
+
datetime.strftime("%Y-%m-%d 00:00:00")
|
47
|
+
end
|
48
|
+
|
49
|
+
def time(datetime)
|
50
|
+
datetime.strftime("%Y-%m-%d %H:%M:%S")
|
51
|
+
end
|
52
|
+
|
53
|
+
def authorize_url
|
54
|
+
"#{ENV['TAOBAO_AUTH_URL']}?appkey=#{ENV['TAOBAO_APP_KEY']}&encode=utf-8"
|
55
|
+
end
|
39
56
|
|
40
|
-
def authorize_url
|
41
|
-
"#{ENV['TAOBAO_AUTH_URL']}?appkey=#{ENV['TAOBAO_APP_KEY']}&encode=utf-8"
|
42
57
|
end
|
43
|
-
|
44
|
-
end
|
45
58
|
end
|
data/lib/topsdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: topsdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nestful
|
16
|
-
requirement: &
|
16
|
+
requirement: &70325665048120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70325665048120
|
25
25
|
description: Simple Taobao API client for Ruby
|
26
26
|
email:
|
27
27
|
- howl.wong@gmail.com
|
@@ -30,7 +30,6 @@ extensions: []
|
|
30
30
|
extra_rdoc_files:
|
31
31
|
- README.rdoc
|
32
32
|
files:
|
33
|
-
- .DS_Store
|
34
33
|
- .gitignore
|
35
34
|
- Gemfile
|
36
35
|
- README.rdoc
|
@@ -61,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
60
|
version: '0'
|
62
61
|
requirements: []
|
63
62
|
rubyforge_project: topsdk
|
64
|
-
rubygems_version: 1.8.
|
63
|
+
rubygems_version: 1.8.10
|
65
64
|
signing_key:
|
66
65
|
specification_version: 3
|
67
66
|
summary: Taobao API client
|
data/.DS_Store
DELETED
Binary file
|