Here's a screenshots of a sample session using 'blogger_srv'.You can see some of available funs 'auth', 'snap' and others...
Here's the link of the google project.
Here's a screenshots of a sample session using 'blogger_srv'.
auth(Username, Password) ->
gen_server:call(?MODULE, {auth, Username, Password}).
new(BlogId, Title, Tags, Content, {AuthorName, AuthorEmail} ) ->
gen_server:call(?MODULE, {post, BlogId, Title, Tags, Content, AuthorName, AuthorEmail}).
reset() ->
gen_server:cast(?MODULE, reset).
handle_call({post, BlogId, Title, Tags, Content, {AuthorName, AuthorEmail}}, _Node, State) ->
Requests = State#state.requests,
Auth = State#state.auth,
Data = entry_new(Title, {AuthorName, AuthorEmail}, Content, Tags),
case request(Auth, BlogId, Data) of
{ok, PostId} ->
{reply, {ok, PostId}, State#state{ requests = Requests + 1 } };
Msg ->
{reply, {err, Msg}, State#state{ requests = Requests + 1 } }
end;