Pecuario.Backend

<back to all web services

GetVideoFeed

The following routes are available for this service:
GET/api/v1/videos
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Status:
    message: Optional[str] = None
    status_code: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse:
    status: Optional[Status] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class VideoFeedItem:
    animal_id: Optional[str] = None
    video_url: Optional[str] = None
    thumbnail_url: Optional[str] = None
    description: Optional[str] = None
    title: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVideoFeedResponse(BaseResponse):
    videos: Optional[List[VideoFeedItem]] = None
    offset: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetVideoFeed(IGet):
    page_size: Optional[int] = None
    offset: Optional[str] = None

Python GetVideoFeed 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 /api/v1/videos HTTP/1.1 
Host: pecuario-backend.develsystems.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"videos":[{"animalId":"String","videoUrl":"String","thumbnailUrl":"String","description":"String","title":"String"}],"offset":"String"}