PieceJSON Keys

Contents

PieceJSON

JSON KeyTypeReq.UpdateConstraints / Notes
titletitleObjectConstraint: 30 characters or fewer.
-------
Note: Piece title. Can be set separately for different languages. English title is required. Give users a good idea of your Piece with an easy-to-understand name.
descriptiondescription
Object
Note: Piece description. Can be set separately for different languages. English description is required. Users will see this description. What does your Piece do? Let the user know, and be sure to include any restrictions or special notes.
vendorIdstring×Constraint: ID number assigned when registering as a Vendor who will create PieceCore using the SDK.
-------
Note: A unique ID used to distinguish between different vendors. If not set, the default will be "none".
deviceIdstring×Constraint: ID number assigned when registering a Device that will run your PieceCore using the Riiiver SDK.
-------
Note: The ID of the device that is able to run your Piece. If not set, the default will be "none".
categoryIdsarray×Constraint: Choose 1 or 2 of the categories included on the master list.
-------
Note: This ID will place your Piece in the Riiiver category that you believe best fits its function.
osTypestring×Constraint: Choose 1 of either: "iOS", "Android", or "none".
-------
Note: Specify the type of smartphone OS that is able to control your Piece. If all devices are supported, select "none".
versionstringConstraint: Set 1.0.0 as your first version. Increment upwards when you update your Piece. Major/Minor updates are defined by you.
-------
Note: Piece Version.
sdkVersionstringConstraint: Choose from a list of public Riiiver SDK release versions.
-------
Note: Choose the minimum SDK version needed to operate your Piece. If not dependent on the Riiiver SDK, select 1.0.0.
blockTypestring×Constraint: Choose 1 Piece type: "trigger", "service", or "action".
-------
Note: Specify whether your Piece will operate as a T (Trigger), S (Service), or A (Action) Piece.
executorstring×Note: The class (module) name of the client app that actually runs the Piece.
permissionListobject××Note: Permission list of items on the user’s device that they will need to grant your Piece access to in order for it to operate.
preferencespreference
Object
×Note: Settings to be set or selected by the User. Piece operation will vary based on these user specifications.
inputinputObject×Constraint: Only 1 input can be specified.
-------
Note: Specify the type, format, etc. of data that your Piece can receive as input. This information is received from the previous Piece or the device.
outputoutputObject×Constraint: Only 1 output can be specified.
-------
Note: Specify the type, format, etc. of the date your Piece outputs. Your output will be sent to the next Piece or device.
serviceProxyserviceProxy
Object
××Note: Referenced when the Piece uses a service proxy in order to store data.


titleObject

JSON KeyTypeReq.UpdateNotes
enstringThe English title of the Piece
jastring×The Japanese title of the Piece
itstring×The Italian title of the Piece
frstring×The French title of the Piece
esstring×The Spanish title of the Piece
destring×The German title of the Piece
pt-PTstring×The Portuguese title of the Piece
zh-Hansstring×The simplified Chinese title of the Piece
zh-Hantstring×The traditional Chinese title of the Piece


descriptionObject

JSON KeyTypeReq.UpdateNotes
enstringThe English description of the Piece
jastring×The Japanese description of the Piece
itstring×The Italian description of the Piece
frstring×The French description of the Piece
esstring×The Spanish description of the Piece
destring×The German description of the Piece
pt-PTstring×The Portuguese description of the Piece
zh-Hansstring×The simplified Chinese description of the Piece
zh-Hantstring×The traditional Chinese description of the Piece


permissionList

JSON KeyTypeReq.Constraints / Notes
iosarrayConstraint: "location": Must be specified when accessing the location information of the smartphone. "mediaLibrary": Must be specified when accessing device (smartphone) media libraries.
-------
Note: Permissions required when the user has an iOS device.
androidarrayConstraint: "location": Must be specified when accessing the location information of the smartphone. "mediaLibrary": Must be specified when accessing device (smartphone) media libraries.
-------
Note: Permissions required when the user has an Android device.


preferences

Note: JSON Keys that start with "--" indicate that they are located two levels below the previous JSON Key. For instance, the "--type" donation could be used in the following case:

"properties": {
   "cityName": {          // Key that a developer sets as a name. 
      "type": "string",   // This level is "--type" from a "properties" point of view, .
      "x-description": {
        "en": "Set the location from which to get temperature data.",
        "ja": "気温を取得する地域を指定します。"
      }
   }
},

In the following table, "--type", "-- format", "-- x-unit", and "-- default" all exist at the same level, two steps down the "properties" hierarchy:

