User

Each user is accessed via /api/user .

Properties

Complete details in UserProperties.

id

The unique id for this user. It will never change.

wing_object_type

user

username

Another unique way of identifying a user. However, this can be changed by an admin or the user himself.

real_name

The name that this user goes by in the real world. Example: Andy Dufresne

email

An email address associated with this user.

use_as_display_name

Which field should be used to determine a display name. Defaults to username. Options are username, real_name, email.

display_name

Only used for display purposes. See also use_as_display_name.

admin

A boolean indicating whether the user has admin rights on the server.

shop_credit

The amount of shop credit owned by this user.

crafter_points

The amount of crafter points for this user.

approved_for_invoice

A boolean indicating whether the user has been granted the privilege of checking out using an invoice.

last_login

A date when the user last logged in to the system.

date_created

A date when the user was created.

date_updated

A date when the user's account was last updated.

root_folder_id

The id of the Folder where this user can upload files. When a user is created, a separate Folder is made for them.

avatar_id

The unique id of the avatar for this user.

avatar_uri

The URI of the avatar for this user.

payout_via

Determines how a user's profits will be distributed. Defaults to shop_credit. Options are: shop_credit and paypal and none.

paypal_email

The email address of the user's PayPal account. Only used if payout_via is set to paypal.

Related Objects

root_folder

The starting Folder where this user can upload files.

Relationships

designers

The list of Designers this user controls.

designerassociates

A list of DesignerAssociate relationships that this user is a part of.

associated-designers

A list of Designer this user is an associate of. See also designerassociates.

carts

The list of Carts the user has created.

receipts

The list of Receipts for previous orders the user has created.

reviews

The list of Reviews the user has created.

wishlists

The list of Wishlists the user has created.

folders

The list of root Folders controlled by this user. More specifically, those directly under the root_folder.

games

The list of Games controlled by this user through their Designers.

webhooks

The list of WebHooks you have subscribed to.

Methods

The methods used to fetch and manipulate users.

Options

Provides a list of the options that can be used to fill out various fields when creating or updating a user.

 GET /api/user/_options

Returns:

 {
    "use_as_display_name" : [...]
 }

NOTE: You can also get this data by adding _include_options=1 to the parameter list when fetching a user.

Update

 PUT /api/user/xxx
session_id

Required. The unique session id provided by a Session method.

username

Required.

password

A string to be set as the password. Must be at least 6 characters. Required.

real_name

Optional.

email

Required.

use_as_display_name

Optional.

avatar_id

Optional. The id of a File with a 300x300 image in it.

Can only be done by an admin or the user itself.

Returns:

 {
   "id" : "xxx",
   "username" : "andy",
   ...
 }

Delete

 DELETE /api/user/xxx
session_id

Required. The unique session id provided by a Session method.

Can only be done by an admin or the user itself.

Returns:

 {
   "success" : 1
 }

Fetch

 GET /api/user/xxx
session_id

Optional. The unique session id provided by a Session method.

Can by done by anybody.

Returns:

 {
   "id" : "xxx",
   "username" : "andy",
   ...
 }

Search

 GET /api/user
query

A partial username or email address.

Returns:

 {
    "items" : [
        {
            "id" : "xxx",
            "display_name" : "Andy",
            ...
        },
        ...
    ],
    "paging" : {}
 }

Fetch Addresses

 GET /api/user/xxx/addresses

 {
    "items" : [
        {
            "id" : "xxx",
            "name" : "Andy Dufresne",
            "state" : "ME"
            ...
        },
        ...
    ],
    "paging" : {}
 }

Create a folder in the User's directory, unless it already exists

 POST /api/user/xxx/get_folder

This is a utility method. If the requested Folder already exists by name, then it returns that folder. Otherwise, it returns named folder.

name

The name of the folder to create/return.

parent_id

The ID of the folder to look for and optionally create the named folder.

^ Back to Top ^