public
Description: Ping.fm Ruby Library
Homepage: http://pingfm.rubyforge.org/
Clone URL: git://github.com/Oshuma/pingfm.git
Click here to lend your support to: pingfm and make a donation at www.pledgie.com !
Dale Campbell (author)
Wed Jun 10 14:53:47 -0700 2009
commit  b3fe2b9b422fe3cf4fa357ef63eb760451140c9b
tree    9753c2c1854cce2d1a48a5da63a0ecdce0e92088
parent  d3f7d0766c468dce64169000e33f63ddd1f6bea3
pingfm / README
100644 102 lines (66 sloc) 3.112 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Ping.fm Ruby Client/Library
 
== Authors
 
* Krunoslav Husak (http://h00s.net)
* Dale Campbell (http://corrupt.save-state.net)
* Kevin Williams (http://almostserio.us)
 
== CODE:
 
http://pingfm.rubyforge.org/
 
== DESCRIPTION:
 
Ping.fm (http://ping.fm) is a simple service that makes updating your social networks a snap, and this it's Ruby library.
 
== FEATURES/PROBLEMS:
 
* Installing the gem creates a 'pingfm' shell script to post from the shell.
* Keys are stored in a YAML file in your home directory (under Linux/OSX).
 
== SYNOPSIS:
 
Shell usage:
 
  $ pingfm This message will post to my default services.
 
Everything after the 'pingfm' command is what will be posted to the service. You
may also include the message within quotes (ex. using the client within a shell script).
 
If your keys have not been stored, it will ask for them. These keys will be saved
in a YAML file in your home directory and you won't be asked for them again.
 
You can obtain your keys here:
 
* User API Key - http://ping.fm/key/
* Application API Key - http://ping.fm/developers/
 
Library usage:
 
  # Require the library and initialize it.
  require 'pingfm'
  pingfm = Pingfm::Client.new('api_key', 'user_app_key')
 
  # Ensure proper API and User App keys.
  pingfm.validate['status']
  # => 'OK' if success, otherwise 'FAIL'
 
  # Grab latest 5 posts.
  pingfm.latest(5) # => {'messages' => [...]}
 
  # Posting to all services.
  pingfm.post('The Dark Knight was amazing.')
  # => {'status' => 'OK'} if success, otherwise 'FAIL'
 
  # Post using custom user trigger; must be defined on the Ping.fm site.
  pingfm.tpost('The message here.', '#something_custom', 'Optional Title')
  # => {'status' => 'OK'} if success, otherwise 'FAIL'
 
 
Check the source comments for more details.
 
== REQUIREMENTS:
 
Ruby!
 
== INSTALL:
 
  # From Rubyforge...
  $ sudo gem install pingfm
 
*OR*
 
  # From Github...
  $ sudo gem sources -a http://gems.github.com (only need to do this once)
  $ sudo gem install oshuma-pingfm
 
== LICENSE:
 
(The MIT License)
 
Copyright (c) 2008 Krunoslav Husak, Dale Campbell, Kevin Williams
 
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.