Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add README.

  • Loading branch information...
commit 6702b9e0d2c8a429e2f90e064b74fa08fd71f391 1 parent f8eb9d3
@tim tim authored
Showing with 35 additions and 0 deletions.
  1. +35 −0 README.txt
View
35 README.txt
@@ -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().
+ ...
Please sign in to comment.
Something went wrong with that request. Please try again.