This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Alexa = require("alexa-sdk"); | |
| const QueryKintoneRecords = require("./QueryKintoneRecords"); | |
| const queryKintoneRecords = new QueryKintoneRecords.QueryKintoneRecords( | |
| process.env.KINTONE_SUBDOMAIN, process.env.KINTONE_APP_ID, process.env.KINTONE_API_TOKEN); | |
| let kintoneData = {}; | |
| exports.handler = function (event, context, callback) { | |
| queryKintoneRecords.queryRecords("") | |
| .then((records) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const stripe = require("stripe")(process.env.SK); | |
| exports.handler = (event, context, callback) => { | |
| console.log("Received event:", JSON.stringify(event, null, 2)); | |
| const done = (err, res) => callback(null, { | |
| statusCode: err ? "400" : "200", | |
| body: err ? err.message : JSON.stringify(res), | |
| headers: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { ApolloClient } from 'apollo-client'; | |
| import { HttpLink } from 'apollo-link-http'; | |
| import { InMemoryCache } from 'apollo-cache-inmemory'; | |
| import { ApolloProvider } from 'react-apollo'; | |
| import ArticleList from './ArticleList'; | |
| const link = new HttpLink({ | |
| uri: 'https://api.graph.cool/simple/v1/xxxxxxxx99x9x99999xx99xxx', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import gql from "graphql-tag"; | |
| import { graphql } from "react-apollo"; | |
| const ArticleItem = ({ article }) => ( | |
| <li style={{ width: 600 }}> | |
| <h3>{article.title}</h3> | |
| </li> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Diagnostics; | |
| using System.Text; | |
| using System.Security.Cryptography.X509Certificates; | |
| using uPLibrary.Networking.M2Mqtt; | |
| using uPLibrary.Networking.M2Mqtt.Messages; | |
| private const string IotEndpoint = "endpoint.iot.ap-northeast-1.amazonaws.com"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const awsIot = require('aws-iot-device-sdk'); | |
| const device = awsIot.device({ | |
| keyPath: '9xxxx9x999-private.pem.key', | |
| certPath: '9xxxx9x999-certificate.pem.crt', | |
| caPath: 'root.pem', | |
| clientId: 'iotTest', | |
| host: 'endpoint.iot.ap-northeast-1.amazonaws.com' | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const Alexa = require('alexa-sdk'); | |
| const request = require('request'); | |
| exports.handler = function(event, context, callback) { | |
| const requestBody = { | |
| "grant_type": "client_credentials", | |
| "client_id": process.env.clientid, | |
| "client_secret": process.env.secret, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var handlers = { | |
| 'Messaging.MessageReceived': function() { | |
| console.log("Messaging.MessageReceived", JSON.stringify(this.event)); | |
| const message = this.event.request.message; | |
| const apiAccessToken = this.event.context.System.apiAccessToken; | |
| let date1 = new Date(); | |
| date1.setMinutes(date1.getMinutes() + 30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Amplify from 'aws-amplify'; | |
| import aws_exports from './aws-exports'; | |
| import { withAuthenticator } from 'aws-amplify-react'; | |
| import { I18n } from 'aws-amplify'; | |
| Amplify.configure(aws_exports); | |
| const dict = { | |
| 'ja': { | |
| 'User does not exist.': "ユーザー名またはパスワードが正しくありません", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require('isomorphic-fetch'); | |
| const AUTH_TYPE = require('aws-appsync/lib/link/auth-link').AUTH_TYPE; | |
| const AWSAppSyncClient = require('aws-appsync').default; | |
| const gql = require('graphql-tag'); | |
| const uuid = require('uuid/v4'); | |
| const newMessage = gql(` | |
| mutation createMessage($id: ID!, $content: String, $conversationId: ID!, $createdAt: String!) { | |
| createMessage(id: $id, content: $content, conversationId: $conversationId, createdAt: $createdAt){ | |
| __typename |