     def tour_restart do
         requests("/tour/restart", "")
     end
+    
 
 
     defp build_url(conn, path) do


    defp requests(path, multihash) do
        case get(path <> multihash) do
            ## TODO: add more cases. 
            %Tesla.Env{status: 200, headers: headers, body: body} -> %{:headers => headers, :body => body}
            %Tesla.Env{status: 500, headers: headers, body: body} -> %{:headers => headers, :body => body}
            %Tesla.Env{status: 404, headers: headers} -> %{:headers=> headers, :error => "Error: 404 page not found."}
        end 
    end

    defp write_file(raw, multihash) do
      File.write(multihash, raw, [:write, :utf8])
    end
end
        res.body
    end

    #Ls cmd TODO  Implement proper Json Format.
    def ls_cmd(multihash) when is_bitstring(multihash) do
        requests("/ls?arg=", multihash)
    end

    ##Currently throws an error due to the size of JSON response.
    def repo_verify do
        requests("/repo/verify", "")
    end

    #Update function  - takes in the current args for update.
    def update(args) when is_bitstring(args) do
        res = requests("/update?arg=", args)
        res.body|> String.replace(~r/\r|\n/, "")
    end

    #version function - does not currently accept the optional arguments on golang client.
    def version(num \\ false, comm \\ false, repo \\ false, all \\ false) do
       res = requests("/version?number=" <> to_string(num) <> "&commit=" <> to_string(comm) <> "&repo=" <> to_string(repo) <> "&all=" <> to_string(all) , "")
       res.body
