Permalink
Browse files

Add README.

  • Loading branch information...
tim committed Feb 7, 2009
1 parent f8eb9d3 commit 6702b9e0d2c8a429e2f90e064b74fa08fd71f391
Showing with 35 additions and 0 deletions.
  1. +35 −0 README.txt
View
@@ -0,0 +1,35 @@
+Example client/server code for erlang-oauth (http://github.com/tim/erlang-oauth).
+
+To run the term.ie and Google clients:
+
+ $ make
+ ...
+ $ erl -pa ebin -pa path/to/erlang-oauth/ebin/ -s crypto -s inets -s ssl
+ ...
+ 1> oauth_termie:echo().
+ ...
+ 2> ok = oauth_gcontacts:get_request_token().
+ ...
+ 3> ok = oauth_gcontacts:get_access_token().
+ ...
+ 4> {ok, ContactsXML} = oauth_gcontacts:get_feed().
+ ...
+ 5> Consumer = {"[Google Consumer Key]", "[Google Consumer Secret]", hmac_sha1}.
+ ...
+ 6> ok = oauth_gcal:get_request_token(Consumer).
+ ...
+ 7> ok = oauth_gcal:get_access_token().
+ ...
+ 8> {ok, CalendarXML} = oauth_gcal:get_feed().
+ ...
+
+To run the mochiweb server/client:
+
+ $ make
+ ...
+ $ erl -pa ebin -pa path/to/erlang-oauth/ebin/ -pa path/to/mochiweb/ebin/
+ ...
+ 1> ok = crypto:start(), ok = inets:start(), true = oauth_mochiweb:start().
+ ...
+ 2> oauth_mochiweb_client:echo().
+ ...

0 comments on commit 6702b9e

Please sign in to comment.