Merge branch 'develop' into gun
[akkoma] / lib / pleroma / http / request_builder.ex
index 046741d998e67b401fbc16fbcb012ff63aee1e90..2fc876d924017f9d55a8d5d9cf3dd108e22fff02 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.HTTP.RequestBuilder do
@@ -49,26 +49,6 @@ defmodule Pleroma.HTTP.RequestBuilder do
   @spec opts(Request.t(), keyword()) :: Request.t()
   def opts(request, options), do: %{request | opts: options}
 
-  # NOTE: isn't used anywhere
-  @doc """
-  Add optional parameters to the request
-
-  """
-  @spec add_optional_params(Request.t(), %{optional(atom) => atom}, keyword()) :: map()
-  def add_optional_params(request, _, []), do: request
-
-  def add_optional_params(request, definitions, [{key, value} | tail]) do
-    case definitions do
-      %{^key => location} ->
-        request
-        |> add_param(location, key, value)
-        |> add_optional_params(definitions, tail)
-
-      _ ->
-        add_optional_params(request, definitions, tail)
-    end
-  end
-
   @doc """
   Add optional parameters to the request
   """