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 CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  .bundle
3
+ .DS_Store
3
4
  Gemfile.lock
4
5
  pkg/*
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
- def get_with(joined_params = {})
33
- Client.new(joined_params).get)
34
- end
35
-
36
- def post_with(joined_params = {})
37
- Client.new(joined_params).post
38
- end
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
@@ -1,3 +1,5 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  module Topsdk
2
- VERSION = '0.0.5'
4
+ VERSION = '0.0.7'
3
5
  end
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.5
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-10-27 00:00:00.000000000Z
12
+ date: 2011-11-17 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nestful
16
- requirement: &70105361799620 !ruby/object:Gem::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: *70105361799620
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.11
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