JSON KeyTypeReq.UpdateConstraints / Notes
typestring×Constraint: Must be specified as an "object".
-------
Note: JSON schema type.
propertiesobject×Note: Preference you can name at your discretion for data reference.
-- typestring×Constraint: Choose 1 from the below list: "boolean", "number","string", "array".
-------
Note: Set preference data type.
-- maximumnumber××Note: Use with Pieces that have text data input to set the "maximum" possible input limited.
×Constraint: Must be specified as "minimum","maximum","multipleOf"
-------
Note: --type detail. Use with Pieces that have number data input to set the maximum possible number value. enum overrides "maximum" if enum is set.
-- minimumnumber×Constraint: Must be specified as "minimum","maximum","multipleOf"
-------
Note: --type detail. Use with Pieces that have number data input to set the minimum possible number value. enum overrides "minimum" if enum is set.
-- multipleOfnumber×Constraint: Must be specified as "minimum","maximum","multipleOf"
-------
Note: --type detail. Use with Pieces that have number data input to set the interval number value. enum overrides "multipleOf" if enum is set.
-- enumEnum××Note: Specify when you want to limit the value set in the Preferences.
-- x-enum-titlesobject×Note: Specify when you want to add notes in different languages for the values you have set in the enum preferences.
-- x-titletitleObjectNote: The title of the value to be set by the user in the Preferences.
-- x-descriptiondescription
Object
Note: The description of the value to be set in the Preferences.
-- x-input-typestringConstraint: Choose a Preference type: "drumroll", "calendar", "slider", "radio", "map", "text", "textarea", "switch", "time".
-- defaultobject××Constraint: Should match the set value type.
-------
Note: Default value set in the Preferences, i.e, the value that will be used if the Riiiver user does not make any adjustments.
-- x-hiddenboolean×Constraint: true: non-display, false: display
-------
Note: Preference display settings. Default: true
x-field-orderarray×Note: Specify the order in which the items defined under properties are displayed to the user.

† Making modifications to x-input-type that would expand or change the nature of the --type of data to be retrieved is not possible. For example, when a "drumroll" x-input-type is used to retrieve number data, you cannot revise to a "switch" method that would produce "boolean" data instead, because this does not match the --type of data sought by the Piece.


inputObject

JSON KeyTypeReq.UpdateConstraints / Notes
typestring×Constraint: Must be specified as an "object".
-------
Note: The type of the JSON Schema.
propertiesobject×Note: Field you can name at your discretion for data reference.
-- typestring×Constraint: Choose 1 from the below list: "boolean", "number", "string","object",array.
-------
Note: Set input data type.
-- x-titletitleObject×Note: The title of the input data.
-- x-descriptiondescription
Object
×Note: The description of the input data.
-- formatstringstring
type: ○
Other: ×
×Note: Additional, required information that only applies to Pieces which accept string data as input.
-- x-unitstring××Note: Use with Pieces that have number data input to set the unit measurement of the number. If no unit needs to be specified, this does not need to be set.
-- minimumnumbernumber
type: ○
Other: ×
×Note: --type detail. Use with Pieces that have number data input to set the minimum possible number value. Select a value between -1,000,000 and 1,000,000 which is lower than the maximum value. Required setting for number input.
-- maximumnumbernumber
type: ○
Other: ×
×Note: --type detail. Use with Pieces that have number data input to set the maximum possible number value. Select a value between -1,000,000 and 1,000,000 which is higher than the minimum value. Required setting for number input.


outputObject

JSON KeyTypeReq.UpdateConstraints / Notes
typestring×Constraint: Must be specified as an "object".The type of the JSON Schema.
propertiesobject×Note: Field you can name at your discretion for data reference.
-- typestring×Constraint: Choose 1 from the below list:: "boolean", "number", "string","object","array".
-------
Note: Set output data type.
-- x-titletitleObject×Note: The title of the output data.
-- x-descriptiondescription
Object
×Note: The description of the output data.
-- formatstringstring
type: ○
Other: ×
×Note: Additional, required information that only applies to Pieces which output string data.
-- x-unitstring××Note: Use with Pieces that output number data to set the unit measurement of the number. If no unit needs to be specified, this does not need to be set.
-- minimumnumbernumber
type: ○
Other: ×
×Note: --type detail. Use with Pieces that have number data input to set the minimum possible number value. Select a value between -1,000,000 and 1,000,000 which is lower than the maximum value. Required setting for number input.
-- maximumnumbernumber
type: ○
Other: ×
×Note: --type detail. Use with Pieces that have number data input to set the maximum possible number value. Select a value between -1,000,000 and 1,000,000 which is higher than the minimum value. Required setting for number input.


serviceProxyObject

JSON KeyTypeReq.Constraints / Notes
servicestringNote: The name of the ServiceProxyCore to be used on Lambda.
parametersarray×Constraint: "location": Specify when accessing location information from the user's smartphone.
-------
Note: Device-dependent information required for ProxyCore operation.
authTypearray×Constraint: You can choose a type from the list below: "apiKey", "oauth2", "other" Note that the RiiiverSDK only supports "OAuth2" for authentication. When processing via any method other than OAuth2, you will need to implement the authentication process independently on your app side.
-------
Note: Specify when using an external service in ProxyCore that requires authorization. Specify the authentication process type.

Was this page helpful?