Show / Hide Table of Contents

Class Service

Base class for all GameJolt services.

Inheritance
System.Object
Service
Datastore
Friends
Scores
Sessions
Time
Trophies
Users
Inherited Members
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 abstract class Service

Constructors

| Improve this Doc View Source

Service(GameJoltApi)

Constructs a new service by using the provided API instance.

Declaration
protected Service(GameJoltApi api)
Parameters
Type Name Description
GameJoltApi api

The API instance which shall be used for the http requests.

Properties

| Improve this Doc View Source

Api

API instance which is used to perform http requests.

Declaration
protected GameJoltApi Api { get; }
Property Value
Type Description
GameJoltApi

Methods

| Improve this Doc View Source

Wrap(Task<Response>, Action<Response>)

Utility function used to provide callback APIs by internally using the async API. When the provided tasks finishes, the provided callback will be called.

Declaration
protected void Wrap(Task<Response> task, Action<Response> callback)
Parameters
Type Name Description
System.Threading.Tasks.Task<Response> task

The async task which should be wrapped.

System.Action<Response> callback

The callback which shall be called when the task finishes.

| Improve this Doc View Source

Wrap<T>(Task<Response<T>>, Action<Response<T>>)

Utility function used to provide callback APIs by internally using the async API. When the provided tasks finishes, the provided callback will be called.

Declaration
protected void Wrap<T>(Task<Response<T>> task, Action<Response<T>> callback)
Parameters
Type Name Description
System.Threading.Tasks.Task<Response<T>> task

The async task which should be wrapped.

System.Action<Response<T>> callback

The callback which shall be called when the task finishes.

Type Parameters
Name Description
T
  • Improve this Doc
  • View Source
Back to top Generated by DocFX