summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2020-08-08 09:42:50 -0400
committerHubert Chathi <hubert@uhoreg.ca>2020-08-08 09:42:50 -0400
commit5d9281bb87edaff5bd429c7267c2c0f515a0e57a (patch)
tree86a37afaead0384790af287a231e258161275be2 /lib
parentadd test mode which changes post requests to put, so that mod_esi will accept it (diff)
s/Any/any/ in typespecs
Diffstat (limited to 'lib')
-rw-r--r--lib/polyjuice/client.ex4
-rw-r--r--lib/polyjuice/client/filter.ex4
-rw-r--r--lib/polyjuice/client/room.ex14
-rw-r--r--lib/polyjuice/client/user.ex4
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/polyjuice/client.ex b/lib/polyjuice/client.ex
index 8ab0e49..dfe8775 100644
--- a/lib/polyjuice/client.ex
+++ b/lib/polyjuice/client.ex
@@ -79,7 +79,7 @@ defmodule Polyjuice.Client do
@spec call(
client_api :: Polyjuice.Client.API.t(),
endpoint :: Polyjuice.Client.Endpoint.Proto.t()
- ) :: Any
+ ) :: any
def call(client_api, endpoint)
@doc """
@@ -188,7 +188,7 @@ defmodule Polyjuice.Client do
- `timeout:` (integer) the number of milliseconds to wait before the server
returns
"""
- @spec sync(client_api :: Polyjuice.Client.API.t(), opts :: list()) :: {:ok, map()} | Any
+ @spec sync(client_api :: Polyjuice.Client.API.t(), opts :: list()) :: {:ok, map()} | any
def sync(client_api, opts \\ []) when is_list(opts) do
Polyjuice.Client.API.call(
client_api,
diff --git a/lib/polyjuice/client/filter.ex b/lib/polyjuice/client/filter.ex
index fb8c6f1..d5fba63 100644
--- a/lib/polyjuice/client/filter.ex
+++ b/lib/polyjuice/client/filter.ex
@@ -83,7 +83,7 @@ defmodule Polyjuice.Client.Filter do
}
"""
- @spec update(map, [String.t()], Any, (Any -> Any)) :: map
+ @spec update(map, [String.t()], any, (any -> any)) :: map
def update(filter, key_path, initial, func)
def update(filter, [key], initial, func) when is_map(filter) do
@@ -117,7 +117,7 @@ defmodule Polyjuice.Client.Filter do
}
"""
- @spec put(map, [String.t()], Any) :: map
+ @spec put(map, [String.t()], any) :: map
def put(filter, key_path, val)
def put(filter, [key], val) when is_map(filter) do
diff --git a/lib/polyjuice/client/room.ex b/lib/polyjuice/client/room.ex
index 886a38e..28c164c 100644
--- a/lib/polyjuice/client/room.ex
+++ b/lib/polyjuice/client/room.ex
@@ -59,7 +59,7 @@ defmodule Polyjuice.Client.Room do
client_api :: Polyjuice.Client.API.t(),
room :: String.t(),
msg :: map | Polyjuice.Client.MsgBuilder.MsgData.t()
- ) :: {:ok, String.t()} | Any
+ ) :: {:ok, String.t()} | any
def send_message(client_api, room, msg) when is_binary(room) do
cond do
Polyjuice.Client.MsgBuilder.MsgData.impl_for(msg) != nil ->
@@ -97,7 +97,7 @@ defmodule Polyjuice.Client.Room do
room :: String.t(),
event_type :: String.t(),
event :: map
- ) :: {:ok, String.t()} | Any
+ ) :: {:ok, String.t()} | any
def send_event(client_api, room, event_type, event)
when is_binary(event_type) and is_map(event) and is_binary(room) do
Polyjuice.Client.API.call(
@@ -120,7 +120,7 @@ defmodule Polyjuice.Client.Room do
event_type :: String.t(),
state_key :: String.t(),
event :: map
- ) :: {:ok, String.t()} | Any
+ ) :: {:ok, String.t()} | any
def send_state_event(client_api, room, event_type, state_key \\ "", event)
when is_binary(event_type) and is_binary(state_key) and is_map(event) and is_binary(room) do
Polyjuice.Client.API.call(
@@ -143,7 +143,7 @@ defmodule Polyjuice.Client.Room do
room :: String.t(),
event_id :: String.t(),
receipt_type :: String.t()
- ) :: {:ok} | Any
+ ) :: {:ok} | any
def update_read_receipt(client_api, room, event_id, receipt_type \\ "m.read")
when is_binary(room) and is_binary(event_id) and is_binary(receipt_type) do
Polyjuice.Client.API.call(
@@ -164,7 +164,7 @@ defmodule Polyjuice.Client.Room do
room :: String.t(),
servers :: list(String.t()),
third_party_signed :: map | nil
- ) :: {:ok, String.t()} | Any
+ ) :: {:ok, String.t()} | any
def join(client_api, room, servers \\ [], third_party_signed \\ nil)
when is_binary(room) and is_list(servers) and
(is_map(third_party_signed) or third_party_signed == nil) do
@@ -187,7 +187,7 @@ defmodule Polyjuice.Client.Room do
from :: timeline_pos,
dir :: :forward | :backward,
opts :: list()
- ) :: {:ok, map()} | Any
+ ) :: {:ok, map()} | any
def get_messages(client_api, room, from, dir, opts \\ [])
when is_binary(room) and is_binary(from) and (dir == :forward or dir == :backward) do
Polyjuice.Client.API.call(
@@ -277,7 +277,7 @@ defmodule Polyjuice.Client.Room do
room :: String.t(),
event_type :: String.t(),
state_key :: String.t()
- ) :: {:ok, String.t()} | Any
+ ) :: {:ok, String.t()} | any
def get_state(client_api, room, event_type \\ nil, state_key \\ "")
when (is_nil(event_type) or is_binary(event_type)) and is_binary(state_key) and
is_binary(room) do
diff --git a/lib/polyjuice/client/user.ex b/lib/polyjuice/client/user.ex
index 7a3e694..dd0f921 100644
--- a/lib/polyjuice/client/user.ex
+++ b/lib/polyjuice/client/user.ex
@@ -38,7 +38,7 @@ defmodule Polyjuice.Client.User do
identifier :: String.t() | tuple() | map(),
password :: String.t(),
opts :: list()
- ) :: {:ok, map()} | Any
+ ) :: {:ok, map()} | any
def log_in_with_password(client_or_url, identifier, password, opts \\ [])
when (is_binary(identifier) or is_tuple(identifier) or is_map(identifier)) and
is_binary(password) and is_list(opts) do
@@ -92,7 +92,7 @@ defmodule Polyjuice.Client.User do
@doc """
Log out an existing session.
"""
- @spec log_out(client_api :: Polyjuice.Client.API.t()) :: {:ok} | Any
+ @spec log_out(client_api :: Polyjuice.Client.API.t()) :: {:ok} | any
def log_out(client_api) do
Polyjuice.Client.API.call(
client_api,