public AlbumsRemoveAssetsRequest( Context context, AlbumModel album, ArrayList<String> assetIds, HttpCallback<Void> callback) { super(context, RequestMethod.POST, new NoResponseParser(), callback); if (album == null || TextUtils.isEmpty(album.getId())) { throw new IllegalArgumentException("Need to provide album ID"); } if (assetIds == null || assetIds.size() == 0) { throw new IllegalArgumentException("Need to provide list of asset IDs for removal"); } this.album = album; this.assetIds = assetIds; }
public CommentsCreateRequest( Context context, AlbumModel album, AssetModel asset, CommentModel comment, HttpCallback<ResponseModel<CommentModel>> callback) { super( context, RequestMethod.POST, new ResponseParser<CommentModel>(CommentModel.class), callback); if (album == null || TextUtils.isEmpty(album.getId())) { throw new IllegalArgumentException("Need to provide album ID"); } if (asset == null || TextUtils.isEmpty(asset.getId())) { throw new IllegalArgumentException("Need to provide asset ID"); } if (comment == null || TextUtils.isEmpty(comment.getCommentText())) { throw new IllegalArgumentException("Need to provide comment text"); } this.album = album; this.asset = asset; this.comment = comment; }
@Override protected String getUrl() { return String.format(RestConstants.URL_ALBUMS_REMOVE_ASSETS, album.getId()); }
public static AlbumModel create() { AlbumModel model = new AlbumModel(); model.setId("423dsf"); model.setName("car make"); return model; }
@Override protected String getUrl() { return String.format(RestConstants.URL_COMMENTS_CREATE, album.getId(), asset.getId()); }