Skip to content

Commit

Permalink
Use actual map types for type specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedijkstra committed Dec 14, 2018
1 parent a8d2849 commit 2537c07
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/extwitter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ defmodule ExTwitter do
ExTwitter.request(:get, "1.1/statuses/home_timeline.json")
"""
@spec request(:get | :post, String.t) :: Map
@spec request(:get | :post, String.t) :: %{}
defdelegate request(method, path), to: ExTwitter.API.Base

@doc """
Expand All @@ -89,7 +89,7 @@ defmodule ExTwitter do
ExTwitter.request(:get, "1.1/search/tweets.json", [q: "elixir", count: 1])
"""
@spec request(:get | :post, String.t, Keyword.t) :: Map
@spec request(:get | :post, String.t, Keyword.t) :: %{}
defdelegate request(method, path, params), to: ExTwitter.API.Base

# -------------- Timelines -------------
Expand Down Expand Up @@ -464,7 +464,7 @@ defmodule ExTwitter do
## Reference
https://dev.twitter.com/rest/reference/get/search/tweets
"""
@spec search_next_page(String.t) :: [Map]
@spec search_next_page(String.t) :: [%{}]
defdelegate search_next_page(search_result), to: ExTwitter.API.Search

# -------------- Streaming -------------
Expand Down Expand Up @@ -1497,7 +1497,7 @@ defmodule ExTwitter do
## Reference
https://dev.twitter.com/rest/reference/get/application/rate_limit_status
"""
@spec rate_limit_status :: Map
@spec rate_limit_status :: %{}
defdelegate rate_limit_status, to: ExTwitter.API.Help

@doc """
Expand All @@ -1510,7 +1510,7 @@ defmodule ExTwitter do
## Reference
https://dev.twitter.com/rest/reference/get/application/rate_limit_status
"""
@spec rate_limit_status(Keyword.t) :: Map
@spec rate_limit_status(Keyword.t) :: %{}
defdelegate rate_limit_status(options), to: ExTwitter.API.Help

# -------------- Tweets -------------
Expand Down Expand Up @@ -1583,7 +1583,7 @@ defmodule ExTwitter do
https://dev.twitter.com/oauth/3-legged
https://dev.twitter.com/web/sign-in/implementing
"""
@spec authorize_url(String.t, Map.t) :: {:ok, String.t} | {:error, String.t}
@spec authorize_url(String.t, %{}) :: {:ok, String.t} | {:error, String.t}
defdelegate authorize_url(oauth_token, options), to: ExTwitter.API.Auth

@doc """
Expand Down Expand Up @@ -1612,7 +1612,7 @@ defmodule ExTwitter do
https://dev.twitter.com/oauth/reference/get/oauth/authenticate
https://dev.twitter.com/web/sign-in/implementing
"""
@spec authenticate_url(String.t Map.t) :: {:ok, String.t} | {:error, String.t}
@spec authenticate_url(String.t, %{}) :: {:ok, String.t} | {:error, String.t}
defdelegate authenticate_url(oauth_token, options), to: ExTwitter.API.Auth

@doc """
Expand Down

0 comments on commit 2537c07

Please sign in to comment.