Required role: | Consumer |
GET | /share/share-place-link | Create a share place link | The 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 .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"linkWithSharePlaceToken":"String"}