ConsumerApi

<back to all web services

SharePlaceLinkRequest

Consumer
Requires Authentication
Required role:Consumer
The following routes are available for this service:
GET/share/share-place-linkCreate a share place linkThe link contains a JWT token with the identity of the referring user and the shared place as well as the expiration of the link.

library ConsumerApi;
import 'package:servicestack/servicestack.dart';

class SharePlaceLinkResponse implements IConvertible
{
    String? linkWithSharePlaceToken;

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

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

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

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

class SharePlaceLinkRequest implements IGet, IConvertible
{
    // @Validate(Validator="NotNull")
    int? placeId;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: <String, TypeInfo> {
    'SharePlaceLinkResponse': TypeInfo(TypeOf.Class, create:() => SharePlaceLinkResponse()),
    'SharePlaceLinkRequest': TypeInfo(TypeOf.Class, create:() => SharePlaceLinkRequest()),
});

Dart SharePlaceLinkRequest DTOs

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

HTTP + OTHER

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

GET /share/share-place-link HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"linkWithSharePlaceToken":"String"}