Official Elixir library for the WordPress.com REST API.
def deps do
[
{:wpcom, "~> 1.0.0"}
]
end
Not all requests require a REST API token. For example, listing posts on a public site is something anyone can do.
But if you do need a token, check out OAuth2 Authentication at WordPress.com Developer Resources on how to get one.
Then use the token by adding this to your runtime.exs
:
config :wpcom, :oauth2_token: "_YOUR_OAUTH2_TOKEN_HERE_"
mix test
mix dialyzer
mix credo