social_profile 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -34,7 +34,7 @@ Post photo to social album. If album dosn't exists, it's create new one:
34
34
  user = SocialProfile::Person.get(:facebook, uid, access_token)
35
35
 
36
36
  user.share_photo!(album_id, filepath, {
37
- :album => {:title => "Site pictures"},
37
+ :album => {:name => "Site pictures"},
38
38
  :photo => {:message => "Cool photo"}
39
39
  })
40
40
 
@@ -58,6 +58,14 @@ module SocialProfile
58
58
  def avatar_url
59
59
  @avatar_url ||= info('image')
60
60
  end
61
+
62
+ def picture_url
63
+ nil
64
+ end
65
+
66
+ def profile_url
67
+ nil
68
+ end
61
69
 
62
70
  def city_name
63
71
  @city_name ||= begin
@@ -74,10 +82,6 @@ module SocialProfile
74
82
  @credentials ||= (auth_hash['credentials'] || {})
75
83
  end
76
84
 
77
- def profile_url
78
- nil
79
- end
80
-
81
85
  # Возвращаемые значения: 1 - женский, 2 - мужской, 0 - без указания пола.
82
86
  def gender
83
87
  0
@@ -91,6 +95,10 @@ module SocialProfile
91
95
  @token_expires_at ||= parse_datetime(credentials['expires_at'])
92
96
  end
93
97
 
98
+ def birthday
99
+ nil
100
+ end
101
+
94
102
  protected
95
103
 
96
104
  def parse_datetime(value)
@@ -29,6 +29,14 @@ module SocialProfile
29
29
  else 0
30
30
  end
31
31
  end
32
+
33
+ def birthday
34
+ @birthday ||= begin
35
+ Date.strptime(extra('raw_info')['birthday'],'%m/%d/%Y')
36
+ rescue Exception => e
37
+ nil
38
+ end
39
+ end
32
40
 
33
41
  protected
34
42
 
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module SocialProfile
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_profile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-19 00:00:00.000000000 Z
12
+ date: 2013-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler