tvpl.api

<back to all web services

UpdateAsRead

Cập nhật sang đã đọc theo notification Id

Requires Authentication
The following routes are available for this service:
POST/notifications
POST/notifications/{Id}
import 'package:servicestack/servicestack.dart';

abstract class IResponseRequest
{
    int? code;
    String? message;
}

/**
* Cập nhật sang đã đọc theo notification Id
*/
class UpdateAsRead implements IConvertible
{
    String? id;

    UpdateAsRead({this.id});
    UpdateAsRead.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id
    };

    getTypeName() => "UpdateAsRead";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'IResponseRequest': TypeInfo(TypeOf.Interface),
    'UpdateAsRead': TypeInfo(TypeOf.Class, create:() => UpdateAsRead()),
});

Dart UpdateAsRead DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /notifications HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'IResponseRequest' using the custom 'csv' filter}Cannot dynamically create an instance of type 'tvpl.api.ServiceModel.IResponseRequest'. Reason: Cannot create an instance of an interface.