PuercoPop лет назад: 11
Родитель
Сommit
643e56cd6b
1 измененных файлов с 31 добавлено и 0 удалено
  1. 31 0
      docs/plugin-use.md

+ 31 - 0
docs/plugin-use.md

@@ -72,3 +72,34 @@
72 72
 **Example**: `(import :filepath "/home/redline/redlinernotes-export.timestamp.xml" :output "/home/redlinernotes/blog/")`
73 73
 
74 74
 [config_file]: http://github.com/redline6561/coleslaw/blob/master/examples/single-site.coleslawrc
75
+
76
+## Twitter
77
+
78
+**Description**: This plugin tweets every time a new post is added to your repo. See Setup for an example of how to get your access token & secret.
79
+
80
+**Example**: `(twitter :api-key "<api-key>" :api-secret "<api-seret" :access-token "<access-token>" :access-secret "<access-secret>")`
81
+
82
+**Setup**:
83
+- Create a new [twitter app](https://apps.twitter.com/). Take note of the api key & secret.
84
+
85
+- In the repl do the following:
86
+```lisp
87
+;; Load Chirp
88
+(ql:quickload :chirp)
89
+
90
+;; Use the api key & secret to get a URL where a pin code will be handled to you.
91
+(chirp:initiate-authentication
92
+ :api-key "D1pMCK17gI10bQ6orBPS0w"
93
+ :api-secret "BfkvKNRRMoBPkEtDYAAOPW4s2G9U8Z7u3KAf0dBUA")
94
+;; => "https://api.twitter.com/oauth/authorize?oauth_token=cJIw9MJM5HEtQqZKahkj1cPn3m3kMb0BYEp6qhaRxfk"
95
+
96
+;; Exchange the pin code for an access token and and access secret. Take note
97
+;; of them.
98
+CL-USER> (chirp:complete-authentication "4173325")
99
+;; => "18403733-bXtuum6qbab1O23ltUcwIk2w9NS3RusUFiuum4D3w"
100
+;;    "zDFsFSaLerRz9PEXqhfB0h0FNfUIDgbEe59NIHpRWQbWk"
101
+
102
+;; Finally verify the credentials 
103
+(chirp:account/verify-credentials)
104
+#<CHIRP-OBJECTS:USER PuercoPop #18405433>
105
+```