This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
71 lines (38 loc) · 1.75 KB
/
README
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
# HelloTxt Ruby Client/Library
== Authors
* Kevin Williams (<https://kevwil.github.io/>)
== CODE:
<https://github.com/kevwil/hellotxt/>
== DESCRIPTION:
HelloTxt (<http://hellotxt.com>) is a simple service that makes updating your social networks a snap, and this is it's Ruby library.
== FEATURES/PROBLEMS:
* Installing the gem creates a 'hellotxt' shell script to post from the shell.
* Keys are stored in a YAML file in your home directory (%USERPROFILE% in Windows).
== SYNOPSIS:
Shell usage:
$ hellotxt "This message will post to my default services."
Everything after the 'hellotxt' command is what will be posted to the service. You could do the same thing without the quotes, and it would still work:
$ hellotxt updating from the command line is very handy for developers.
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 API key and user key here: <http://hellotxt.com/developers/applications>
Library usage:
## Require the library and initialize it
require 'hellotxt'
hellotxt = ::HelloTxt::Client.new('api_key', 'user_key')
## Ensure proper API and USER keys
hellotxt.validate['status']
## => 'OK' if success, otherwise 'FAIL'
## Posting to all services
hellotxt.post('The Dark Knight was amazing.')
## => {'status' => 'OK'} if success, otherwise 'FAIL'
Check the source comments for more details.
== REQUIREMENTS:
Ruby!
== INSTALL:
$ (sudo) gem install hellotxt
(you really should try RVM if you still need sudo to manage your gems. <https://rvm.io/>)
== RUN TESTS:
$ (sudo) gem install bones-extras
$ rake
(you really should try RVM if you still need sudo to manage your gems. <https://rvm.io/>)