@@ -1,11 +1,13 @@
|
||||
defmodule Wikipedia.Config do
|
||||
@type t :: %__MODULE__{
|
||||
user_agent: String.t(),
|
||||
req_options: Keyword.t()
|
||||
req_options: Keyword.t(),
|
||||
api_cooldown: non_neg_integer()
|
||||
}
|
||||
|
||||
defstruct user_agent: "change me",
|
||||
req_options: []
|
||||
req_options: [],
|
||||
api_cooldown: 1000
|
||||
|
||||
@schema NimbleOptions.new!(
|
||||
user_agent: [
|
||||
@@ -17,6 +19,11 @@ defmodule Wikipedia.Config do
|
||||
type: :keyword_list,
|
||||
required: false,
|
||||
default: []
|
||||
],
|
||||
api_cooldown: [
|
||||
type: :integer,
|
||||
required: false,
|
||||
default: 1000
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user