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 { View, ScrollView, Text, Animated, PanResponder } from 'react-native'; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| cards: [], | |
| } | |
| } |
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
| this.mainPanResponder = PanResponder.create({ | |
| onStartShouldSetPanResponder: () => true, | |
| onMoveShouldSetPanResponder: () => true, | |
| onPanResponderMove: Animated.event([ | |
| null, { dx: this.mainPosition.x, dy: this.mainPosition.y } | |
| ]), | |
| onPanResponderGrant: (event, gesture) => { | |
| this.mainPosition.setOffset({ | |
| x: this.mainPosition.x._value, | |
| y: this.mainPosition.y._value |
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
| addCard = (y) => { | |
| const { cards } = this.state; | |
| const newStack = [...cards]; | |
| const style = { ...styles.dropCard }; | |
| style.top = y; | |
| const card = ( | |
| <view key="{y}" style="{style}"> | |
| <text>Sample</text> | |
| </view> |
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, { Component } from 'react'; | |
| import { View, ScrollView, Text, Animated, PanResponder } from 'react-native'; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
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
| function buildAddOn(e) { | |
| var accessToken = e.messageMetadata.accessToken; | |
| GmailApp.setCurrentMessageAccessToken(accessToken); | |
| var textWidget = CardService.newTextParagraph().setText('Hello World') | |
| section.addWidget(textWidget); | |
| var card = CardService.newCardBuilder() | |
| .setHeader(CardService.newCardHeader() |
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 scopes = [ | |
| 'https://www.googleapis.com/auth/script.external_request', | |
| 'https://www.googleapis.com/auth/userinfo.email', | |
| 'https://www.googleapis.com/auth/gmail.addons.execute', | |
| 'https://www.googleapis.com/auth/gmail.addons.current.message.readonly' | |
| ] | |
| function getService() { | |
| return OAuth2.createService('Demo Auth') |
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
| function buildAddOn(e) { | |
| var accessToken = e.messageMetadata.accessToken; | |
| GmailApp.setCurrentMessageAccessToken(accessToken); | |
| checkAuth() | |
| var section = CardService.newCardSection() | |
| var textWidget = CardService.newTextParagraph().setText('Hello World') | |
| section.addWidget(textWidget); |
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
| <!DOCTYPE html> | |
| <head> | |
| <script src="https://apis.google.com/js/platform.js" async defer></script> | |
| <meta name="google-signin-client_id" content="<%= clientId %>"> | |
| </head> | |
| <body> | |
| <div> | |
| <div class="g-signin2" data-onsuccess="onSignIn"></div> |
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
| app.post('/token', (req, res) => { | |
| const { code } = req.body; | |
| console.log(code); | |
| const result = {}; | |
| if (!code || code.length <= 0) { | |
| result.error = 'no valid code!' | |
| } else { | |
| result.expires_in = 2592000 | |
| } | |
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 followUser = (username, following) => { | |
| const timelineFeed = client.feed('timeline', username); | |
| timelineFeed.follow('user', following); | |
| }; |
OlderNewer