Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
filters (`filter_statuses/2`, `add_status_to_filter/3`,
`filter_status/2`, `destroy_filter_status/2`)

* Fixes
- Docs/spec polish from the facade flatten ([#139]): restored the
`search/3` URL-query and `vote/3` multiple-choice doc notes and the
clarifying summary lines on `accept_notification_request/2` and the
notification-request dismiss functions; `blocked_domains/2` is now
typed `[String.t()]`, continuing the typespec-honesty work from
[#116]; removed a dead raw-binary body clause in the request layer

## v0.7.0

* Breaking changes
Expand Down Expand Up @@ -182,6 +190,7 @@
[#116]: https://github.com/milmazz/hunter/issues/116
[#122]: https://github.com/milmazz/hunter/issues/122
[#3]: https://github.com/milmazz/hunter/issues/3
[#139]: https://github.com/milmazz/hunter/issues/139
[#123]: https://github.com/milmazz/hunter/issues/123
[#124]: https://github.com/milmazz/hunter/issues/124
[#126]: https://github.com/milmazz/hunter/issues/126
Expand Down
17 changes: 11 additions & 6 deletions lib/hunter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,9 @@ defmodule Hunter do
## Parameters

* `conn` - connection credentials
* `q` - the search query
* `q` - the search query, if `q` is a URL Mastodon will attempt to fetch
the provided account or status, otherwise it will do a local account
and hashtag search
* `options` - option list

## Options
Expand Down Expand Up @@ -813,7 +815,8 @@ defmodule Hunter do

* `conn` - connection credentials
* `id` - poll identifier
* `choices` - list of option indices to vote for (zero-based)
* `choices` - list of option indices to vote for (zero-based); multiple
choices are only allowed on multiple-choice polls

"""
@spec vote(Hunter.Client.t(), String.t() | non_neg_integer, [non_neg_integer]) ::
Expand Down Expand Up @@ -1642,7 +1645,8 @@ defmodule Hunter do
end

@doc """
Accept a notification request
Accept a notification request, so future notifications from the account
are delivered normally

## Parameters

Expand All @@ -1656,7 +1660,7 @@ defmodule Hunter do
end

@doc """
Dismiss a notification request
Dismiss a notification request, removing it and its filtered notifications

## Parameters

Expand Down Expand Up @@ -1685,7 +1689,8 @@ defmodule Hunter do
end

@doc """
Dismiss multiple notification requests
Dismiss multiple notification requests, removing them and their filtered
notifications

## Parameters

Expand Down Expand Up @@ -2181,7 +2186,7 @@ defmodule Hunter do
* `limit` - maximum number of blocks to get, default: 40, max: 80

"""
@spec blocked_domains(Hunter.Client.t(), Keyword.t()) :: list
@spec blocked_domains(Hunter.Client.t(), Keyword.t()) :: [String.t()]
def blocked_domains(conn, options \\ []) do
Request.request!(conn, :get, "/api/v1/domain_blocks", nil, options)
end
Expand Down
1 change: 0 additions & 1 deletion lib/hunter/api/request.ex
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ defmodule Hunter.Api.Request do
defp split_payload(_method, data), do: {[body: process_request_body(data)], []}

defp process_request_body([]), do: "{}"
defp process_request_body(data) when is_binary(data), do: data
defp process_request_body(data), do: Poison.encode!(data)

defp process_request_header(headers) do
Expand Down
Loading