pili-engineering / pili-sdk-java

Pili Streaming Cloud server-side library for Java
MIT License
120 stars 70 forks source link

Update Segments API #27

Closed why404 closed 8 years ago

why404 commented 8 years ago
GET /v1/streams/:streamId/segments?start=<StartUnixTimestamp>&end=<EndUnixTimestamp>&limit=<Limit>

200 OK
{
    "start": <StreamStartUnixTimestamp>,
    "end": <StreamEndUnixTimestamp>,
    "duration": <TotalDurationOfRequestSegments>,
    "segments": [
        {
            "start": <StartUnixTimestamp>,
            "end": <EndUnixTimestamp>
        },
        {
            "start": <StartUnixTimestamp>,
            "end": <EndUnixTimestamp>
        }
    ]
}

400 Bad request
{
    "error": "bad request",
    "details"; {
        "<Key>": "<Reason>"
    }
}

401 Unauth
{
    "error": "unauth"
}

404 Not Found
{
    "error": "not found"
}
why404 commented 8 years ago

released with #28.