Skip to content

Commit b70e9cb

Browse files
cdhannagithub-actions[bot]
authored andcommitted
syncing sdk from openapi
1 parent a29019e commit b70e9cb

189 files changed

Lines changed: 1039 additions & 874 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
2+
namespace Beamable.Api.Autogenerated.Playersession
3+
{
4+
using Beamable.Api.Autogenerated.Models;
5+
using Beamable.Common.Content;
6+
using Beamable.Common;
7+
using IBeamableRequester = Beamable.Common.Api.IBeamableRequester;
8+
using Method = Beamable.Common.Api.Method;
9+
using Beamable.Common.Dependencies;
10+
11+
public partial interface IBeamPlayersessionApi
12+
{
13+
/// <summary>
14+
/// Get session history for a player.
15+
///
16+
/// GET call to `/api/players/{playerId}/sessions` endpoint.
17+
/// </summary>
18+
/// <param name="month"></param>
19+
/// <param name="playerId"></param>
20+
/// <param name="year"></param>
21+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
22+
/// <returns>A promise containing the <see cref="PlayerSessionActorSessionHistoryResponse"/></returns>
23+
Promise<PlayerSessionActorSessionHistoryResponse> GetSessions(string playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> month, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> year, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
24+
/// <summary>
25+
/// Get session history for the requesting player (client endpoint).
26+
///
27+
/// GET call to `/api/players/{playerId}/sessions/client` endpoint.
28+
/// </summary>
29+
/// <param name="month"></param>
30+
/// <param name="playerId"></param>
31+
/// <param name="year"></param>
32+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
33+
/// <returns>A promise containing the <see cref="PlayerSessionActorSessionClientHistoryResponse"/></returns>
34+
Promise<PlayerSessionActorSessionClientHistoryResponse> GetSessionsClient(string playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> month, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> year, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
35+
}
36+
public partial class BeamPlayersessionApi : IBeamPlayersessionApi
37+
{
38+
/// <summary>
39+
/// Get session history for a player.
40+
///
41+
/// GET call to `/api/players/{playerId}/sessions` endpoint.
42+
/// </summary>
43+
/// <param name="month"></param>
44+
/// <param name="playerId"></param>
45+
/// <param name="year"></param>
46+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
47+
/// <returns>A promise containing the <see cref="PlayerSessionActorSessionHistoryResponse"/></returns>
48+
public virtual Promise<PlayerSessionActorSessionHistoryResponse> GetSessions(string playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> month, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> year, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
49+
{
50+
string gsUrl = "/api/players/{playerId}/sessions";
51+
gsUrl = gsUrl.Replace("{playerId}", _requester.EscapeURL(playerId.ToString()));
52+
string gsQuery = "?";
53+
System.Collections.Generic.List<string> gsQueries = new System.Collections.Generic.List<string>();
54+
if (((month != default(OptionalInt))
55+
&& month.HasValue))
56+
{
57+
gsQueries.Add(string.Concat("month=", month.Value.ToString()));
58+
}
59+
if (((year != default(OptionalInt))
60+
&& year.HasValue))
61+
{
62+
gsQueries.Add(string.Concat("year=", year.Value.ToString()));
63+
}
64+
if ((gsQueries.Count > 0))
65+
{
66+
gsQuery = string.Concat(gsQuery, string.Join("&", gsQueries));
67+
gsUrl = string.Concat(gsUrl, gsQuery);
68+
}
69+
// make the request and return the result
70+
return _requester.Request<PlayerSessionActorSessionHistoryResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<PlayerSessionActorSessionHistoryResponse>);
71+
}
72+
/// <summary>
73+
/// Get session history for the requesting player (client endpoint).
74+
///
75+
/// GET call to `/api/players/{playerId}/sessions/client` endpoint.
76+
/// </summary>
77+
/// <param name="month"></param>
78+
/// <param name="playerId"></param>
79+
/// <param name="year"></param>
80+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
81+
/// <returns>A promise containing the <see cref="PlayerSessionActorSessionClientHistoryResponse"/></returns>
82+
public virtual Promise<PlayerSessionActorSessionClientHistoryResponse> GetSessionsClient(string playerId, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> month, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<int> year, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
83+
{
84+
string gsUrl = "/api/players/{playerId}/sessions/client";
85+
gsUrl = gsUrl.Replace("{playerId}", _requester.EscapeURL(playerId.ToString()));
86+
string gsQuery = "?";
87+
System.Collections.Generic.List<string> gsQueries = new System.Collections.Generic.List<string>();
88+
if (((month != default(OptionalInt))
89+
&& month.HasValue))
90+
{
91+
gsQueries.Add(string.Concat("month=", month.Value.ToString()));
92+
}
93+
if (((year != default(OptionalInt))
94+
&& year.HasValue))
95+
{
96+
gsQueries.Add(string.Concat("year=", year.Value.ToString()));
97+
}
98+
if ((gsQueries.Count > 0))
99+
{
100+
gsQuery = string.Concat(gsQuery, string.Join("&", gsQueries));
101+
gsUrl = string.Concat(gsUrl, gsQuery);
102+
}
103+
// make the request and return the result
104+
return _requester.Request<PlayerSessionActorSessionClientHistoryResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<PlayerSessionActorSessionClientHistoryResponse>);
105+
}
106+
}
107+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
namespace Beamable.Api.Autogenerated.Playersession
3+
{
4+
using Beamable.Api.Autogenerated.Models;
5+
using Beamable.Common.Content;
6+
using Beamable.Common;
7+
using IBeamableRequester = Beamable.Common.Api.IBeamableRequester;
8+
using Method = Beamable.Common.Api.Method;
9+
using Beamable.Common.Dependencies;
10+
11+
public partial interface IBeamPlayersessionApi
12+
{
13+
}
14+
public partial class BeamPlayersessionApi : IBeamPlayersessionApi
15+
{
16+
private IBeamableRequester _requester;
17+
private IDependencyProvider _provider;
18+
private System.Collections.Generic.List<Beamable.Serialization.JsonSerializable.ISerializableFactory> _serializationFactories;
19+
public BeamPlayersessionApi(IBeamableRequester requester, [System.Runtime.InteropServices.DefaultParameterValueAttribute(default(Beamable.Common.Dependencies.IDependencyProvider))] [System.Runtime.InteropServices.OptionalAttribute()] IDependencyProvider provider)
20+
{
21+
this._requester = requester;
22+
_provider = provider;
23+
_serializationFactories = new System.Collections.Generic.List<Beamable.Serialization.JsonSerializable.ISerializableFactory>();
24+
_serializationFactories.Add(new IOneOf_HttpCallOrPublishMessageOrServiceCallFactory());
25+
_serializationFactories.Add(new IOneOf_CronTriggerOrExactTriggerFactory());
26+
_serializationFactories.Add(new IOneOf_ContentOrTextOrBinaryFactory());
27+
}
28+
private T Serialize<T>(string json)
29+
where T : Beamable.Serialization.JsonSerializable.ISerializable, new ()
30+
{
31+
if ((_provider != default(Beamable.Common.Dependencies.IDependencyProvider)))
32+
{
33+
if (_provider.CanBuildService<ICustomSerializer<T>>())
34+
{
35+
ICustomSerializer<T> serializer = _provider.GetService<ICustomSerializer<T>>();
36+
return serializer.Deserialize(json);
37+
}
38+
}
39+
return Beamable.Serialization.JsonSerializable.FromJson<T>(json, _serializationFactories);
40+
}
41+
}
42+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
2+
namespace Beamable.Api.Autogenerated.Session
3+
{
4+
using Beamable.Api.Autogenerated.Models;
5+
using Beamable.Common.Content;
6+
using Beamable.Common;
7+
using IBeamableRequester = Beamable.Common.Api.IBeamableRequester;
8+
using Method = Beamable.Common.Api.Method;
9+
using Beamable.Common.Dependencies;
10+
11+
public partial interface IBeamSessionApi
12+
{
13+
/// <summary>
14+
/// Start a session for a player. Used by old clients whose POST /basic/session
15+
///is forwarded by the Scala proxy.
16+
///
17+
/// POST call to `/api/sessions` endpoint.
18+
/// </summary>
19+
/// <param name="gsReq">The <see cref="SessionActorStartSessionRequest"/> instance to use for the request</param>
20+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
21+
/// <returns>A promise containing the <see cref="ApiSessionsPostSessionResponse"/></returns>
22+
Promise<ApiSessionsPostSessionResponse> PostApiSessions(SessionActorStartSessionRequest gsReq, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
23+
/// <summary>
24+
/// Legacy session heartbeat. Bridges into the actor presence system
25+
///so old clients that don't use WebSocket presence pings appear online.
26+
///
27+
/// POST call to `/api/sessions/heartbeat` endpoint.
28+
/// </summary>
29+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
30+
/// <returns>A promise containing the <see cref="ApiSessionsHeartbeatPostSessionResponse"/></returns>
31+
Promise<ApiSessionsHeartbeatPostSessionResponse> PostHeartbeat([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
32+
/// <summary>
33+
/// Legacy online status endpoint. Handles GET /sessions/status forwarded
34+
///by the Scala proxy for old clients that query online status via the
35+
///session service rather than the presence API.
36+
///
37+
/// GET call to `/api/sessions/status` endpoint.
38+
/// </summary>
39+
/// <param name="intervalSecs"></param>
40+
/// <param name="playerIds"></param>
41+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
42+
/// <returns>A promise containing the <see cref="ApiSessionsStatusGetSessionResponse"/></returns>
43+
Promise<ApiSessionsStatusGetSessionResponse> GetStatus([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<long> intervalSecs, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> playerIds, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader);
44+
}
45+
public partial class BeamSessionApi : IBeamSessionApi
46+
{
47+
/// <summary>
48+
/// Start a session for a player. Used by old clients whose POST /basic/session
49+
///is forwarded by the Scala proxy.
50+
///
51+
/// POST call to `/api/sessions` endpoint.
52+
/// </summary>
53+
/// <param name="gsReq">The <see cref="SessionActorStartSessionRequest"/> instance to use for the request</param>
54+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
55+
/// <returns>A promise containing the <see cref="ApiSessionsPostSessionResponse"/></returns>
56+
public virtual Promise<ApiSessionsPostSessionResponse> PostApiSessions(SessionActorStartSessionRequest gsReq, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
57+
{
58+
string gsUrl = "/api/sessions";
59+
// make the request and return the result
60+
return _requester.Request<ApiSessionsPostSessionResponse>(Method.POST, gsUrl, Beamable.Serialization.JsonSerializable.ToJson(gsReq), includeAuthHeader, this.Serialize<ApiSessionsPostSessionResponse>);
61+
}
62+
/// <summary>
63+
/// Legacy session heartbeat. Bridges into the actor presence system
64+
///so old clients that don't use WebSocket presence pings appear online.
65+
///
66+
/// POST call to `/api/sessions/heartbeat` endpoint.
67+
/// </summary>
68+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
69+
/// <returns>A promise containing the <see cref="ApiSessionsHeartbeatPostSessionResponse"/></returns>
70+
public virtual Promise<ApiSessionsHeartbeatPostSessionResponse> PostHeartbeat([System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
71+
{
72+
string gsUrl = "/api/sessions/heartbeat";
73+
// make the request and return the result
74+
return _requester.Request<ApiSessionsHeartbeatPostSessionResponse>(Method.POST, gsUrl, default(object), includeAuthHeader, this.Serialize<ApiSessionsHeartbeatPostSessionResponse>);
75+
}
76+
/// <summary>
77+
/// Legacy online status endpoint. Handles GET /sessions/status forwarded
78+
///by the Scala proxy for old clients that query online status via the
79+
///session service rather than the presence API.
80+
///
81+
/// GET call to `/api/sessions/status` endpoint.
82+
/// </summary>
83+
/// <param name="intervalSecs"></param>
84+
/// <param name="playerIds"></param>
85+
/// <param name="includeAuthHeader">By default, every request will include an authorization header so that the request acts on behalf of the current user. When the includeAuthHeader argument is false, the request will not include the authorization header for the current user.</param>
86+
/// <returns>A promise containing the <see cref="ApiSessionsStatusGetSessionResponse"/></returns>
87+
public virtual Promise<ApiSessionsStatusGetSessionResponse> GetStatus([System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<long> intervalSecs, [System.Runtime.InteropServices.DefaultParameterValueAttribute(null)] [System.Runtime.InteropServices.OptionalAttribute()] Beamable.Common.Content.Optional<string> playerIds, [System.Runtime.InteropServices.DefaultParameterValueAttribute(true)] [System.Runtime.InteropServices.OptionalAttribute()] bool includeAuthHeader)
88+
{
89+
string gsUrl = "/api/sessions/status";
90+
string gsQuery = "?";
91+
System.Collections.Generic.List<string> gsQueries = new System.Collections.Generic.List<string>();
92+
if (((playerIds != default(OptionalString))
93+
&& playerIds.HasValue))
94+
{
95+
gsQueries.Add(string.Concat("playerIds=", playerIds.Value.ToString()));
96+
}
97+
if (((intervalSecs != default(OptionalLong))
98+
&& intervalSecs.HasValue))
99+
{
100+
gsQueries.Add(string.Concat("intervalSecs=", intervalSecs.Value.ToString()));
101+
}
102+
if ((gsQueries.Count > 0))
103+
{
104+
gsQuery = string.Concat(gsQuery, string.Join("&", gsQueries));
105+
gsUrl = string.Concat(gsUrl, gsQuery);
106+
}
107+
// make the request and return the result
108+
return _requester.Request<ApiSessionsStatusGetSessionResponse>(Method.GET, gsUrl, default(object), includeAuthHeader, this.Serialize<ApiSessionsStatusGetSessionResponse>);
109+
}
110+
}
111+
}

0 commit comments

Comments
 (0)