def WriteEvents(request, callback, customData=None, extraHeaders=None):
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Event/WriteEvents", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
def AuthUser(request, callback, customData = None, extraHeaders = None):
    """
    Validates a user with the PlayFab service
    https://docs.microsoft.com/rest/api/playfab/matchmaker/matchmaking/authuser
    """
    if not PlayFabSettings.DeveloperSecretKey:
        raise PlayFabErrors.PlayFabException("Must have DeveloperSecretKey set to call this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Matchmaker/AuthUser", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey, wrappedCallback, customData, extraHeaders)
def PlayerLeft(request, callback, customData = None, extraHeaders = None):
    """
    Informs the PlayFab game server hosting service that the indicated user has left the Game Server Instance specified
    https://docs.microsoft.com/rest/api/playfab/matchmaker/matchmaking/playerleft
    """
    if not PlayFabSettings.DeveloperSecretKey:
        raise PlayFabErrors.PlayFabException("Must have DeveloperSecretKey set to call this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Matchmaker/PlayerLeft", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey, wrappedCallback, customData, extraHeaders)
def UserInfo(request, callback, customData = None, extraHeaders = None):
    """
    Retrieves the relevant details for a specified user, which the external match-making service can then use to compute
    effective matches
    https://docs.microsoft.com/rest/api/playfab/matchmaker/matchmaking/userinfo
    """
    if not PlayFabSettings.DeveloperSecretKey:
        raise PlayFabErrors.PlayFabException("Must have DeveloperSecretKey set to call this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Matchmaker/UserInfo", request, "X-SecretKey", PlayFabSettings.DeveloperSecretKey, wrappedCallback, customData, extraHeaders)
