Show / Hide Table of Contents

Class Users

Your games will not authenticate users by using their username and password. Instead, users have a token to verify themselves along with their username.

Inheritance
System.Object
Service
Users
Inherited Members
Service.Api
Service.Wrap(Task<Response>, Action<Response>)
Service.Wrap<T>(Task<Response<T>>, Action<Response<T>>)
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: GameJolt.Services
Assembly: GameJolt.dll
Syntax
public sealed class Users : Service

Methods

| Improve this Doc View Source

Auth(String, String, Action<Response<Credentials>>)

Authenticates the user's information. This should be done before you make any calls for the user, to make sure the user's credentials (username and token) are valid. The callback is called with the authenticated user credentials or null if the authentication has failed.

Declaration
public void Auth(string name, string token, Action<Response<Credentials>> callback)
Parameters
Type Name Description
System.String name

The user's username.

System.String token

The user's token (not his password!)

System.Action<Response<Credentials>> callback

Action that is called on completion or error.

| Improve this Doc View Source

AuthAsync(String, String)

Authenticates the user's information. This should be done before you make any calls for the user, to make sure the user's credentials (username and token) are valid. When the returned is awaited, the resulting Credentials object can be used to perform user queries.

Declaration
public Task<Response<Credentials>> AuthAsync(string name, string token)
Parameters
Type Name Description
System.String name

The user's username.

System.String token

The user's token (not his password!)

Returns
Type Description
System.Threading.Tasks.Task<Response<Credentials>>
| Improve this Doc View Source

Fetch(Int32, Action<Response<User>>)

Returns a user's data, like name, id, avatar, etc.

Declaration
public void Fetch(int id, Action<Response<User>> callback)
Parameters
Type Name Description
System.Int32 id

The user's GameJolt id.

System.Action<Response<User>> callback

Action that is called on completion or error.

| Improve this Doc View Source

Fetch(Int32[], Action<Response<User[]>>)

Returns the data for several user's at once.

Declaration
public void Fetch(int[] ids, Action<Response<User[]>> callback)
Parameters
Type Name Description
System.Int32[] ids

Array of user ids.

System.Action<Response<User[]>> callback

Action that is called on completion or error.

| Improve this Doc View Source

Fetch(String, Action<Response<User>>)

Returns a user's data, like name, id, avatar, etc.

Declaration
public void Fetch(string name, Action<Response<User>> callback)
Parameters
Type Name Description
System.String name

The user's username.

System.Action<Response<User>> callback

Action that is called on completion or error.

| Improve this Doc View Source

FetchAsync(Int32)

Returns a user's data, like name, id, avatar, etc.

Declaration
public Task<Response<User>> FetchAsync(int id)
Parameters
Type Name Description
System.Int32 id

The user's GameJolt id.

Returns
Type Description
System.Threading.Tasks.Task<Response<User>>
| Improve this Doc View Source

FetchAsync(Int32[])

Returns the data for several user's at once.

Declaration
public Task<Response<User[]>> FetchAsync(int[] ids)
Parameters
Type Name Description
System.Int32[] ids

Array of user ids.

Returns
Type Description
System.Threading.Tasks.Task<Response<User[]>>
| Improve this Doc View Source

FetchAsync(String)

Returns a user's data, like name, id, avatar, etc.

Declaration
public Task<Response<User>> FetchAsync(string name)
Parameters
Type Name Description
System.String name

The user's username.

Returns
Type Description
System.Threading.Tasks.Task<Response<User>>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX