Sample Piece Download

Contents

Please check out and use the below sample codes as a starting point for creating your original Piece. Download via the links in the table below, then check below the table for a more detailed description of each sample.

Piece tittleDownload if you want to...Download LinkLatest update
Current Temperature (Celsius)・Use the Primary Tutorial Piece as your starting point.
・Use REST API(HTTP cummunication)
[Download]2020/9/16
Thermometer・Use REST API(HTTP communication)
・Integrate user location into your Piece
[Download]2020/9/16
Send Gmail Message・Connect to an external service requiring OAuth 2.0 authorization
・Receive data from the previous Piece as input
・Create an Action Piece
[Download]2020/9/16

Current Temperature (Celsius)

This is the sample Piece used throughout the tutorial featured in this documentation. The code for debugging in your local environment is also included in this zip file. Please refer to the Tutorial to follow the detailed story of this sample Piece.

This Service Piece provides the current temperature (in Celcius) in a set location using the using the OpenWeatherMap API.

Use this sample to learn how to use REST API in your Piece. Type the command shown below into your terminal to install the axios module, which is required to use REST API (HTTP communication).

npm install

Thermometer

This sample Service Piece provides the current temperature (in Celsius) using the World Weather Online's API. In this Piece, the user can set the location for which they want temperature information either by indicating a preset location using a map UI, or by allowing access to their own device's current location. You can learn How to utilize current location data (and also how to use REST API) in this Piece. Type the commands shown below in your terminal to install the axios module.

npm install

 


Send Gmail Message

This sample Action Piece sends an email whose body is the text received from the previous Service Piece. Utilizing the Gmail API, the Riiiver users grant approval to link to their Google account and send this email on their behalf.
Via this sample Piece, learn how to both Use external services requiring OAuth2.0 authorization and receive data from the previous Piece as input.
Type the below commands into your terminal to install the two modules called upon in this sample: axios, and js-base64.

npm install

Was this page helpful?