Skip to content

Commit af98b72

Browse files
author
Erik Guzman
committed
Update credo and do some small adjustments
1 parent f8b3474 commit af98b72

13 files changed

+33
-15
lines changed

.credo.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{Credo.Check.Readability.RedundantBlankLines, [max_blank_lines: 1]},
9999
{Credo.Check.Readability.SeparateAliasRequire, []},
100100
{Credo.Check.Readability.Semicolons, []},
101-
{Credo.Check.Readability.SinglePipe, []},
101+
{Credo.Check.Readability.SinglePipe, false},
102102
{Credo.Check.Readability.SpaceAfterCommas, []},
103103
{Credo.Check.Readability.Specs, false},
104104
{Credo.Check.Readability.StrictModuleLayout, []},

lib/thin_notion_api/blocks.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule ThinNotionApi.Blocks do
3737
3838
{:ok, %{...}}
3939
"""
40-
@spec retrieve_block_children(String.t(), %{ start_cursor: String.t(), page_size: integer() } | %{}) :: Types.Response.t()
40+
@spec retrieve_block_children(String.t(), %{start_cursor: String.t(), page_size: integer()} | %{}) :: Types.Response.t()
4141
def retrieve_block_children(block_id, params \\ %{}) do
4242
get("blocks/" <> block_id <> "/children", params)
4343
end
@@ -62,7 +62,7 @@ defmodule ThinNotionApi.Blocks do
6262
6363
{:ok, %{...}}
6464
"""
65-
@spec update_block(String.t(), %{ archived: boolean()} | map()) :: Types.Response.t()
65+
@spec update_block(String.t(), %{archived: boolean()} | map()) :: Types.Response.t()
6666
def update_block(block_id, body_params) do
6767
patch("blocks/" <> block_id, body_params)
6868
end
@@ -91,7 +91,7 @@ defmodule ThinNotionApi.Blocks do
9191
{:ok, %{...}}
9292
"""
9393
def append_block_children(block_id, children) do
94-
patch("blocks/" <> block_id <> "/children", %{ children: children })
94+
patch("blocks/" <> block_id <> "/children", %{children: children})
9595
end
9696

9797
@doc """

lib/thin_notion_api/databases.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ defmodule ThinNotionApi.Databases do
44
"""
55

66
import ThinNotionApi.Base
7-
alias ThinNotionApi.{Properties, Types}
7+
alias ThinNotionApi.Properties
8+
alias ThinNotionApi.Types
89

910
@spec retrieve_database(String.t()) :: Types.Response.t()
1011
@doc """

lib/thin_notion_api/pages.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ defmodule ThinNotionApi.Pages do
33
Module for interacting with the Notion pages.
44
"""
55
import ThinNotionApi.Base
6-
alias ThinNotionApi.{Properties, Types}
6+
alias ThinNotionApi.Properties
7+
alias ThinNotionApi.Types
78

89
@doc """
910
Retrieves a Page object using the ID specified.

lib/thin_notion_api/types/database_query_params.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
defmodule ThinNotionApi.Types.DatabaseQueryParams do
2+
@moduledoc """
3+
Defines the options for the database query API.
4+
"""
5+
26
@typedoc """
37
Parameters for using the database query API.
48
"""

lib/thin_notion_api/types/pagination_params.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
defmodule ThinNotionApi.Types.PaginationParams do
2+
@moduledoc """
3+
Defines parameters for pagination.
4+
"""
5+
26
@typedoc """
37
Parameters for pagination.
48
"""

lib/thin_notion_api/types/response.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
defmodule ThinNotionApi.Types.Response do
2+
@moduledoc """
3+
Defines the response types for the API.
4+
"""
5+
26
@typedoc """
37
Response from the API, can either be a success or an error.
48
"""

