A Discord API rest library
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config docs: comment out example config Apr 25, 2018
deploy
lib fix(Base): add closing ) to user agent, use helper variables Jan 12, 2019
test feat(CDN): add cdn module Jul 1, 2018
.formatter.exs chore: initial commit Apr 25, 2018
.gitignore chore: initial commit Apr 25, 2018
.travis.yml chore(CI): update elixir and otp versions Sep 12, 2018
LICENSE chore: initial commit Apr 25, 2018
README.md chore: release 0.1.7 Nov 7, 2018
mix.exs chore: release 0.1.7 Nov 7, 2018
mix.lock chore: run bangify task Nov 5, 2018

README.md

Crux.Rest

Package providing rest functions and rate limiting for the Discord API.

Useful links

Installation

The package can be installed by adding crux_rest to your list of dependencies in mix.exs:

def deps do
  [
    {:crux_rest, "~> 0.1.7"}
  ]
end

Usage

After providing a token to use via either your config.exs, Application.put_env/3, or :application.set_env/3 freely use the functions provided by the Crux.Structs.Rest module.

For example:

  iex> Crux.Rest.create_message!(445290716198076427, content: "Hello there!")
  %Crux.Structs.Message{
    content: "Hello there!",
    author: %Crux.Structs.User{...},
    ...
  }