How to use the aws-api-gateway-client.newClient function in aws-api-gateway-client

To help you get started, we’ve selected a few aws-api-gateway-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Serverless-Vienna / Comments-Showcase / src / AwsCommentApi.js View on Github external
return new Promise((resolve, reject) => {
      apigClientFactory.newClient({ invokeUrl: APPCONFIG.AWS.FUNCTIONS.INVOKE_URL })
        // .commentsGet({}, {})
        .invokeApi({}, "/comments", "GET", {}, {})
        .then((response) => {
          resolve(this.fixTimestamp(JSON.parse(response.data.body).Items));
        })
        .catch((error) => {
          reject(error);
        });
    });
  }
github Serverless-Vienna / Comments-Showcase / src / AwsCommentApi.js View on Github external
post(comment) {
    const apigClient = apigClientFactory.newClient({
      accessKey: AWS.config.credentials.accessKeyId,
      secretKey: AWS.config.credentials.secretAccessKey,
      sessionToken: AWS.config.credentials.sessionToken,
      region: APPCONFIG.AWS.REGION,
      invokeUrl: APPCONFIG.AWS.FUNCTIONS.INVOKE_URL
    });
    return apigClient.invokeApi({}, "/comments", "POST", {}, comment);
  }

aws-api-gateway-client

A module for AWS API Gateway client

MIT
Latest version published 4 years ago

Package Health Score

47 / 100
Full package analysis