lib/thin_notion_api/types/search_filter_params.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
defmodule ThinNotionApi.Types.SearchFilterParams do
2+
@moduledoc """
3+
Defines the options for the filtering search results
4+
"""
5+
26
@typedoc """
37
Parameters for the filtering search results.
48
"""
5-
69
@type t :: %__MODULE__{
710
value: String.t(),
811
property: String.t(),

lib/thin_notion_api/types/search_params.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
defmodule ThinNotionApi.Types.SearchParams do
2+
@moduledoc """
3+
Defines parameters for using the search API.
4+
"""
5+
26
@typedoc """
37
Parameters for using the search API.
48
"""
5-
69
@type t :: %__MODULE__{
710
query: String.t(),
811
sort: ThinNotionApi.Types.SearchSortParams.t(),

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule ThinNotionApi.MixProject do
44
def project do
55
[
66
app: :thin_notion_api,
7-
version: "1.0.0",
7+
version: "1.0.1",
88
package: package(),
99
description: description(),
1010
source_url: "https://github.com/CodingZeal/thin_notion_api",

mix.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%{
2-
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
2+
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
33
"certifi": {:hex, :certifi, "2.6.1", "dbab8e5e155a0763eea978c913ca280a6b544bfa115633fa20249c3d396d9493", [:rebar3], [], "hexpm", "524c97b4991b3849dd5c17a631223896272c6b0af446778ba4675a1dff53bb7e"},
4-
"credo": {:hex, :credo, "1.5.6", "e04cc0fdc236fefbb578e0c04bd01a471081616e741d386909e527ac146016c6", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "4b52a3e558bd64e30de62a648518a5ea2b6e3e5d2b164ef5296244753fc7eb17"},
4+
"credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"},
55
"earmark_parser": {:hex, :earmark_parser, "1.4.15", "b29e8e729f4aa4a00436580dcc2c9c5c51890613457c193cc8525c388ccb2f06", [:mix], [], "hexpm", "044523d6438ea19c1b8ec877ec221b008661d3c27e3b848f4c879f500421ca5c"},
66
"ex_doc": {:hex, :ex_doc, "0.25.1", "4b736fa38dc76488a937e5ef2944f5474f3eff921de771b25371345a8dc810bc", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3200b0a69ddb2028365281fbef3753ea9e728683863d8cdaa96580925c891f67"},
77
"exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], [], "hexpm", "1222419f706e01bfa1095aec9acf6421367dcfab798a6f67c54cf784733cd6b5"},
@@ -11,7 +11,7 @@
1111
"hackney": {:hex, :hackney, "1.17.4", "99da4674592504d3fb0cfef0db84c3ba02b4508bae2dff8c0108baa0d6e0977c", [:rebar3], [{:certifi, "~>2.6.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "de16ff4996556c8548d512f4dbe22dd58a587bf3332e7fd362430a7ef3986b16"},
1212
"httpoison": {:hex, :httpoison, "1.8.0", "6b85dea15820b7804ef607ff78406ab449dd78bed923a49c7160e1886e987a3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "28089eaa98cf90c66265b6b5ad87c59a3729bea2e74e9d08f9b51eb9729b3c3a"},
1313
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
14-
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
14+
"jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"},
1515
"jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], [], "hexpm", "fc3499fed7a726995aa659143a248534adc754ebd16ccd437cd93b649a95091f"},
1616
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
1717
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},

test/thin_notion_api/blocks_test.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ defmodule ThinNotionApi.BlocksTest do
3030
end
3131
end
3232

33-
3433
test "PATCH update_block" do
3534
use_cassette "patch_update_block", match_requests_on: [:request_body] do
3635
{:ok, response} = Blocks.update_block("c4c027f4ea7c41c5908d63a7f5a9c32c", %{
@@ -92,7 +91,6 @@ defmodule ThinNotionApi.BlocksTest do
9291
end
9392
end
9493

95-
9694
test "DELETE block" do
9795
use_cassette "delete_block", match_requests_on: [:request_body] do
9896
{:ok, response} = Blocks.retrieve_block_children("9b4a624d5a18482ab2187e54166edda7")

test/thin_notion_api/users_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defmodule ThinNotionApi.UsersTest do
22
use ExUnit.Case, async: true
33
use ExVCR.Mock, adapter: ExVCR.Adapter.Hackney
44

5-
alias ThinNotionApi.Users
5+
alias ThinNotionApi.Users
66

77
setup_all do
88
HTTPoison.start

0 commit comments

Comments
 (0)