elidactyl v0.2.0 Elidactyl

API for Pterodactyl panel

Link to this section Summary

Functions

Create user with given params.

Delete user using internal pterodactyl user id.

Get all users.

Update user using pterodactyl internal user id and params.

Link to this section Functions

Link to this function

create_user(params)

Create user with given params.

Examples

iex> params = %{
...>  username: "example",
...>  email: "example@example.com",
...>  first_name: "John",
...>  last_name: "Doe",
...>  language: "en",
...>  root_admin: false
...> }
iex> Elidactyl.create_user(params)
{:ok, %Elidactyl.Schemas.User{external_id: nil, password: nil, "2fa": false, created_at: "2018-03-18T15:15:17+00:00", email: "example@example.com", first_name: "John", id: 2, language: "en", last_name: "Doe", root_admin: false, updated_at: "2018-10-16T21:51:21+00:00", username: "example", uuid: "c4022c6c-9bf1-4a23-bff9-519cceb38335"}}
Link to this function

delete_user(id)

Delete user using internal pterodactyl user id.

Examples

iex> Elidactyl.delete_user(1)
:ok
Link to this function

get_all_users()

Get all users.

Examples

iex> Elidactyl.get_all_users()
{:ok, [%Elidactyl.Schemas.User{external_id: nil, password: nil, "2fa": false, created_at: "2018-03-18T15:15:17+00:00", email: "codeco@file.properties", first_name: "Rihan", id: 1, language: "en", last_name: "Arfan", root_admin: true, updated_at: "2018-10-16T21:51:21+00:00", username: "codeco", uuid: "c4022c6c-9bf1-4a23-bff9-519cceb38335"}, %Elidactyl.Schemas.User{"2fa": false, created_at: "2018-09-29T17:59:45+00:00", email: "wardle315@gmail.com", external_id: nil, first_name: "Harvey", id: 4, language: "en", last_name: "Wardle", password: nil, root_admin: false, updated_at: "2018-10-02T18:59:03+00:00", username: "wardledeboss", uuid: "f253663c-5a45-43a8-b280-3ea3c752b931"}]}
Link to this function

update_user(id, params)

Update user using pterodactyl internal user id and params.

Examples

iex> params = %{
...>  email: "email@example.com",
...>  first_name: "John",
...>  last_name: "Doe",
...>  language: "en"
...> }
iex> Elidactyl.update_user(1, params)
{:ok, %Elidactyl.Schemas.User{external_id: nil, password: nil, "2fa": false, created_at: "2018-03-18T15:15:17+00:00", email: "email@example.com", first_name: "John", id: "1", language: "en", last_name: "Doe", root_admin: true, updated_at: "2018-10-16T21:51:21+00:00", username: "codeco", uuid: "c4022c6c-9bf1-4a23-bff9-519cceb38335"}}