### ----------------------------------------------------
### -- fez
### -- Licenses: Artistic-2.0
### -- Authors: 
### -- File: docs/Fez/API.md
### ----------------------------------------------------
[//]: <> (THIS FILE IS AUTOGENERATED, DO NOT EDIT - 2023-01-30T20:05:59.857022-05:00)

# Fez::API

This module contains all of the interaction you can perform with the fez|zef ecosystem.  Enjoy

## org-create

You, too, can create orgs

params:

1. api-key: required
1. name: required, the org name to create
1. email: required, the email to use for this account

returns: _api-response_

## org-join

Allows you to accept an org invitation

params:

1. api-key: required
1. name: required, the name of the org you have a pending invite for

returns: _api-response_

## org-leave

Allows you to leave an org.  If you're the last admin of the org then you must first set your role to `member`.  This is to avoid an accidentally orphaned org

1. api-key: required,
1. name: required, the name of the org you'd like to leave

returns: _api-response_

## org-pending

Lists your pending org invites

1. api-key: required

returns: _list-org-response_

## org-list

Lists the orgs you currently belong to

1. api-key: required

returns: _list-org-response_

## org-members

Lists the members of an org.  All members of an org are public

1. api-key: required

returns: _members-org-response_

## org-invite

Invites a user to an org.  You must be an admin of that org

1. api-key: required
1. username: required, org to invite user to
1. role: required, `member`|`admin`
1. user: user to invite

returns: _api-response_

## org-mod

Changes a user's role.  You must be an admin of the org to do this

1. api-key: required
1. name: required, org to alter user's role
1. role: required, `member`|`admin`
1. user: user to alter

returns: _api-response_

## init-password-reset

Initializes a password reset

1. username: required, the username you'd like to initiate a password reset for

returns: _api-response_

## password-reset

Resets the password

1. username: required, the username you'd like to initiate a password reset for
1. key: required, the key emailed to user (initiated by calling `init-password-reset`)
1. password: required, the user's new password

returns: _auth-response_

## register

Creates an auth, if not exists.  Orgs and users share an auth namespace.  This does *NOT* log you in, you
must call `login` after this to obtain an api key.

1. email: required, the user's email to send password reset, ecosystem notifications to, etc
1. username: required, the auth to create
1. password: required, the user's password

returns: _api-response_

## login

Logs the user in and creates an `api-key` for use with other functions

1. username: required
1. password: required

returns: _auth-response_

## update-meta

Updates the user's meta

1. api-key: required
1. display name: optional, if an empty string is given then no update will be made
1. website: optional, if an empty string is given then no update will be made
1. display email: optional, if an empty string is given then no update will be made

returns: _api-response_

## update-org-meta

Updates the org's meta

1. api-key: required
1. org: required, the org name to change meta data for
1. display name: optional, if an empty string is given then no update will be made
1. website: optional, if an empty string is given then no update will be made
1. display email: optional, if an empty string is given then no update will be made

returns: _api-response_

## upload

Uploads a dist to the fez|zef ecosystem

1. api-key: required
1. file: required, path to a file to upload

returns: _api-response_

## remove

USE SPARINGLY.  Removes a dist from the ecosystem. This will fail if the dist has been uploaded more than 24 hours before
this command is dispatched.  The intent of this method is to give some room for module authors to remit sensitive data.

1. api-key: required
1. dist: required, the full dist string you'd see in the `fez list` output

returns: _api-response_


