Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Example client/server code for erlang-oauth
Tree: ebfd399c30

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
src
Emakefile
License.txt
Makefile
README.txt

README.txt

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().
  ...
Something went wrong with that request. Please try again.