Skip to content

Commit

Permalink
reviewed edoc tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ddossot committed Sep 11, 2010
1 parent efaa758 commit 249aeb2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -16,11 +16,11 @@ Simply run:

./rebar get-deps compile eunit

Optinally, to generate the *cferl* documentation, run:
Optionally, to generate the *cferl* documentation, run:

./rebar delete-deps doc

Optinally, to run the integration tests (and generate the code samples visible below), run:
Optionally, to run the integration tests (and generate the code samples visible below), run:

./int_tests

Expand Down
4 changes: 2 additions & 2 deletions doc/overview.edoc
@@ -1,4 +1,4 @@
@title cferl
@doc Rackspace Cloud Files Erlang Client
@doc <center><img src="cferl.png"/><br/><br/><h1>Rackspace Cloud Files Erlang Client</h1></center>
@author David Dossot <david@dossot.net>
@copyright 2010 David Dossot
@copyright 2010 David Dossot
12 changes: 6 additions & 6 deletions src/cferl_container.erl
Expand Up @@ -6,9 +6,9 @@
%%% Copyright (c) 2010 David Dossot
%%%
%%% @type cferl_error() = {error, not_found} | {error, unauthorized} | {error, {unexpected_response, Other}}.
%%% @type cf_container_cdn_config = record(). Record of type cf_container_cdn_config.
%%% @type cf_container_cdn_config() = record(). Record of type cf_container_cdn_config.
%%% @type cf_object_query_args() = record(). Record of type cf_object_query_args.
%%% @type cf_object_details() = record. Record of type cf_object_details.
%%% @type cf_object_details() = record(). Record of type cf_object_details.
%%% @type cferl_object() = term(). Reference to the cferl_object parameterized module.

-module(cferl_container, [Connection, ContainerDetails, ContainerPath, CdnDetails]).
Expand Down Expand Up @@ -49,12 +49,12 @@ is_public() ->
proplists:get_value(cdn_enabled, CdnDetails).

%% @doc CDN of the container URL, if it is public.
%% @spec cdn_url() -> binary().
%% @spec cdn_url() -> binary()
cdn_url() ->
proplists:get_value(cdn_uri, CdnDetails).

%% @doc TTL (in seconds) of the container, if it is public.
%% @spec cdn_ttl() -> integer().
%% @spec cdn_ttl() -> integer()
cdn_ttl() ->
proplists:get_value(ttl, CdnDetails).

Expand Down Expand Up @@ -257,7 +257,7 @@ get_object_result(_, Other) ->
%% @doc Create a reference to a new storage object.
%% Nothing is actually created until data gets written in the object.
%% If an object with the provided name already exists, a reference to this object is returned.
%% @spec delete_object(Name::binary) -> {ok, Object} | Error
%% @spec create_object(Name::binary) -> {ok, Object} | Error
%% Object = cferl_object()
%% Error = cferl_error()
create_object(ObjectName) when is_binary(ObjectName) ->
Expand All @@ -283,7 +283,7 @@ delete_object_result(Other) ->
cferl_lib:error_result(Other).

%% @doc Ensure that all the directories exist in an object path.
%% Passing <<"photos/plants/fern.jpg">>, will ensure that the <<"photos">> and <<"photos/plants">> directories exist.
%% Passing &lt;&lt;"photos/plants/fern.jpg">>, will ensure that the &lt;&lt;"photos">> and &lt;&lt;"photos/plants">> directories exist.
%% @spec ensure_dir(ObjectPath::binary()) -> ok
ensure_dir(ObjectPath) when is_binary(ObjectPath) ->
CreateDirectoryFun =
Expand Down
8 changes: 4 additions & 4 deletions src/cferl_lib.erl
Expand Up @@ -43,12 +43,12 @@ get_int_header(Name, Headers) when is_list(Headers) ->

%% @doc Get a boolean value from a proplist with a case insentive search on key.
%% Return false if the key is not found.
%% @spec get_int_header(Key::string(), Proplist::list()) -> boolean()
%% @spec get_boolean_header(Key::string(), Proplist::list()) -> boolean()
get_boolean_header(Name, Headers) when is_list(Headers) ->
list_to_boolean(caseless_get_proplist_value(Name, Headers)).

%% @doc Get a binary value from a proplist with a case insentive search on key.
%% Return <<>> if the key is not found.
%% Return an empty binary if the key is not found.
%% @spec get_binary_header(Key::string(), Proplist::list()) -> binary()
get_binary_header(Name, Headers) when is_list(Headers) ->
list_to_bin(caseless_get_proplist_value(Name, Headers)).
Expand Down Expand Up @@ -123,12 +123,12 @@ object_query_args_to_string(#cf_object_query_args{marker=Marker, limit=Limit, pr
query_args_to_string(string:join(filter_undefined(QueryElements), "&")).

%% @doc Encode a binary URL element into a string.
%% @spec url_encode(Bin::binary()) -> string().
%% @spec url_encode(Bin::binary()) -> string()
url_encode(Bin) when is_binary(Bin) ->
ibrowse_lib:url_encode(binary_to_list(Bin)).

%% @doc Extract the HTTP headers that are object metadata, remove their prefix and turn them into binary.
%% @spec extract_object_meta_headers(HttpHeaders::proplist()) -> [{Key::binary(),Value::binary()}].
%% @spec extract_object_meta_headers(HttpHeaders::proplist()) -> [{Key::binary(),Value::binary()}]
extract_object_meta_headers(HttpHeaders) when is_list(HttpHeaders) ->
{ok, Re} = re:compile("^" ++ ?OBJECT_META_HEADER_PREFIX, [caseless]),

Expand Down
4 changes: 2 additions & 2 deletions src/cferl_object.erl
Expand Up @@ -28,7 +28,7 @@ bytes() ->
ObjectDetails#cf_object_details.bytes.

%% @doc Date and time of the last modification of the current object.
%% @spec last_modified() -> {Date:date(), Time:time()}
%% @spec last_modified() -> {Date::date(), Time::time()}
last_modified() ->
ObjectDetails#cf_object_details.last_modified.

Expand Down Expand Up @@ -101,7 +101,7 @@ write_data(Data, ContentType) when is_binary(Data), is_binary(ContentType) ->
%% @doc Write data for the current object.
%% @spec write_data(Data::binary(), ContentType::binary(), RequestHeaders) -> ok | Error
%% Error = {error, invalid_content_length} | {error, mismatched_etag} | cferl_error()
%% RequestHeaders = [{Name::binary(), Value::binary()}].
%% RequestHeaders = [{Name::binary(), Value::binary()}]
write_data(Data, ContentType, RequestHeaders)
when is_binary(Data), is_binary(ContentType), is_list(RequestHeaders) ->

Expand Down

0 comments on commit 249aeb2

Please sign in to comment.