Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
This question was closed Jun 26, 2020 at 09:13 AM by Muhammad Roshaan Tariq for the following reason: The question is answered, right answer was accepted
avatar image
Question by Muhammad Roshaan Tariq · Nov 20, 2019 at 01:39 PM · apisCloudScriptdocumentation

Complete Cloud Code developer document

Hi,

I wanted to know where I can find the developer document of Cloud Code because there's no Intellisense while writing code. So I want to see what built-in functions are already there and how can I access them using which type of object.

There should be an API document or Intellisense if there isn't one. Gamesparks already providing this in their Cloud code.

Comment
Roshaan
Element808
Claudio Grassi

People who like this

3 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
Best Answer

Answer by Citrus Yan · Nov 21, 2019 at 08:21 AM

Sorry, currently there is no public documentation specifying the Cloud Script environment (built-in functions, variables, etc. ) and Intellisense for writing Cloud Script code. However, you can refer to the CloudScript.d.ts file when writing your Cloud Script code, it’s a Cloud Script typing file which defines the PlayFab environment for you. For instance, if you want to use SetProfileLanguage API in Cloud Script but you don’t know whether it’s a built-in function, you can search for it in this file. You will find that the SetProfileLanguage API is defined in the file: SetProfileLanguage(request: PlayFabPro..., this is defined in the IPlayFabEntiyAPI scope, which can be accessed by the entity object. Therefore, you can call this API by typing entity.SetProfileLanguage({<parameters>}) in Cloud Script (parameters are listed in the SetProfileLanguageRequest interface).

Comment

People who like this

0 Show 9 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Muhammad Roshaan Tariq · Nov 21, 2019 at 08:24 AM 0
Share

@Citrus Yan Hmm... Well it is very important to have an API document don't you think? And what can you tell me about introducing it? Are you guys planning to launch these two things?

avatar image Muhammad Roshaan Tariq · Nov 21, 2019 at 09:43 AM 0
Share

Now I want to do multiple tasks using cloud code and I can do them on client side but I want to shift them on cloud. Giving the condition that there is no document then it means I have to issue a support ticket each time and then wait for the response which is pretty slow to me

You guys should definitely launch document and intellisense

avatar image Citrus Yan ♦ Muhammad Roshaan Tariq · Nov 22, 2019 at 08:44 AM 0
Share

You can make feature requests about this to help us improve PlayFab here: https://community.playfab.com/spaces/24/index.html

avatar image Muhammad Roshaan Tariq Citrus Yan ♦ · Nov 26, 2019 at 06:15 AM 0
Share

@Citrus Yan Yeah I have already requested this feature here

avatar image Citrus Yan ♦ Muhammad Roshaan Tariq · Nov 22, 2019 at 08:44 AM 1
Share

Looks like you already did it, great!

avatar image Muhammad Roshaan Tariq · Nov 21, 2019 at 10:35 AM 0
Share

How to get player profile with constraints mentioned using cloud script?

avatar image Citrus Yan ♦ Muhammad Roshaan Tariq · Nov 22, 2019 at 09:04 AM 0
Share

Here is the sample code:

handlers.test = function (args, context){
    
    
    var profile = server.GetPlayerProfile({
        
    PlayFabId: currentPlayerId,
    
    ProfileConstraints : {
        "ShowLastLogin" : true
    }
        
    });
    
    return profile;
}

For all available Player Profile View Constraints, you call refer to the API reference here: PlayerProfileViewConstraints

avatar image Muhammad Roshaan Tariq Citrus Yan ♦ · Nov 26, 2019 at 06:17 AM 0
Share

@Citrus Yan Yes I know about the API document but I wanted to know if it's already built-in function to avoid writing the code again

Thank you for the code snippet though

Show more comments
avatar image

Answer by Muhammad Roshaan Tariq · Dec 18, 2019 at 10:07 AM

@Citrus Yan I want to write a cloud code function for granting items to user because it can only be accessed using server API. So, is it available already in cloud code or should I create one?

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    5 People are following this question.

    avatar image avatar image avatar image avatar image avatar image

    Related Questions

    Saving data in Unity on Pause/Quit/Lose Focus 1 Answer

    UnlockContainer and CloudScriptAPIRequestError 1 Answer

    cloud script handlers 1 Answer

    Scheduled task to update Store 1 Answer

    Best solution for accessing TITLE INTERNAL DATA 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges