/** * The URI setter. * * @param uris Optional. A JSON array of the Spotify track URIs to play. * @return A {@link StartResumeUsersPlaybackRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder uris(final JsonArray uris) { assert (uris != null); assert (!uris.isJsonNull()); return setBodyParameter("uris", uris); }
/** * The album IDs setter. * * @param ids Optional. A json array consisting of the Spotify IDs. Maximum: 50 IDs. * @return A {@link SaveAlbumsForCurrentUserRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder ids(final JsonArray ids) { assert (ids != null); assert (!ids.isJsonNull()); assert (ids.size() <= 50); return setBodyParameter("ids", ids); }
/** * The track IDs setter. * * @param ids Optional. A json array consisting of the Spotify IDs. Maximum: 50 IDs. * @return A {@link SaveTracksForUserRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder ids(final JsonArray ids) { assert (ids != null); assert (!ids.isJsonNull()); assert (ids.size() <= 50); return setBodyParameter("ids", ids); }
/** * The track URIs setter. * <p> * <b>Note:</b> If the URIs already have been set with {@link #uris(String)}, any URIs listed here will be ignored. * * @param uris Optional. A JSON array of the Spotify track URIs to add. maximum: 100 track URIs. * @return An {@link AddTracksToPlaylistRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder uris(final JsonArray uris) { assert (uris != null); assert (!uris.isJsonNull()); assert (uris.size() <= 100); return setBodyParameter("uris", uris); }
/** * The track URIs setter. * <p> * <b>Note:</b> If the URIs have already been set with {@link #uris(String)}, any URIs set here will be ignored. * * @param uris Optional. A JSON array of Spotify track URIs to set. Maximum: 100 track URIs. * @return A {@link ReplacePlaylistsTracksRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder uris(final JsonArray uris) { assert (uris != null); assert (!uris.isJsonNull()); assert (uris.size() <= 100); return setBodyParameter("uris", uris); }
/** * The user or artist IDs setter. * * @param ids Optional. A json array of the artist or the user Spotify IDs. A maximum of 50 IDs can be * sent in one request. * @return A {@link FollowArtistsOrUsersRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify URIs & IDs</a> */ public Builder ids(final JsonArray ids) { assert (ids != null); assert (!ids.isJsonNull()); assert (ids.size() <= 50); return setBodyParameter("ids", ids); }
/** * The device ID setter. * * @param device_ids Required. A JSON array containing the ID of the device on which playback should be * started/transferred. <b>Note:</b> Although an array is accepted, only a single * {@code device_id} is currently supported. * @return A {@link TransferUsersPlaybackRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder device_ids(final JsonArray device_ids) { assert (device_ids != null); assert (!device_ids.isJsonNull()); assert (device_ids.size() == 1); return setBodyParameter("device_ids", device_ids); }
/** * The track URIs setter. * <p> * There are several ways to specify which tracks to remove, determined by the request parameters. * Removing all occurrences of specific tracks: <br> * {@code [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" }, * {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] } <br> * Removing a specific occurrence of a track: <br> * {@code [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "positions": [0,3] }, * { "uri": "spotify:track:1301WleyT98MSxVHPZCA6M", "positions": [7] }] } * * @param tracks Required. An array of objects containing Spotify URIs of the tracks to remove. A maximum of * 100 objects can be sent at once * @return A {@link RemoveTracksFromPlaylistRequest.Builder}. * @see <a href="https://developer.spotify.com/web-api/user-guide/#spotify-uris-and-ids">Spotify: URIs & IDs</a> */ public Builder tracks(final JsonArray tracks) { assert (tracks != null); assert (!tracks.isJsonNull()); assert (tracks.size() <= 100); return setBodyParameter("tracks", tracks); }
JsonObject stage1_data = data.getAsJsonObject("api_stage1"); JsonArray touch_plane = stage1_data.getAsJsonArray("api_touch_plane"); if (touch_plane != null && !touch_plane.isJsonNull()) { int friend_contact = touch_plane.get(0).getAsInt(); if (friend_contact != -1) {
List<Integer> funcInfo = new ArrayList<>(); JsonArray jsonArray = GsonHelper.getAsJsonArray(jsonObject.get("func_info")); if (jsonArray != null && !jsonArray.isJsonNull()) { for (int i = 0; i < jsonArray.size(); i++) { jsonObject = jsonArray.get(i).getAsJsonObject();