Example #5
0
def RemoveMembers(request, callback, customData=None, extraHeaders=None):
    """
    Removes members from a group.
    https://docs.microsoft.com/rest/api/playfab/groups/groups/removemembers
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/RemoveMembers", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #6
0
def FinalizeFileUploads(request, callback, customData=None, extraHeaders=None):
    """
    Finalize file uploads to an entity's profile.
    https://docs.microsoft.com/rest/api/playfab/data/file/finalizefileuploads
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/File/FinalizeFileUploads", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #7
0
def PublishDraftItem(request, callback, customData=None, extraHeaders=None):
    """
    Initiates a publish of an item from the working catalog to the public catalog.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/publishdraftitem
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/PublishDraftItem", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #8
0
def ReviewItem(request, callback, customData=None, extraHeaders=None):
    """
    Creates or updates a review for the specified item.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/reviewitem
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/ReviewItem", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #9
0
def WriteEvents(request, callback, customData=None, extraHeaders=None):
    """
    Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
    https://docs.microsoft.com/rest/api/playfab/events/playstream-events/writeevents
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Event/WriteEvents", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #10
0
def GetItemReviews(request, callback, customData=None, extraHeaders=None):
    """
    Get a paginated set of reviews associated with the specified item.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitemreviews
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/GetItemReviews", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #11
0
def ListMembership(request, callback, customData=None, extraHeaders=None):
    """
    Lists all groups and roles for an entity
    https://docs.microsoft.com/rest/api/playfab/groups/groups/listmembership
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/ListMembership", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #12
0
def SetPerformance(request, callback, customData=None, extraHeaders=None):
    """
    Sets the Insights performance level value for the title.
    https://docs.microsoft.com/rest/api/playfab/insights/analytics/setperformance
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Insights/SetPerformance", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #13
0
def IsMember(request, callback, customData=None, extraHeaders=None):
    """
    Checks to see if an entity is a member of a group or role within the group
    https://docs.microsoft.com/rest/api/playfab/groups/groups/ismember
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/IsMember", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #14
0
def DeleteGroup(request, callback, customData=None, extraHeaders=None):
    """
    Deletes a group and all roles, invitations, join requests, and blocks associated with it.
    https://docs.microsoft.com/rest/api/playfab/groups/groups/deletegroup
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/DeleteGroup", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #15
0
def ChangeMemberRole(request, callback, customData=None, extraHeaders=None):
    """
    Changes the role membership of a list of entities from one role to another.
    https://docs.microsoft.com/rest/api/playfab/groups/groups/changememberrole
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/ChangeMemberRole", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #16
0
def ListFunctions(request, callback, customData=None, extraHeaders=None):
    """
    Lists all currently registered Azure Functions for a given title.
    https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/listfunctions
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/CloudScript/ListFunctions", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #17
0
def GetObjects(request, callback, customData=None, extraHeaders=None):
    """
    Retrieves objects from an entity's profile.
    https://docs.microsoft.com/rest/api/playfab/data/object/getobjects
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Object/GetObjects", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #18
0
def GetLanguageList(request, callback, customData=None, extraHeaders=None):
    """
    Retrieves the list of allowed languages, only accessible by title entities
    https://docs.microsoft.com/rest/api/playfab/localization/localization/getlanguagelist
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Locale/GetLanguageList", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #19
0
def UpdateRole(request, callback, customData=None, extraHeaders=None):
    """
    Updates metadata about a role.
    https://docs.microsoft.com/rest/api/playfab/groups/groups/updaterole
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/UpdateRole", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #20
0
def GetDraftItems(request, callback, customData=None, extraHeaders=None):
    """
    Retrieves a paginated list of the items from the draft catalog.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/getdraftitems
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/GetDraftItems", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #21
0
def ApplyToGroup(request, callback, customData=None, extraHeaders=None):
    """
    Applies to join a group
    https://docs.microsoft.com/rest/api/playfab/groups/groups/applytogroup
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/ApplyToGroup", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #22
0
def CreateUploadUrls(request, callback, customData=None, extraHeaders=None):
    """
    Creates one or more upload URLs which can be used by the client to upload raw file data.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/createuploadurls
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/CreateUploadUrls", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #23
0
def BlockEntity(request, callback, customData=None, extraHeaders=None):
    """
    Blocks a list of entities from joining a group.
    https://docs.microsoft.com/rest/api/playfab/groups/groups/blockentity
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Group/BlockEntity", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #24
0
def ReportItem(request, callback, customData=None, extraHeaders=None):
    """
    Submit a report for an item, indicating in what way the item is inappropriate.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/reportitem
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/ReportItem", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #25
0
def StartGame(request, callback, customData=None, extraHeaders=None):
    """
    Instructs the PlayFab game server hosting service to instantiate a new Game Server Instance
    https://docs.microsoft.com/rest/api/playfab/matchmaker/matchmaking/startgame
    """
    if not PlayFabSettings.DeveloperSecretKey:
        raise PlayFabErrors.PlayFabException(
            "Must have DeveloperSecretKey set to call this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Matchmaker/StartGame", request, "X-SecretKey",
                       PlayFabSettings.DeveloperSecretKey, wrappedCallback,
                       customData, extraHeaders)
Example #26
0
def GetCatalogConfig(request, callback, customData=None, extraHeaders=None):
    """
    Gets the configuration for the catalog.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/getcatalogconfig
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/GetCatalogConfig", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #27
0
def GetGlobalPolicy(request, callback, customData=None, extraHeaders=None):
    """
    Gets the global title access policy
    https://docs.microsoft.com/rest/api/playfab/profiles/account-management/getglobalpolicy
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Profile/GetGlobalPolicy", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #28
0
def CreateDraftItem(request, callback, customData=None, extraHeaders=None):
    """
    Creates a new item in the working catalog using provided metadata.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/createdraftitem
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/CreateDraftItem", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #29
0
def DeleteItem(request, callback, customData=None, extraHeaders=None):
    """
    Removes an item from working catalog and all published versions from the public catalog.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/deleteitem
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/DeleteItem", request, "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)
Example #30
0
def TakedownItemReviews(request, callback, customData=None, extraHeaders=None):
    """
    Submit a request to takedown one or more reviews.
    https://docs.microsoft.com/rest/api/playfab/economy/catalog/takedownitemreviews
    """
    if not PlayFabSettings._internalSettings.EntityToken:
        raise PlayFabErrors.PlayFabException(
            "Must call GetEntityToken before calling this method")

    def wrappedCallback(playFabResult, error):
        if callback:
            callback(playFabResult, error)

    PlayFabHTTP.DoPost("/Catalog/TakedownItemReviews", request,
                       "X-EntityToken",
                       PlayFabSettings._internalSettings.EntityToken,
                       wrappedCallback, customData, extraHeaders)