Commit 7ce68f24e13986b5e0a3638543a5e92cf8eb08ec

Stephen Moloney 2016-06-08T13:42:21

slight fix

diff --git a/lib/ex_ovh/services/v1/webstorage/query.ex b/lib/ex_ovh/services/v1/webstorage/query.ex
index be976f6..78476cc 100644
--- a/lib/ex_ovh/services/v1/webstorage/query.ex
+++ b/lib/ex_ovh/services/v1/webstorage/query.ex
@@ -13,7 +13,7 @@ defmodule ExOvh.Services.V1.Webstorage.Query do
 
   ## Example
 
-      ExOvh.Services.V1.Webstorage.Query. get_services() |> ExOvh.Ovh.request()
+      ExOvh.Services.V1.Webstorage.Query.get_services() |> ExOvh.Ovh.request()
   """
   @spec get_services() :: Query.t
   def get_services() do
@@ -53,8 +53,8 @@ defmodule ExOvh.Services.V1.Webstorage.Query do
   def get_service(service_name) do
    %Query{
           method: :get,
-          uri: "/cdn/webstorage/",
-          params: service_name
+          uri: "/cdn/webstorage/#{service_name}",
+          params: %{}
           }
   end
 
@@ -117,7 +117,12 @@ defmodule ExOvh.Services.V1.Webstorage.Query do
     %Query{
           method: :get,
           uri: "/cdn/webstorage/#{service_name}/statistics",
-          params: %{"period" => period, "type" => type}
+          params: %{
+                    query_string: %{
+                                    "period" => period,
+                                    "type" => type
+                                  }
+                    }
           }
   end
 
diff --git a/lib/ex_ovh/transformation.ex b/lib/ex_ovh/transformation.ex
index e564b4b..dbe52c8 100644
--- a/lib/ex_ovh/transformation.ex
+++ b/lib/ex_ovh/transformation.ex
@@ -9,15 +9,6 @@ defmodule ExOvh.Transformation do
 
   @spec prepare_request(Query.t, Keyword.t, atom) :: HttpQuery.t
   def prepare_request(%Query{method: method, uri: uri, params: params, headers: headers}, httpoison_opts, client) do
-#    uri = if params !== :nil and params !== "" and is_map(params) and method in [:get, :head, :delete], do: uri <> "?" <> URI.encode_query(params), else: uri
-#    uri = if params !== :nil and params !== "" and is_map(params) === :false and method in [:get, :head, :delete], do: uri <> URI.encode_www_form(params), else: uri
-#    params =
-#    case params !== "" and params !== :nil and is_map(params) and method in [:put, :post] do
-#      :true -> Poison.encode!(params)
-#      :false -> params
-#    end
-#    ovh_config = client.ovh_config()
-#    uri = ovh_config[:endpoint] <> ovh_config[:api_version] <> uri
     ovh_config = client.ovh_config()
     uri = ovh_config[:endpoint] <> ovh_config[:api_version] <> uri
     uri =