socialshare 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -27,7 +27,15 @@ Or install it yourself as:
27
27
 
28
28
  s.post(text) #to tweet on twitter
29
29
 
30
- s.get_twitter_profile #to get your twitter timeline
30
+ s.get_twitter_profile #to get your twitter profile
31
+
32
+ s.user_timeline #to get your twitter timeline
33
+
34
+ s.get_twitter_home_timeline #to get home twitter timeline
35
+
36
+ s.update_profile_photo(YOUR_IMAGE_PATH) #update your twitter profile image
37
+
38
+ s.update_profile_background_photo(YOUR_IMAGE_PATH) #update your twitter profile background image
31
39
 
32
40
  s.get_twitter_followers #to get your twitter followers
33
41
 
@@ -49,6 +57,10 @@ Or install it yourself as:
49
57
 
50
58
  s.get_facebook_connections #to get your facebook connections
51
59
 
60
+ s.share_picture(FILE_PATH) #to share image on facebook
61
+
62
+ s.share_video(FILE_PATH) #to share video on facebook
63
+
52
64
  3) for Linkedin
53
65
 
54
66
  s = Socialshare::Linkdin.new(:api_key => LINKEDIN_API_KEY,
@@ -17,11 +17,35 @@ module Socialshare
17
17
  end
18
18
 
19
19
  def get_facebook_profile
20
- profile = self.fb_user.get_object("me")
20
+ begin
21
+ profile = self.fb_user.get_object("me")
22
+ rescue Exception => e
23
+ return e
24
+ end
21
25
  end
22
26
 
23
27
  def get_facebook_connections
24
- self.fb_user.get_connections("me", "friends")
28
+ begin
29
+ self.fb_user.get_connections("me", "friends")
30
+ rescue Exception => e
31
+ return e
32
+ end
33
+ end
34
+
35
+ def share_picture(file_path)
36
+ begin
37
+ self.fb_user.put_picture(File.open(file_path))
38
+ rescue Exception => e
39
+ return e
40
+ end
41
+ end
42
+
43
+ def share_video(file_path)
44
+ begin
45
+ self.fb_user.put_video(File.open(file_path))
46
+ rescue Exception => e
47
+ return e
48
+ end
25
49
  end
26
50
 
27
51
  protected
@@ -21,6 +21,38 @@ module Socialshare
21
21
  end
22
22
 
23
23
  def get_twitter_profile
24
+ begin
25
+ self.twitter_user.user
26
+ rescue Exception => e
27
+ return e
28
+ end
29
+ end
30
+
31
+ def update_profile_photo(file_path)
32
+ begin
33
+ self.twitter_user.update_profile_image(File.open(file_path))
34
+ rescue Exception => e
35
+ return e
36
+ end
37
+ end
38
+
39
+ def update_profile_background_photo(file_path)
40
+ begin
41
+ self.twitter_user.update_profile_background_image(File.open(file_path))
42
+ rescue Exception => e
43
+ return e
44
+ end
45
+ end
46
+
47
+ def user_timeline
48
+ begin
49
+ self.twitter_user.user_timeline
50
+ rescue Exception => e
51
+ return e
52
+ end
53
+ end
54
+
55
+ def get_twitter_home_timeline
24
56
  begin
25
57
  self.twitter_user.home_timeline
26
58
  rescue Exception => e
@@ -36,7 +68,6 @@ module Socialshare
36
68
  end
37
69
  end
38
70
 
39
-
40
71
  def fetch_tweet_by_id(tweet_id)
41
72
  begin
42
73
  self.twitter_user.status(tweet_id)
@@ -1,3 +1,3 @@
1
1
  module Socialshare
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialshare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - pandurang
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-07 00:00:00.000000000 Z
12
+ date: 2013-05-09 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: This gem allows text/messages to be shared on social networking sites
14
15
  (twitter,facebook,linkedin)
@@ -31,25 +32,26 @@ files:
31
32
  - socialshare.gemspec
32
33
  homepage: https://github.com/pandurang90/socialshare
33
34
  licenses: []
34
- metadata: {}
35
35
  post_install_message:
36
36
  rdoc_options: []
37
37
  require_paths:
38
38
  - lib
39
39
  required_ruby_version: !ruby/object:Gem::Requirement
40
+ none: false
40
41
  requirements:
41
42
  - - ! '>='
42
43
  - !ruby/object:Gem::Version
43
44
  version: '0'
44
45
  required_rubygems_version: !ruby/object:Gem::Requirement
46
+ none: false
45
47
  requirements:
46
48
  - - ! '>='
47
49
  - !ruby/object:Gem::Version
48
50
  version: '0'
49
51
  requirements: []
50
52
  rubyforge_project:
51
- rubygems_version: 2.0.3
53
+ rubygems_version: 1.8.24
52
54
  signing_key:
53
- specification_version: 4
55
+ specification_version: 3
54
56
  summary: This gem allows text/messages to be shared on social networking sites (twitter,facebook,linkedin)
55
57
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTIzOTc5MzJlMTYzNjZhYWM4NTY4NjIzM2NmZmFjYzhjMjc2OWJmYw==
5
- data.tar.gz: !binary |-
6
- ZDA0N2U3ZDUyMTdmZTQwNDQwOGI0MGQwNmI5Y2YzYjg5MWQxZjdiYw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZmQyNDBjYmM4NjJlM2Y4OTUzMjllYzQ4MDljNmMwMjE0N2VjMzE3YzA0OTA4
10
- NDM2MjZhMWQxYzgxODViMjgxMGFiZTZkOGM1NWQ5ODA4MDYxZTYyOGIwZGYy
11
- MTQ1ZWFlZDE3OTVkZWFjMDljNWQ3NWIwMmYyZTBjNGVmM2JmNzg=
12
- data.tar.gz: !binary |-
13
- YmEyZWNiMGU1MTJmN2I4ZWRiZjc0ZDI1NDdlMTQxOWU4Y2Q0MTFmYjMyYjVm
14
- YjUyY2I3MTBlMTg5M2ZmNTAyMTkxZjZkN2I0NDc2MDBkYTZlNjliNTA0ZDQx
15
- OWM0MDQyNDE1NzlhYTM0MTU3OTUzY2QyZWRhZDRmM2FmNTFhMGE=