Show / Hide Table of Contents

Class Trophies

Game Jolt allows you to add trophies to your games!

Trophies come in four materials: bronze, silver, gold, and platinum. This is to reflect how difficult it is to achieve a trophy. A bronze trophy should be easy to achieve, whereas a platinum trophy should be very hard to achieve.

On Game Jolt, trophies are always listed in order from easiest to most difficult to achieve. You can also tag trophies on the site as "secret". A sercet trophy's image and description is not visible until a gamer has achieved it.
Inheritance
System.Object
Service
Trophies
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 Trophies : Service

Methods

| Improve this Doc View Source

Fetch(Credentials, Nullable<Boolean>, Int32[], Action<Response<Trophy[]>>)

Returns one trophy or multiple trophies, depending on the parameters passed in.

Declaration
public void Fetch(Credentials credentials, bool? achieved = default(bool? ), int[] ids = null, Action<Response<Trophy[]>> callback = null)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophies should be fetched.

System.Nullable<System.Boolean> achieved

Pass in true to return only the achieved trophies for a user. Pass in false to return only trophies the user hasn't achieved. Leave blank (null) to retrieve all trophies.

System.Int32[] ids

You may pass an array of trophy IDs here if you want to return a subset of all the trophies. Passing a trophy_id will ignore the achieved parameter if it is passed.

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

Action that is called on completion or error.

| Improve this Doc View Source

FetchAsync(Credentials, Nullable<Boolean>, Int32[])

Returns one trophy or multiple trophies, depending on the parameters passed in.

Declaration
public Task<Response<Trophy[]>> FetchAsync(Credentials credentials, bool? achieved = default(bool? ), int[] ids = null)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophies should be fetched.

System.Nullable<System.Boolean> achieved

Pass in true to return only the achieved trophies for a user. Pass in false to return only trophies the user hasn't achieved. Leave blank (null) to retrieve all trophies.

System.Int32[] ids

You may pass an array of trophy IDs here if you want to return a subset of all the trophies. Passing a trophy_id will ignore the achieved parameter if it is passed.

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

RemoveAchieved(Credentials, Int32, Action<Response>)

Remove a previously achieved trophy for a particular user.

Declaration
public void RemoveAchieved(Credentials credentials, int id, Action<Response> callback = null)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophy should be removed.

System.Int32 id

The id of the trophy to remove.

System.Action<Response> callback

Action that is called on completion or error.

| Improve this Doc View Source

RemoveAchievedAsync(Credentials, Int32)

Remove a previously achieved trophy for a particular user.

Declaration
public Task<Response> RemoveAchievedAsync(Credentials credentials, int id)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophy should be removed.

System.Int32 id

The id of the trophy to remove.

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

SetAchieved(Credentials, Int32, Action<Response>)

Sets a trophy as achieved for a particular user.

Declaration
public void SetAchieved(Credentials credentials, int id, Action<Response> callback = null)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophy should be unlocked.

System.Int32 id

The id of the trophy to unlock.

System.Action<Response> callback

Action that is called on completion or error.

| Improve this Doc View Source

SetAchievedAsync(Credentials, Int32)

Sets a trophy as achieved for a particular user.

Declaration
public Task<Response> SetAchievedAsync(Credentials credentials, int id)
Parameters
Type Name Description
Credentials credentials

The user's credentials for which the trophy should be unlocked.

System.Int32 id

The id of the trophy to unlock.

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