Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README.

  • Loading branch information...
commit f832fa49ff8df65081465f3dcbbd1fd78f74ba2f 1 parent 73ae831
@tim tim authored
Showing with 7 additions and 24 deletions.
  1. +7 −24 README.txt
View
31 README.txt
@@ -1,35 +1,18 @@
Example client/server code for erlang-oauth (http://github.com/tim/erlang-oauth).
-To run the term.ie and Google clients:
+To run the MochiWeb server/client:
$ make
...
- $ erl -pa ebin -pa path/to/erlang-oauth/ebin/ -s crypto -s inets -s ssl
+ $ erl -pa ebin -pa path/to/erlang-oauth/ebin -pa path/to/mochiweb/ebin -s crypto -s inets
...
- 1> oauth_termie:echo().
+ 1> oauth_mochiweb:start().
...
- 2> ok = oauth_gcontacts:get_request_token().
+ 2> {ok, Client} = oauth_mochiweb_client:start().
...
- 3> ok = oauth_gcontacts:get_access_token().
+ 3> {ok, _Token} = oauth_mochiweb_client:get_request_token(Client).
...
- 4> {ok, ContactsXML} = oauth_gcontacts:get_feed().
+ 4> ok = oauth_mochiweb_client:get_access_token(Client).
...
- 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().
+ 5> oauth_mochiweb_client:echo(Client, [{"hello", "world"}]).
...
Please sign in to comment.
Something went wrong with that request. Please try again.