Xsolla::GameKeys::XsollaGameKeys
Public Functions
| Name | |
|---|---|
| static void | GetGamesList(Action< GameItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string country =null, string additionalFields =“long_description”) Gets a games list for building a catalog. |
| static void | GetGameForCatalog(string itemSku, Action< GameItem > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =“long_description”) Gets a game for the catalog. |
| static void | GetGameKeyForCatalog(string itemSku, Action< GameKeyItems > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =“long_description”) Gets a game key for the catalog. |
| static void | GetGamesListBySpecifiedGroup(string groupId, Action< GameItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string country =null, string additionalFields =“long_description”) Gets a games list from the specified group for building a catalog. |
| static void | GetGameKeysListBySpecifiedGroup(string groupId, Action< GameKeyItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string country =null, string additionalFields =“long_description”) Gets a game key list from the specified group for building a catalog. |
| static void | GetDrmList(Action< DrmItems > onSuccess, Action< Error > onError) Grants entitlement by a provided game code. |
| static void | GetOwnedGames(bool sandbox, Action< GameOwnership > onSuccess, Action< Error > onError, int limit =50, int offset =0, string additionalFields =“long_description”) Get the list of games owned by the user. The response will contain an array of games owned by a particular user. |
| static void | RedeemGameCode(string gameCode, bool sandbox, Action onSuccess, Action< Error > onError) Grants entitlement by a provided game code. |
Public Functions Documentation
function GetGamesList
Copy
- C#
1static void GetGamesList(
2 Action< GameItems > onSuccess,
3 Action< Error > onError,
4 int limit =50,
5 int offset =0,
6 string locale =null,
7 string country =null,
8 string additionalFields ="long_description"
9)
Gets a games list for building a catalog.
Parameters:
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- limit Limit for the number of elements on the page.
- offset Number of the element from which the list is generated (the count starts from 0).
- locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
- country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function GetGameForCatalog
Copy
- C#
1static void GetGameForCatalog(
2 string itemSku,
3 Action< GameItem > onSuccess,
4 Action< Error > onError,
5 string locale =null,
6 string country =null,
7 string additionalFields ="long_description"
8)
Gets a game for the catalog.
Parameters:
- itemSku Item SKU.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
- country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function GetGameKeyForCatalog
Copy
- C#
1static void GetGameKeyForCatalog(
2 string itemSku,
3 Action< GameKeyItems > onSuccess,
4 Action< Error > onError,
5 string locale =null,
6 string country =null,
7 string additionalFields ="long_description"
8)
Gets a game key for the catalog.
Parameters:
- itemSku Item SKU.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
- country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function GetGamesListBySpecifiedGroup
Copy
- C#
1static void GetGamesListBySpecifiedGroup(
2 string groupId,
3 Action< GameItems > onSuccess,
4 Action< Error > onError,
5 int limit =50,
6 int offset =0,
7 string locale =null,
8 string country =null,
9 string additionalFields ="long_description"
10)
Gets a games list from the specified group for building a catalog.
Parameters:
- groupId Group external ID.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- limit Limit for the number of elements on the page.
- offset Number of the element from which the list is generated (the count starts from 0).
- locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
- country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function GetGameKeysListBySpecifiedGroup
Copy
- C#
1static void GetGameKeysListBySpecifiedGroup(
2 string groupId,
3 Action< GameKeyItems > onSuccess,
4 Action< Error > onError,
5 int limit =50,
6 int offset =0,
7 string locale =null,
8 string country =null,
9 string additionalFields ="long_description"
10)
Gets a game key list from the specified group for building a catalog.
Parameters:
- groupId Group external ID.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- limit Limit for the number of elements on the page.
- offset Number of the element from which the list is generated (the count starts from 0).
- locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
- country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function GetDrmList
Copy
- C#
1static void GetDrmList(
2 Action< DrmItems > onSuccess,
3 Action< Error > onError
4)
Grants entitlement by a provided game code.
Parameters:
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
function GetOwnedGames
Copy
- C#
1static void GetOwnedGames(
2 bool sandbox,
3 Action< GameOwnership > onSuccess,
4 Action< Error > onError,
5 int limit =50,
6 int offset =0,
7 string additionalFields ="long_description"
8)
Get the list of games owned by the user. The response will contain an array of games owned by a particular user.
Parameters:
- sandbox What type of entitlements should be returned. If the parameter is set to true, the entitlements received by the user in the sandbox mode only are returned. If the parameter isn’t passed or is set to false, the entitlements received by the user in the live mode only are returned.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
- limit Limit for the number of elements on the page.
- offset Number of the element from which the list is generated (the count starts from 0).
- additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields
media_list,order, andlong_description.
function RedeemGameCode
Copy
- C#
1static void RedeemGameCode(
2 string gameCode,
3 bool sandbox,
4 Action onSuccess,
5 Action< Error > onError
6)
Grants entitlement by a provided game code.
Parameters:
- gameCode Game code.
- sandbox Redeem game code in the sandbox mode. The option is available for those users who are specified in the list of company users.
- onSuccess Called after server response.
- onError Called after the request resulted with an error.
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.