public
Description: Video Distributing Web Service
Homepage: http://heyspread.com
Clone URL: git://github.com/sadikzzz/heyspread-ruby.git
heyspread-ruby / README
100644 47 lines (34 sloc) 1.178 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
= Hey!Spread: Video Promoting Web Service
 
 * Address: http://heyspread.com
 * Email: bruno.celeste@particle-s.com
 * Blog: http://particle-s.com
 * Twitter: http://twitter.com/HeyWatch
 
 * API documentation: http://heyspread.com/page/api-documentation
 * Valid site names to use the API: http://heyspread.com/page/api-documentation-sites
 
= Usage
 
== Upload a video to YouTube and Google Video:
 
  HeySpread::Account.api_key = "api_key"
 
  video = HeySpread::Video.new(
    :title => "HS test",
    :category => "Comedy",
    :tags => "heyspread tag testing",
    :file => "/home/user/video.avi",
    :description => "Test the HeySpread API"
  )
 
  #Set the destination sites
  #Not required if you saved you Credentials
  video.destinations["youtube"] = ["login", "password"]
  video.destinations["google"] = ["email", "password"]
 
  video.upload
 
 
== Save YouTube credentials:
 
  HeySpread::Credentials.save(
    :site => "youtube",
    :login => "testyt",
    :password => "test"
  )
  => true
 
== Track videos
 
  track = Track.new
  track.video_urls << "http://youtube.com/watch?v=fsdfsd"
  track.video_urls << "http://dailymotion.com/video/xefds"
  video = track.save