npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

playfab-sdk

v2.152.240412

Published

Playfab SDK for node.js applications

Downloads

8,324

Readme

NodeSDK README

1. Overview:

Playfab SDK for node.js applications

This SDK includes all PlayFab APIs (Client, Server, Admin) in a single javascript file suitable for using in node.js.

2. Prerequisites:

To connect to the PlayFab service, your machine must be running TLS v1.2 or better.

3. Installation:

The following console command will install the PlayFab NodeSDK. It requires that you have correctly installed node.

npm install playfab-sdk

3b. Example testing project:

The following console command will install the PlayFab NodeSDK example automated-testing project. It requires that you have correctly installed node.

npm install playfab-testing

To run the test, you need to create a testTitleData.json file, explained below. You can place that file in the root of the example beside PlayFabApiTests.ts, or set the full-path location in an environment variable:

set PF_TEST_TITLE_DATA_JSON="C:/YOUR_PATH/testTitleData.json";

Replace "C:/YOUR_PATH" with the location of your testTitleData.json file.

4. testTitleData.json file required for example unit-test-project

This sdk includes an optional example project that is used by PlayFab to verify sdk features are fully functional.

Please read about the testTitleData.json format, and purpose here:

  • https://github.com/PlayFab/SDKGenerator/blob/master/JenkinsConsoleUtility/testTitleData.md See the previous section for how to use this file in the example test project.

5. Usage Instructions:

Please read our Node Getting Started Guide for step by step instructions on how to set up a Node environment using our PlayFab NodeSDK.

Below an older guide with less detail:

var PlayFabClient = require('./Scripts/PlayFab/PlayFabClient.js')

PlayFabClient.settings.titleId = "F00";

PlayFabClient.GetTitleData({Keys : ["Sample"]}, function(error, result)
{
    if(error)
    {
        console.log("Got an error: ",error);
        return;
    }

    console.log("Reply: ",result);
});

Use similar steps to gain access to the PlayFabServer, PlayFabAdmin, and PlayFabMatchmaker APIs. Additionally, you will need to set your developerSecretKey. For security reasons you must never expose this value to players.

PlayFabClient.settings.developerSecretKey = "your secret key";

You can find your titleId and developerSecretKey in the Game Manager -> Settings -> Credentials section for your title: https://developer.playfab.com/en-us/studios

6. Troubleshooting:

For a complete list of available APIs, check out the online documentation.

Contact Us

We love to hear from our developer community! Do you have ideas on how we can make our products and services better?

Our Developer Success Team can assist with answering any questions as well as process any feedback you have about PlayFab services.

Forums, Support and Knowledge Base

7. Copyright and Licensing Information:

Apache License -- Version 2.0, January 2004 http://www.apache.org/licenses/

Full details available within the LICENSE file.