Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use actual map types for type specs #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) :: map()
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) :: map()
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) :: [map()]
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 :: map()
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) :: map()
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, map()) :: {: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, map()) :: {:ok, String.t} | {:error, String.t}
defdelegate authenticate_url(oauth_token, options), to: ExTwitter.API.Auth

@doc """
Expand Down