BokaMera.API.Host

<back to all web services

SyncToiCal

The following routes are available for this service:
GET/sync/icalsync/{companyid}/{token}Get iCals
import 'package:servicestack/servicestack.dart';

class SyncToiCal implements ICompany, IConvertible
{
    /**
    * Enter the company, if blank and you are an admin, your company id will be used
    */
    // @ApiMember(Description="Enter the company, if blank and you are an admin, your company id will be used", ParameterType="path")
    String? CompanyId;

    /**
    * Query for specific Resources, default is all resources
    */
    // @ApiMember(Description="Query for specific Resources, default is all resources", IsRequired=true, ParameterType="query")
    List<int>? ResourceIds;

    /**
    * ICalSync Token
    */
    // @ApiMember(Description="ICalSync Token", IsRequired=true, ParameterType="path")
    String? Token;

    /**
    * If you want to include the schedule time slots
    */
    // @ApiMember(Description="If you want to include the schedule time slots", ParameterType="query")
    bool? IncludeSchedules;

    SyncToiCal({this.CompanyId,this.ResourceIds,this.Token,this.IncludeSchedules});
    SyncToiCal.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        ResourceIds = JsonConverters.fromJson(json['ResourceIds'],'List<int>',context!);
        Token = json['Token'];
        IncludeSchedules = json['IncludeSchedules'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'ResourceIds': JsonConverters.toJson(ResourceIds,'List<int>',context!),
        'Token': Token,
        'IncludeSchedules': IncludeSchedules
    };

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

TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
    'SyncToiCal': TypeInfo(TypeOf.Class, create:() => SyncToiCal()),
});

Dart SyncToiCal DTOs

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

HTTP + JSV

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

GET /sync/icalsync/{companyid}/{token} HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}