travianmap (travianmap v1.1.0)

Summary

Functions

Fetch the map of a current url.
Fetch current servers information from https://blog.travian.com/gameworld-schedule
Parse a line of the binary map and return the record.
Parse a binary map and transform the results in to a list of tuples.

Functions

-spec get_map(Url :: binary()) -> {ok, binary()} | {error, any()}.
Fetch the map of a current url.
-spec get_servers() ->
               {ok, [{ok, game_world_schedule:server_metadata()} | {error, [binary()]}]} |
               {error, any()}.
Fetch current servers information from https://blog.travian.com/gameworld-schedule
Link to this function

parse_line(Binary_Line)

-spec parse_line(Binary_Line :: binary()) -> {ok, travianmap_map:village_record()} | {error, any()}.
Parse a line of the binary map and return the record.
Link to this function

parse_map(Binary_Map)

-spec parse_map(Binary_Map :: binary()) -> [{ok, travianmap_map:village_record()} | {error, any()}].
Parse a binary map and transform the results in to a list of tuples.