Ejemplo n.º 1
0
        /// <summary>
        /// Get map Get a map by its name
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="mapName"></param>
        /// <returns>ApiResponse of MapInfo</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <MapInfo> GetMapWithHttpInfo(string mapName)
        {
            // verify the required parameter 'mapName' is set
            if (mapName == null)
            {
                throw new Tgm.Roborally.Api.Client.ApiException(400, "Missing required parameter 'mapName' when calling MapRepoApi->GetMap");
            }

            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("map_name", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(mapName)); // path parameter

            // authentication (admin-access) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("skey")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "skey", this.Configuration.GetApiKeyWithPrefix("skey")));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <MapInfo>("/maps/{map_name}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetMap", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// trace event All events needed by the client are accessible here. (Usefull for animations) More about this function is found in the [regarding Github Issue](https://github.com/FactoryRally/game-controller/issues/6)  **This function only returns the type of the event you need to fetch the data seperately** &gt; Read more at [api-usage.md](https://github.com/FactoryRally/game-controller/blob/master/documentation/rest/api-usage.md#events- -updates)
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="wait">If true the server will not responde until a event is added to the queue  Rrequires less traffic but might impacts the servers performance or cause timeouts at the client</param>
        /// <param name="batch">If true you will get all past events at once If false the list only contains the oldest unfetched event (optional, default to false)</param>
        /// <returns>ApiResponse of List&lt;EventType&gt;</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <List <EventType> > TraceEventWithHttpInfo(int gameId, bool wait, bool?batch = default(bool?))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId)); // path parameter
            if (batch != null)
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "batch", batch));
            }
            localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "wait", wait));

            // authentication (player-auth) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("pat")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "pat", this.Configuration.GetApiKeyWithPrefix("pat")));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <List <EventType> >("/games/{game_id}/events/type", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("TraceEvent", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Delete Map Delete a map by its name
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="mapName"></param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Tgm.Roborally.Api.Client.ApiResponse <Object> > DeleteMapAsyncWithHttpInfo(string mapName)
        {
            // verify the required parameter 'mapName' is set
            if (mapName == null)
            {
                throw new Tgm.Roborally.Api.Client.ApiException(400, "Missing required parameter 'mapName' when calling MapRepoApi->DeleteMap");
            }


            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("map_name", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(mapName)); // path parameter

            // authentication (admin-access) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("skey")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "skey", this.Configuration.GetApiKeyWithPrefix("skey")));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.DeleteAsync <Object>("/maps/{map_name}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("DeleteMap", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Get tile Inspect a tile of the map
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="x">The x codinate of the tile</param>
        /// <param name="y">The y codinate of the tile</param>
        /// <returns>ApiResponse of Tile</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <Tile> GetTileWithHttpInfo(int gameId, int x, int y)
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId)); // path parameter
            localVarRequestOptions.PathParameters.Add("x", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(x));            // path parameter
            localVarRequestOptions.PathParameters.Add("y", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(y));            // path parameter

            // authentication (player-auth) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("pat")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "pat", this.Configuration.GetApiKeyWithPrefix("pat")));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Get <Tile>("/games/{game_id}/map/tiles/{x}/{y}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetTile", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Buy Upgrade Buy or exchange an upgrade
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="upgradeId">The id of the upgrade to interact with</param>
        /// <param name="exchange">The id of the upgrade to exchange with. Set to null or leave empty for a regular purchase (optional)</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <Object> BuyUpgradeWithHttpInfo(int gameId, int upgradeId, int?exchange = default(int?))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId));       // path parameter
            localVarRequestOptions.PathParameters.Add("upgrade_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(upgradeId)); // path parameter
            if (exchange != null)
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "exchange", exchange));
            }


            // make the HTTP request
            var localVarResponse = this.Client.Patch <Object>("/games/{game_id}/upgrades/shop/{upgrade_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("BuyUpgrade", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Save Map Saves a map to the repository
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="map">The map to save (optional)</param>
        /// <returns>ApiResponse of Object(void)</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <Object> SaveMapWithHttpInfo(Map map = default(Map))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.Data = map;

            // authentication (admin-access) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("skey")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "skey", this.Configuration.GetApiKeyWithPrefix("skey")));
            }

            // make the HTTP request
            var localVarResponse = this.Client.Post <Object>("/maps/", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("SaveMap", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Get upgrade information Get detailed information about the Upgrade
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="upgradeId">The id of the upgrade to interact with</param>
        /// <returns>Task of ApiResponse (Upgrade)</returns>
        public async System.Threading.Tasks.Task <Tgm.Roborally.Api.Client.ApiResponse <Upgrade> > GetUpgradeInformationAsyncWithHttpInfo(int gameId, int upgradeId)
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId));       // path parameter
            localVarRequestOptions.PathParameters.Add("upgrade_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(upgradeId)); // path parameter

            // authentication (player-auth) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("pat")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "pat", this.Configuration.GetApiKeyWithPrefix("pat")));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.GetAsync <Upgrade>("/games/{game_id}/upgrades/{upgrade_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("GetUpgradeInformation", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Register Consumers Add a consumer to create a *virtual* (*spectating*) player to consume events
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="consumerRegistration">Information about the joining consumer (optional)</param>
        /// <returns>ApiResponse of JoinResponse</returns>
        public Tgm.Roborally.Api.Client.ApiResponse <JoinResponse> RegisterConsumerWithHttpInfo(int gameId, ConsumerRegistration consumerRegistration = default(ConsumerRegistration))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            var localVarContentType = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderContentType(_contentTypes);

            if (localVarContentType != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
            }

            var localVarAccept = Tgm.Roborally.Api.Client.ClientUtils.SelectHeaderAccept(_accepts);

            if (localVarAccept != null)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId)); // path parameter
            localVarRequestOptions.Data = consumerRegistration;


            // make the HTTP request
            var localVarResponse = this.Client.Post <JoinResponse>("/games/{game_id}/consumers", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("RegisterConsumer", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Buy Upgrade Buy or exchange an upgrade
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="upgradeId">The id of the upgrade to interact with</param>
        /// <param name="exchange">The id of the upgrade to exchange with. Set to null or leave empty for a regular purchase (optional)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Tgm.Roborally.Api.Client.ApiResponse <Object> > BuyUpgradeAsyncWithHttpInfo(int gameId, int upgradeId, int?exchange = default(int?))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId));       // path parameter
            localVarRequestOptions.PathParameters.Add("upgrade_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(upgradeId)); // path parameter
            if (exchange != null)
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "exchange", exchange));
            }


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PatchAsync <Object>("/games/{game_id}/upgrades/shop/{upgrade_id}", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("BuyUpgrade", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Save Map Saves a map to the repository
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="map">The map to save (optional)</param>
        /// <returns>Task of ApiResponse</returns>
        public async System.Threading.Tasks.Task <Tgm.Roborally.Api.Client.ApiResponse <Object> > SaveMapAsyncWithHttpInfo(Map map = default(Map))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.Data = map;

            // authentication (admin-access) required
            if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("skey")))
            {
                localVarRequestOptions.QueryParameters.Add(Tgm.Roborally.Api.Client.ClientUtils.ParameterToMultiMap("", "skey", this.Configuration.GetApiKeyWithPrefix("skey")));
            }

            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <Object>("/maps/", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("SaveMap", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Register Consumers Add a consumer to create a *virtual* (*spectating*) player to consume events
        /// </summary>
        /// <exception cref="Tgm.Roborally.Api.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="gameId">The id of the game to interact with</param>
        /// <param name="consumerRegistration">Information about the joining consumer (optional)</param>
        /// <returns>Task of ApiResponse (JoinResponse)</returns>
        public async System.Threading.Tasks.Task <Tgm.Roborally.Api.Client.ApiResponse <JoinResponse> > RegisterConsumerAsyncWithHttpInfo(int gameId, ConsumerRegistration consumerRegistration = default(ConsumerRegistration))
        {
            Tgm.Roborally.Api.Client.RequestOptions localVarRequestOptions = new Tgm.Roborally.Api.Client.RequestOptions();

            String[] _contentTypes = new String[] {
                "application/json"
            };

            // to determine the Accept header
            String[] _accepts = new String[] {
                "application/json"
            };

            foreach (var _contentType in _contentTypes)
            {
                localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType);
            }

            foreach (var _accept in _accepts)
            {
                localVarRequestOptions.HeaderParameters.Add("Accept", _accept);
            }

            localVarRequestOptions.PathParameters.Add("game_id", Tgm.Roborally.Api.Client.ClientUtils.ParameterToString(gameId)); // path parameter
            localVarRequestOptions.Data = consumerRegistration;


            // make the HTTP request

            var localVarResponse = await this.AsynchronousClient.PostAsync <JoinResponse>("/games/{game_id}/consumers", localVarRequestOptions, this.Configuration);

            if (this.ExceptionFactory != null)
            {
                Exception _exception = this.ExceptionFactory("RegisterConsumer", localVarResponse);
                if (_exception != null)
                {
                    throw _exception;
                }
            }

            return(localVarResponse);
        }