Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update README.

  • Loading branch information...
commit f832fa49ff8df65081465f3dcbbd1fd78f74ba2f 1 parent 73ae831
Tim Fletcher authored

Showing 1 changed file with 7 additions and 24 deletions. Show diff stats Hide diff stats

  1. +7 24 README.txt
31 README.txt
... ... @@ -1,35 +1,18 @@
1 1 Example client/server code for erlang-oauth (http://github.com/tim/erlang-oauth).
2 2
3   -To run the term.ie and Google clients:
  3 +To run the MochiWeb server/client:
4 4
5 5 $ make
6 6 ...
7   - $ erl -pa ebin -pa path/to/erlang-oauth/ebin/ -s crypto -s inets -s ssl
  7 + $ erl -pa ebin -pa path/to/erlang-oauth/ebin -pa path/to/mochiweb/ebin -s crypto -s inets
8 8 ...
9   - 1> oauth_termie:echo().
  9 + 1> oauth_mochiweb:start().
10 10 ...
11   - 2> ok = oauth_gcontacts:get_request_token().
  11 + 2> {ok, Client} = oauth_mochiweb_client:start().
12 12 ...
13   - 3> ok = oauth_gcontacts:get_access_token().
  13 + 3> {ok, _Token} = oauth_mochiweb_client:get_request_token(Client).
14 14 ...
15   - 4> {ok, ContactsXML} = oauth_gcontacts:get_feed().
  15 + 4> ok = oauth_mochiweb_client:get_access_token(Client).
16 16 ...
17   - 5> Consumer = {"[Google Consumer Key]", "[Google Consumer Secret]", hmac_sha1}.
18   - ...
19   - 6> ok = oauth_gcal:get_request_token(Consumer).
20   - ...
21   - 7> ok = oauth_gcal:get_access_token().
22   - ...
23   - 8> {ok, CalendarXML} = oauth_gcal:get_feed().
24   - ...
25   -
26   -To run the mochiweb server/client:
27   -
28   - $ make
29   - ...
30   - $ erl -pa ebin -pa path/to/erlang-oauth/ebin/ -pa path/to/mochiweb/ebin/
31   - ...
32   - 1> ok = crypto:start(), ok = inets:start(), true = oauth_mochiweb:start().
33   - ...
34   - 2> oauth_mochiweb_client:echo().
  17 + 5> oauth_mochiweb_client:echo(Client, [{"hello", "world"}]).
35 18 ...

0 comments on commit f832fa4

Please sign in to comment.
Something went wrong with that request. Please try again.