alexa-games / skills-gameon-sdk-js

The Skills GameOn SDK (Beta) is a Node.js package that makes creating leaderboards and competitions, powered by Amazon GameOn, easier for Alexa Skill developers.
https://skills-gameon-sdk.github.io
Apache License 2.0
19 stars 11 forks source link

Feature: setting the apiEndpoint in the SkillsGameOnApiClient constructor #48

Open mblaya opened 3 years ago

mblaya commented 3 years ago

Feature Request

Being able to set the apiEndpoint when calling the SkillsGameOnApiClient constructor.

Current SDK Version

0.2.0

Current Behavior

At the moment, the apiEndPoint is hardcoded - see the code below

Desired Behavior

Being able to set the apiEndPoint

Additional Information

export class SkillsGameOnApiClient extends GameOnApiClient {
    /**
     * Creates a new instance of SkillsGameOnApiClient
     * @param apiConfiguration
     */
    constructor(apiConfiguration: ApiConfiguration = {
        apiClient: new DefaultApiClient(),
        apiEndpoint: 'https://api.amazongameon.com/v1'
    }) {
        super(apiConfiguration);
    }

I tried

const sdk       = require('@alexa-games/skills-gameon-sdk');
const defaultClient = new sdk.SkillsGameOnApiClient( {
        apiClient: new sdk.DefaultApiClient(),
        apiEndpoint: 'https://api.amazongameon.com/v1'
    } );

but lambda function times out